/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2008 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: CLIHandler.java,v 1.3 2009/11/13 21:53:28 ak138937 Exp $
*
*/
/*
* Portions Copyrighted [2011] [ForgeRock AS]
*/
/**
* This is a supporting class to handle command-line options
*/
static {
WEB_CONTAINERS[0]);
WEB_CONTAINERS[1]);
WEB_CONTAINERS[2]);
WEB_CONTAINERS[3]);
}
public CLIHandler() {
}
/**
* This method is called once during application start up to actually
* start the application in CLI mode. This method should bring up the
* application in CLI mode.
*/
tContext =
}
}
//open up standard input
// prompt the user to enter their name
try {
//check if save option was selected
}
}
}
} catch (Exception e) {
printCLIMessage("cli-error-cmd-exec");
}
}
printCLIMessage("cli-exit-message");
}
private static void saveToFile(
) {
try {
} catch (Exception e) {
}
}
try {
} catch(Exception e) {
return 0;
}
}
}
boolean valid = true;
while (st.hasMoreTokens()) {
}
if (!validateArguments(argv)) {
valid = false;
} else {
switch (opt) {
case TOOLNAME:
if (i != 0) {
printUsage();
}
break;
case CFG_DIR:
i++;
{argv[i-1]});
valid = false;
} else {
printCLIMessage("cli-cfg-dir-missing",
valid = false;
} else {
}
}
break;
case FILENAME:
i++;
printCLIMessage("cli-file-save-missing",
valid = false;
} else {
printCLIMessage("cli-file-save-missing", new
valid = false;
} else {
}
}
break;
case CONTAINER_BASE_DIR:
i++;
printCLIMessage("cli-container-dir-missing", new
valid = false;
} else {
printCLIMessage("cli-container-dir-missing",
} else {
}
}
break;
case CONTAINER_DOMAINDIR:
i++;
printCLIMessage("cli-container-domain-dir-missing",
valid = false;
} else {
"cli-container-domain-dir-missing",
} else {
}
}
break;
case CONTAINER_NAME:
i++;
printCLIMessage("cli-container-type-missing",
valid = false;
} else {
printCLIMessage("cli-container-type-missing",
valid = false;
} else {
getContainerType(argv[i]));
}
}
break;
case HELP:
if (i == 2) {
} else {
printUsage();
}
break;
default:
cmdSelected = argv[i];
} else {
}
} else {
valid = false;
}
}
}
}
if (!valid) {
printUsage();
}
return valid;
}
public static void printUsage(){
int i = 1;
if (i != size) {
} else {
}
}
}
} else {
}
}
boolean retValue = true;
if (len <= 2 ) {
retValue = false;
} else if (len == 2) {
retValue = false;
}
if (retValue){
retValue = false;
}
}
} else {
retValue = false;
for (int i = 2; (i < len); i++) {
retValue = true;
} else {
//process others
retValue = true;
i++;
retValue &= true;
}
retValue = false;
}
}
}
}
}
}
}
}
return retValue;
}
}
}
break;
}
}
}
return svcName;
}
}
}
}
}
try {
}
}
}
}
} catch (Exception e) {
"CLIHandler.getSubCmds: " + e.getMessage());
}
}
private static void createMapping() {
try {
}
}
}
} catch (Exception e) {
"CLIHandler.createMapping: " + e.getMessage());
}
}
}
}
}