| com.sun.portal.admin.cli.commands.AdminBaseCommand
All known Subclasses: com.sun.portal.admin.cli.commands.logging.LoggingBaseCommand, com.sun.portal.admin.cli.commands.desktop.RemoveDpCommand, com.sun.portal.admin.cli.commands.desktop.ListDpCommand, com.sun.portal.admin.cli.commands.portlet.RegisterPortletCommand, com.sun.portal.admin.cli.commands.HelpCommand, com.sun.portal.admin.cli.commands.ListSearchServersCommand, com.sun.portal.admin.cli.commands.monitoring.MonitoringBaseCommand, com.sun.portal.admin.cli.commands.RedeployCommand, com.sun.portal.admin.cli.commands.desktop.AddDpCommand, com.sun.portal.admin.cli.commands.CreateParCommand, com.sun.portal.admin.cli.commands.UnscheduleTasksCommand, com.sun.portal.admin.cli.commands.ProvisionSRACommand, com.sun.portal.admin.cli.commands.rewriter.StoreRuleSetSubcommand, com.sun.portal.admin.cli.commands.GenericCommand, com.sun.portal.admin.cli.commands.SetDomainRepositoryPasswordCommand, com.sun.portal.admin.cli.commands.portlet.UNRegisterPortletCommand, com.sun.portal.admin.cli.commands.ListParCommand, com.sun.portal.admin.cli.commands.ListPortalsCommand, com.sun.portal.admin.cli.commands.portlet.DeployPortletCommand, com.sun.portal.admin.cli.commands.sra.GenericSRACommand, com.sun.portal.admin.cli.commands.desktop.TestDisplayProfileCommand, com.sun.portal.admin.cli.commands.ImportCommand, com.sun.portal.admin.cli.commands.CreatePortalInstanceCommand, com.sun.portal.admin.cli.commands.ConfigureInstancesCommand, com.sun.portal.admin.cli.commands.desktop.MergeDpCommand, com.sun.portal.admin.cli.commands.portlet.UNDeployPortletCommand, com.sun.portal.admin.cli.commands.MultiProcessCommand, com.sun.portal.admin.cli.commands.ExportCommand, com.sun.portal.admin.cli.commands.DeletePortalCommand, com.sun.portal.admin.cli.commands.VersionCommand, com.sun.portal.admin.cli.commands.desktop.ModifyDpCommand, com.sun.portal.admin.cli.commands.ssoadapter.GenericSSOAdapterCommand, com.sun.portal.admin.cli.commands.ubt.GenerateUBTReportCommand, com.sun.portal.admin.cli.commands.CreatePortalCommand, com.sun.portal.admin.cli.commands.ScheduleTasksCommand,
AdminBaseCommand | abstract public class AdminBaseCommand extends Command implements AdminCLIConstants(Code) | | This is the base class for all psadmin utility's subcommands. This
class defines the common options that are used by all of the
psadmin subcommands and also defines convenient methods that can be
called by all the subcommand classes.
|
Method Summary | |
protected File | checkForFileExistence(String parent, String fileName) | protected void | closeMBeanServerConnection() Closes the client connection to its server. | protected Properties | createPropertiesParam(String propertyVal) | public Object | getAttribute(MBeanServerConnection mbs, ObjectName obj, String attribute) | protected String | getDomainId() Gets the Portal Domain ID. | protected String | getHost() Gets the host name. | public Set | getInstanceHosts(MBeanServerConnection msc, String portalId) Get all hosts that has portal instances for this portal. | protected String | getInstanceId() Gets the Portal Server Instance ID. | protected List | getInstanceNames(String portalId) | protected String | getInteractiveOption(String optionName, String prompt, boolean interactive) If interactive is true, then prompt the user for the option value.
Parameters: optionName - - name of option. Parameters: prompt - -- the string that will be used to prompt the user throws: CommandException - if option value cannot be read in interactive mode. throws: CommandValidationException - is interactive is false and the optionvalue is null. | protected String | getLocalizedString(String key) This method uses the local LocalStringManager object to get
the localized string. | protected String | getLocalizedString(String key, Object[] toInsert) This method uses the local LocalStringsManager object to get
the localized string. | public static Logger | getLogger() | protected MBeanServerConnection | getMBeanServerConnection(String id, String pwd, String host) Gets the MBeanServerConntection . | protected List | getMultiValueFromString(String value) For an given String , returns a list of
values.
The syntax for the String is: '"val1" "val2" "val3"',
and the returned values will be: "val1","val2","val3". | protected List | getMultiValueOption(String optionName) For an given option, gets the string value, and returns a list
of values.
The syntax for the string value is: '"val1" "val2" "val3"',
and the returned values will be: "val1","val2","val3". | protected ObjectName | getObjectName() | protected String | getOperationName() | protected PSConfigContext | getPSConfigContext() Gets the ps config context. | protected Object[] | getParamsInfo() | protected String | getPassword() Gets the admin user password. | protected String | getPortalId() Gets the Portal ID. | protected List | getPortalNames() | protected String | getPortalUri() Gets the Portal URI. | protected String | getReturnType() | protected String | getSearchServerId() Gets the Search Server ID. | protected List | getSearchServers() | protected String[] | getTypesInfo() | protected String | getUserId() Gets the admin user id. | protected Properties | getWebConfigProp() Gets the web configuration properties. | protected void | handleReturnValue(Object returnval) | protected boolean | hasWebLogicAdminServerInstance(String portalId) | protected boolean | isExistingInstance() Validates the instance option. | protected boolean | isLocal() Checks if psadmin is connecting a remote PAS. | public void | setEnvironment(String opt, String value) | protected void | setOutput() If output option is set, set output to the file, otherwise set
output to standard output. | protected void | validateInstance() Validates the instance option. | protected void | validateNonSRACommand() Validate the non-sra commands.
If a system has only SRA installed, then only sra, logger, or
monitoring commands can be executed. | public boolean | validateOptions() | protected void | validatePassword() Loads and validates the passwords from the password file.
This method will read the password from the password file. | protected void | validatePortalId() Validates the portal-id option. | protected void | validatePortalUri() Validates the portal-id option. | protected void | validateSRACommand() Validate the sra commands.
If a system does not has SRA installed, and the user attempt to
execute a sra command, throws exception. | protected void | validateSearchServerID() Validates the searchserver-id option. |
ATTRIBUTE_LIST_CLASS | final public static String ATTRIBUTE_LIST_CLASS(Code) | | |
DOMAIN_MBEAN_OBJECT_NAME | final public static String DOMAIN_MBEAN_OBJECT_NAME(Code) | | |
DOMAIN_RESOURCE_MBEAN_OBJECT_NAME | final public static String DOMAIN_RESOURCE_MBEAN_OBJECT_NAME(Code) | | |
ERROR_GET_INSTANCE_HOST | final public static String ERROR_GET_INSTANCE_HOST(Code) | | |
INSTANCE_MBEAN_OBJECT_NAME | final public static String INSTANCE_MBEAN_OBJECT_NAME(Code) | | |
INSTANCE_RESOURCE_MBEAN_OBJECT_NAME | final public static String INSTANCE_RESOURCE_MBEAN_OBJECT_NAME(Code) | | |
PARAM_DELIMITER | final public static String PARAM_DELIMITER(Code) | | |
PARAM_VALUE_DELIMITER | final public static String PARAM_VALUE_DELIMITER(Code) | | |
PAS_SETTINGS_FILE | final public static String PAS_SETTINGS_FILE(Code) | | |
PORTAL_MBEAN_OBJECT_NAME | final public static String PORTAL_MBEAN_OBJECT_NAME(Code) | | |
PORTAL_RESOURCE_MBEAN_OBJECT_NAME | final public static String PORTAL_RESOURCE_MBEAN_OBJECT_NAME(Code) | | |
PRIMITIVE_BOOLEAN_CLASS | final public static String PRIMITIVE_BOOLEAN_CLASS(Code) | | |
PROPERTIES_CLASS | final public static String PROPERTIES_CLASS(Code) | | |
PROPERTY_DELIMITER | final public static String PROPERTY_DELIMITER(Code) | | |
commandLocalStringsManager | protected LocalStringsManager commandLocalStringsManager(Code) | | |
AdminBaseCommand | public AdminBaseCommand()(Code) | | |
checkForFileExistence | protected File checkForFileExistence(String parent, String fileName) throws CommandException(Code) | | Check for the existence of the file in the file system
Parameters: parent - - the parent directory containing the file Parameters: fileName - - the name of the file to check for existence File handler |
closeMBeanServerConnection | protected void closeMBeanServerConnection() throws CommandException(Code) | | Closes the client connection to its server. Any attempt to use
the MBeanServerConnection after this call will get
an exception.
|
createPropertiesParam | protected Properties createPropertiesParam(String propertyVal) throws CommandException(Code) | | Formulate and Returns Properties from the given string
Properties |
getDomainId | protected String getDomainId()(Code) | | Gets the Portal Domain ID.
The Portal ID. |
getHost | protected String getHost()(Code) | | Gets the host name.
If --hostname is given, use it; else check if pasHost is set in
the pasconnect.properties file; else return localhost.
The host name. |
getInstanceId | protected String getInstanceId()(Code) | | Gets the Portal Server Instance ID.
The Portal ID. |
getInstanceNames | protected List getInstanceNames(String portalId) throws CommandException(Code) | | |
getInteractiveOption | protected String getInteractiveOption(String optionName, String prompt, boolean interactive) throws CommandValidationException(Code) | | If interactive is true, then prompt the user for the option value.
Parameters: optionName - - name of option. Parameters: prompt - -- the string that will be used to prompt the user throws: CommandException - if option value cannot be read in interactive mode. throws: CommandValidationException - is interactive is false and the optionvalue is null. option value |
getLocalizedString | protected String getLocalizedString(String key)(Code) | | This method uses the local LocalStringManager object to get
the localized string. If not found in the local
LocalStringsManager (Key not found), then get the message from
the framework command LocalStringsManager.
key, the string to be localized |
getLocalizedString | protected String getLocalizedString(String key, Object[] toInsert)(Code) | | This method uses the local LocalStringsManager object to get
the localized string. If not found in the local
LocalStringsManager (Key not found), then get the message from
the framework command LocalStringsManager.
key, the string to be localized toInsert, the strings to be inserted in the placeholders |
getMBeanServerConnection | protected MBeanServerConnection getMBeanServerConnection(String id, String pwd, String host) throws CommandException(Code) | | Gets the MBeanServerConntection . Client of this
method is responsible for calling the
closeMBeanServerConnection() method
to close the connection to the MBeanServer .
This method will use the passed in id, password, and host
information to get authentication from the mbean server
container and returns the MBeanServerConnection .
Parameters: id - The admin user id. Parameters: pwd - The admin user password. Parameters: host - The host name from where theMBeanServer is running. The MBeanServerConntion exception: CommandException - If the authentication fails. |
getMultiValueFromString | protected List getMultiValueFromString(String value) throws CommandException(Code) | | For an given String , returns a list of
values.
The syntax for the String is: '"val1" "val2" "val3"',
and the returned values will be: "val1","val2","val3". If the
option has only one value, that value will be returned in the List.
The List object of multiple strings. |
getMultiValueOption | protected List getMultiValueOption(String optionName) throws CommandException(Code) | | For an given option, gets the string value, and returns a list
of values.
The syntax for the string value is: '"val1" "val2" "val3"',
and the returned values will be: "val1","val2","val3". If the
option has only one value, that value will be returned in the List.
The List object of multiple strings. |
getObjectName | protected ObjectName getObjectName() throws CommandException(Code) | | Returns the Object name string from the properties
Object name else returns null |
getOperationName | protected String getOperationName() throws CommandException(Code) | | |
getPSConfigContext | protected PSConfigContext getPSConfigContext() throws CommandException(Code) | | Gets the ps config context.
The PSConfigContext object. |
getParamsInfo | protected Object[] getParamsInfo() throws CommandException, CommandValidationException(Code) | | |
getPassword | protected String getPassword() throws CommandValidationException(Code) | | Gets the admin user password.
The admin user password. |
getPortalId | protected String getPortalId()(Code) | | Gets the Portal ID.
The Portal ID. |
getPortalNames | protected List getPortalNames() throws CommandException(Code) | | |
getPortalUri | protected String getPortalUri()(Code) | | Gets the Portal URI.
The Portal URI. |
getSearchServerId | protected String getSearchServerId()(Code) | | Gets the Search Server ID.
The Search Server ID. |
getSearchServers | protected List getSearchServers() throws CommandException(Code) | | |
getUserId | protected String getUserId()(Code) | | Gets the admin user id.
The admin user id. |
getWebConfigProp | protected Properties getWebConfigProp() throws CommandException(Code) | | Gets the web configuration properties.
The Properties object of the web configurationproperties. |
handleReturnValue | protected void handleReturnValue(Object returnval)(Code) | | handles return value from mbean
Parameters: returnval - |
hasWebLogicAdminServerInstance | protected boolean hasWebLogicAdminServerInstance(String portalId)(Code) | | |
isExistingInstance | protected boolean isExistingInstance() throws CommandException(Code) | | Validates the instance option.
exception: CLIException - If the psConfig option is not presented or if theformat is invalid |
isLocal | protected boolean isLocal()(Code) | | Checks if psadmin is connecting a remote PAS.
This method does not throw exception in case of error, it will
return true and assume the cacao server is running on the
local host.
|
setOutput | protected void setOutput()(Code) | | If output option is set, set output to the file, otherwise set
output to standard output.
|
validateInstance | protected void validateInstance() throws CommandException(Code) | | Validates the instance option.
exception: CLIException - If the psConfig option is not presented or if theformat is invalid |
validateNonSRACommand | protected void validateNonSRACommand() throws CommandException(Code) | | Validate the non-sra commands.
If a system has only SRA installed, then only sra, logger, or
monitoring commands can be executed. If the user attempt to
execute any other commands, throws exception.
exception: CLIException - |
validateOptions | public boolean validateOptions() throws CommandValidationException(Code) | | |
validatePassword | protected void validatePassword() throws CommandException(Code) | | Loads and validates the passwords from the password file.
This method will read the password from the password file. The
password should be specified as the following syntax:
PSADMIN_PASSWORD=
exception: CLIException - If password file is not presented,is not existed, or is not readable. |
validatePortalId | protected void validatePortalId() throws CommandException(Code) | | Validates the portal-id option.
exception: CLIException - If the psConfig option is not presented or if theformat is invalid |
validatePortalUri | protected void validatePortalUri() throws CommandException(Code) | | Validates the portal-id option.
exception: CLIException - If the psConfig option is not presented or if theformat is invalid |
validateSRACommand | protected void validateSRACommand() throws CommandException(Code) | | Validate the sra commands.
If a system does not has SRA installed, and the user attempt to
execute a sra command, throws exception.
exception: CLIException - |
validateSearchServerID | protected void validateSearchServerID() throws CommandException(Code) | | Validates the searchserver-id option.
exception: CLIException - If the psConfig option is not presented or if theformat is invalid |
|
|