| com.sun.jbi.cli.commands.JBICommand
All known Subclasses: com.sun.jbi.cli.commands.JBIExtensionCommands,
JBICommand | abstract public class JBICommand extends com.sun.enterprise.cli.commands.JBICommand (Code) | | Will start the JBI component on the specified target.
version: $Revision: 1.14 $ |
Method Summary | |
protected Hashtable | constructCommandHashtable(String filePath) Using the ant file specified, this method will construct a hashtable that
will contain all the commands defined in the ant file. | protected void | convertTemplateFilesToAsadmin(String fileDir) Will convert the template file from an ant syntax style to a asadmin syntax style. | protected void | createAsadminConfigFile(Hashtable commandHashTable, String propertyFile, String asadminConfigFile) Using the provided commandHashTable, this method will create the asadmin
command file. | protected String | createFillString(char fillChar, int size) Will create a string of the size specified filled with the fillChar. | protected void | displayCompositeItem(CompositeData compData, String itemKey, String bundleKey, int indention) Will extract the object from the given CompositeData using itemKey. | protected void | displayCompositeUpTime(CompositeData compData, String itemKey, String bundleKey, int indention) Will extract the timestamp from the given CompositeData using itemKey. | protected void | displayDescriptor(String descriptor) | protected void | displayMap(Map map, int indentAmount) Will display the content of a Map sorted by the keys. | protected void | displayMessage(String msg, int indentAmount) Will display the provided message to the screen. | protected void | displayOptionHeader(String bundleKey, int indention) Will extract the header using the given bundleKey and display it to the
screen. | protected void | displayOptionHeader(String bundleKey, String valueStr, int indention) Will extract the header using the given bundleKey and display it using
the given value String. | protected void | displayProperties(Properties properties, int indentAmount) Will display the content of a Map sorted by the keys. | protected Properties | getAnyProperties() Will first check the properties options for either a property file or
properties specified on the command line. | protected Object | getCompositeItem(CompositeData compData, String itemKey) Will extract the object from the given CompositeData using itemKey. | protected String | getLocalizedString(String key) Overloaded method that will first use the StringManager to look for
the property value, If not found there, the super class getLocalizedString
method will used. | protected String | getLocalizedString(String key, Object[] args) Overloaded method that will first use the StringManager to look for
the property value, If not found there, the super class getLocalizedString
method will used. | protected int | getMaxKeyLength(Set aSet) Utility method that will determine the max width of the key field (col).
Parameters: aSet - The set containing the key value pairs that will be displayed. | public String | getName() | protected Properties | insertType(Properties properties) Will insert the default type [STRING] into the properties string
if one is not present. | protected String | multiLineFormat(String msgText, int maxLength, int indentAmount) Will format the description text that is displayed in the show commands. | protected void | printCompositeData(TabularData statsReport, int indention, int tabsize) Will parse and print the Report about the composite data. | protected void | printCompositeData(CompositeData compData, int recursiveLevel, int indention, int tabsize) Will parse and print the Report about the composite data. | protected void | processComponentResults(TabularData data, String componentName) Will process the Component TabularData object to display the Component
information to the screen. | protected void | processEndpointResults(TabularData data, String endpointName) Will process the Endpoint TabularData object to display the Endpoint
information to the screen. | protected void | processFrameworkResults(TabularData data) Will process the Framework TabularData object to display the Framework
information to the screen. | protected void | processJBIAdminAsseblyListResult(String result) | protected void | processJBIAdminComponentListResult(String result) Will process the list results for the components (Service Engines,
Binding Components and Shared Libraries). | protected void | processJBIAdminShowAssemblyResult(String result, String aName) Will format and display the Service Assembly show results. | protected void | processJBIAdminShowComponentResult(String result, String aName) Will format and display the component (binding or engine) show results. | protected void | processJBIAdminShowLibraryResult(String result, String aName) Will format and display the Shared Library show results. | protected void | processNMRResults(TabularData data) Will process the NMR TabularData object to display the NMR
information to the screen. | protected void | processServiceAssemblyResults(TabularData data, String saName) Will process the Service Assembly TabularData object to display the Service
Assembly information to the screen. | protected void | processVerifyResults(CompositeData compData) Will process the Verify CompositData results. | protected String | replaceString(String originalStr, String patternStr, String replacementStr) Utility method that will replace a pattern in a string. | protected void | updateConectionPropertiesFile(String fileName) Will scan through the connection properties file and replace the ant property
keys with ones that are used by asadmin. |
CONFIG_COMMAND_FILENAME_ANT | final static String CONFIG_COMMAND_FILENAME_ANT(Code) | | |
CONFIG_COMMAND_FILENAME_ASADMIN | final static String CONFIG_COMMAND_FILENAME_ASADMIN(Code) | | |
CONFIG_PROPERTIES_FILENAME | final static String CONFIG_PROPERTIES_FILENAME(Code) | | |
convertTemplateFilesToAsadmin | protected void convertTemplateFilesToAsadmin(String fileDir) throws CommandException(Code) | | Will convert the template file from an ant syntax style to a asadmin syntax style.
Parameters: fileDir - The directory containing the files to convert. throws: CommandException - |
createAsadminConfigFile | protected void createAsadminConfigFile(Hashtable commandHashTable, String propertyFile, String asadminConfigFile) throws IOException(Code) | | Using the provided commandHashTable, this method will create the asadmin
command file. This is the file that will contain the asadmin commands.
Parameters: commandHashTable - The hashtable the contains the commands. Parameters: propertyFile - FilePath name of the property file containing the connection info. Parameters: asadminConfigFile - Name of the asadmin config file to create. throws: IOException - |
createFillString | protected String createFillString(char fillChar, int size)(Code) | | Will create a string of the size specified filled with the fillChar.
Parameters: fillChar - the character to create the string with Parameters: the - size of the string |
displayCompositeItem | protected void displayCompositeItem(CompositeData compData, String itemKey, String bundleKey, int indention)(Code) | | Will extract the object from the given CompositeData using itemKey. Then
it will display the object using it toString() method.
Parameters: compData - The composite data Parameters: itemKey - The key to extract the object from the composite data Parameters: bundleKey - The property key value Parameters: indention - The amount to indent the string |
displayCompositeUpTime | protected void displayCompositeUpTime(CompositeData compData, String itemKey, String bundleKey, int indention)(Code) | | Will extract the timestamp from the given CompositeData using itemKey. Then
it will display the time stamp using the bundleKey to retrieve the string
from the LocalString property file.
Parameters: compData - The composite data Parameters: itemKey - The key to extract the object from the composite data Parameters: bundleKey - The property key value Parameters: indention - The amount to indent the string |
displayDescriptor | protected void displayDescriptor(String descriptor)(Code) | | Will display the descriptor result (xml file)
Parameters: descriptor - string (xml format) |
displayMap | protected void displayMap(Map map, int indentAmount)(Code) | | Will display the content of a Map sorted by the keys. The display
format will be key = value, one entry per line.
Parameters: map - The map to display |
displayMessage | protected void displayMessage(String msg, int indentAmount)(Code) | | Will display the provided message to the screen.
Parameters: msg - The message to display Parameters: indentAmount - The amount to indent the message by |
displayOptionHeader | protected void displayOptionHeader(String bundleKey, int indention)(Code) | | Will extract the header using the given bundleKey and display it to the
screen.
Parameters: bundleKey - The property key value Parameters: indention - The amount to indent the string |
displayOptionHeader | protected void displayOptionHeader(String bundleKey, String valueStr, int indention)(Code) | | Will extract the header using the given bundleKey and display it using
the given value String.
Parameters: bundleKey - The property key value Parameters: valaueStr - The string containing the values to use in the output string Parameters: indention - The amount to indent the string |
displayProperties | protected void displayProperties(Properties properties, int indentAmount)(Code) | | Will display the content of a Map sorted by the keys. The display
format will be key = value, one entry per line.
Parameters: map - The map to display |
getAnyProperties | protected Properties getAnyProperties() throws CommandException, CommandValidationException(Code) | | Will first check the properties options for either a property file or
properties specified on the command line. If no properties option is
found, an empty properties object will be returned.
properties object, will be empty if not properties are found throws: CommandException - throws: CommandValidationException - |
getCompositeItem | protected Object getCompositeItem(CompositeData compData, String itemKey)(Code) | | Will extract the object from the given CompositeData using itemKey.
Parameters: compData - The composite data Parameters: itemKey - The key to extract the object from the composite data the object retrieved from the Composite Data. |
getLocalizedString | protected String getLocalizedString(String key)(Code) | | Overloaded method that will first use the StringManager to look for
the property value, If not found there, the super class getLocalizedString
method will used. This needs to be implemented for multimode to work.
Parameters: key - The properties key The property value (localized string) |
getLocalizedString | protected String getLocalizedString(String key, Object[] args)(Code) | | Overloaded method that will first use the StringManager to look for
the property value, If not found there, the super class getLocalizedString
method will used. This needs to be implemented for multimode to work.
Parameters: key - The properties key args[] The array of arguments The property value (localized string) |
getMaxKeyLength | protected int getMaxKeyLength(Set aSet)(Code) | | Utility method that will determine the max width of the key field (col).
Parameters: aSet - The set containing the key value pairs that will be displayed. the max length for the key field |
getName | public String getName()(Code) | | Will return the command name
the command name |
insertType | protected Properties insertType(Properties properties)(Code) | | Will insert the default type [STRING] into the properties string
if one is not present.
Parameters: properties - The properties to analyize and update |
multiLineFormat | protected String multiLineFormat(String msgText, int maxLength, int indentAmount)(Code) | | Will format the description text that is displayed in the show commands. The
formatting will consist of removing all new lines and extra white space, then
adding back in line breaks at the first avaliable location that is less then
or equal to the given max line length.
Parameters: msgText - the message string to format Parameters: maxLength - the maximum line length size. Parameters: indentAmout - the amount to indent row 2 - n |
printCompositeData | protected void printCompositeData(TabularData statsReport, int indention, int tabsize)(Code) | | Will parse and print the Report about the composite data.
Parameters: compData - The CompositeData Parameters: indention - The amount to indent the string Parameters: tabsize - The tabsize |
printCompositeData | protected void printCompositeData(CompositeData compData, int recursiveLevel, int indention, int tabsize)(Code) | | Will parse and print the Report about the composite data.
Parameters: compData - The CompositeData Parameters: recursiveLevel - Level of recursion Parameters: indention - The amount to indent the string Parameters: tabsize - The tabsize (indention for each resursion level) |
processComponentResults | protected void processComponentResults(TabularData data, String componentName)(Code) | | Will process the Component TabularData object to display the Component
information to the screen.
Parameters: data - The TabularData containing the CompositData to display Parameters: componentName - The Component name |
processEndpointResults | protected void processEndpointResults(TabularData data, String endpointName)(Code) | | Will process the Endpoint TabularData object to display the Endpoint
information to the screen.
Parameters: data - The TabularData containing the CompositData to display Parameters: endpointName - The Endpoint name |
processFrameworkResults | protected void processFrameworkResults(TabularData data)(Code) | | Will process the Framework TabularData object to display the Framework
information to the screen.
Parameters: data - The TabularData containing the CompositData to display |
processJBIAdminAsseblyListResult | protected void processJBIAdminAsseblyListResult(String result)(Code) | | Will process the list results for the Service Assemblies
Parameters: result - The result xml string |
processJBIAdminComponentListResult | protected void processJBIAdminComponentListResult(String result)(Code) | | Will process the list results for the components (Service Engines,
Binding Components and Shared Libraries).
was specified, the default value will be returned.
Parameters: result - The result xml string |
processJBIAdminShowAssemblyResult | protected void processJBIAdminShowAssemblyResult(String result, String aName)(Code) | | Will format and display the Service Assembly show results.
Parameters: result - the xml string containing the result information Parameters: aName - the name of the service assembly |
processJBIAdminShowComponentResult | protected void processJBIAdminShowComponentResult(String result, String aName)(Code) | | Will format and display the component (binding or engine) show results.
Parameters: result - the xml string containing the result information Parameters: aName - the name of the component |
processJBIAdminShowLibraryResult | protected void processJBIAdminShowLibraryResult(String result, String aName)(Code) | | Will format and display the Shared Library show results.
Parameters: result - the xml string containing the result information Parameters: aName - the name of the shared library |
processNMRResults | protected void processNMRResults(TabularData data)(Code) | | Will process the NMR TabularData object to display the NMR
information to the screen.
Parameters: data - The TabularData containing the CompositData to display |
processServiceAssemblyResults | protected void processServiceAssemblyResults(TabularData data, String saName)(Code) | | Will process the Service Assembly TabularData object to display the Service
Assembly information to the screen.
Parameters: data - The TabularData containing the CompositData to display Parameters: saName - The Service Assembly name |
processVerifyResults | protected void processVerifyResults(CompositeData compData)(Code) | | Will process the Verify CompositData results.
Parameters: compData - The CompositeData |
replaceString | protected String replaceString(String originalStr, String patternStr, String replacementStr)(Code) | | Utility method that will replace a pattern in a string.
Parameters: originalStr - The original input string Parameters: patternStr - The pattern to replace in the string. Parameters: replacementStr - The string to replace the patternStr with. |
updateConectionPropertiesFile | protected void updateConectionPropertiesFile(String fileName) throws IOException(Code) | | Will scan through the connection properties file and replace the ant property
keys with ones that are used by asadmin.
Parameters: fileName - the connection properties file throws: IOException - |
|
|