|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.n1.sps.client.CommandManagerBuilder
public final class CommandManagerBuilder
The CommandManagerBuilder builds and returns the reference to the CommandManager
given the File path to the SPS CLI Installation directory. Once the reference to the
CommandManger is obtained, the SPS CLUI commands can be invoked via the CommandManager.
CommandManagerBuilder cmb = new CommandManagerBuilder();
// for a default CLI installation location on Unix.
cmb.setCLIInstallationDir(new File("/opt/SUNWn1sps/N1_Service_Provisioning_System_6.0/cli/"));
CommandManager cm = cmb.build();
// Now, CommandManager can be used to invoke the API.
CommandManager
Field Summary | |
---|---|
static java.lang.String |
API_VERSION
This string represents SPS API version. |
static java.lang.String |
MSG_CMD_MGR_REF_ERROR
This string is implementational and is not intended for use by clients |
static java.lang.String |
MSG_ERROR_CREATING_TMP_FILES
This string is implementational and is not intended for use by clients |
static java.lang.String |
MSG_INCOMPATIBLE_VERSION_ERROR
This string is implementational and is not intended for use by clients |
static java.lang.String |
MSG_INVALID_BS_JAR_FILE_ERROR
This string is implementational and is not intended for use by clients |
static java.lang.String |
MSG_INVALID_CLI_DIR_ERROR
This string is implementational and is not intended for use by clients |
static java.lang.String |
MSG_INVALID_CLI_LIB_DIR_ERROR
This string is implementational and is not intended for use by clients |
static java.lang.String |
MSG_SET_CLI_MSG
This string is implementational and is not intended for use by clients |
static java.lang.String |
MSG_SYNCHRONIZATION_ERROR
This string is implementational and is not intended for use by clients |
static java.lang.String |
MSG_TEST_CONNECTION_FAILURE_ERROR
This string is implementational and is not intended for use by clients |
static java.lang.String |
MSG_UNABLE_VERSION_ERROR
This string is implementational and is not intended for use by clients |
Constructor Summary | |
---|---|
CommandManagerBuilder()
Constructs the CommandMgrBuilder. |
Method Summary | |
---|---|
CommandManager |
build()
Loads and builds the CommandManager on which the various CLI commands can be executed. |
java.net.URLClassLoader |
getClassLoader()
Returns the class loader used to load the CommandManager. |
java.io.File |
getCLIInstallationDir()
Returns the SPS CLI Installation directory. |
boolean |
getTestConnection()
Gets the flag to validate the Master Server connection. |
static java.lang.String |
getVersion()
Returns the version of the N1 SPS Public API. |
static void |
main(java.lang.String[] args)
|
void |
setCLIInstallationDir(java.io.File inCLIInstDir)
Sets the SPS CLI Installation directory. |
void |
setTestConnection(boolean inTestConnection)
Sets the flag to validate the Master Server connection when the the build method is invoked. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String MSG_SET_CLI_MSG
public static final java.lang.String MSG_CMD_MGR_REF_ERROR
public static final java.lang.String MSG_SYNCHRONIZATION_ERROR
public static final java.lang.String MSG_INVALID_CLI_DIR_ERROR
public static final java.lang.String MSG_INVALID_CLI_LIB_DIR_ERROR
public static final java.lang.String MSG_ERROR_CREATING_TMP_FILES
public static final java.lang.String MSG_INVALID_BS_JAR_FILE_ERROR
public static final java.lang.String MSG_INCOMPATIBLE_VERSION_ERROR
public static final java.lang.String MSG_UNABLE_VERSION_ERROR
public static final java.lang.String MSG_TEST_CONNECTION_FAILURE_ERROR
public static java.lang.String API_VERSION
Constructor Detail |
---|
public CommandManagerBuilder()
Method Detail |
---|
public void setCLIInstallationDir(java.io.File inCLIInstDir) throws ConfigurationException
inCLIInstDir
- a valid CLI Installation directory.
ConfigurationException
- unable to configure setup.public java.io.File getCLIInstallationDir()
public void setTestConnection(boolean inTestConnection)
true
before invoking the build()
method.
inTestConnection
- true if the connection test is to be conducted, else false.build()
public boolean getTestConnection()
true
, else false.public CommandManager build() throws ConfigurationException, ClientException
setCLIInstallationDir(File)
before calling this method.
ConfigurationException
- if unable to load the CommandManager.
ClientException
- if there was a failure to verify the connection to the CommandManager.setCLIInstallationDir(java.io.File)
public java.net.URLClassLoader getClassLoader()
public static java.lang.String getVersion()
setCLIInstallationDir(java.io.File)
.
For example, the version number (6.0) returned by the cli by executing:
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |