Java Doc for AdminBaseCommand.java in  » Portal » Open-Portal » com » sun » portal » admin » cli » commands » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » Open Portal » com.sun.portal.admin.cli.commands 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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.


Field Summary
final public static  StringATTRIBUTE_LIST_CLASS
    
final public static  StringBOOLEAN_CLASS
    
final public static  StringDISPLAY_TYPE
    
final public static  StringDOMAIN_MBEAN_OBJECT_NAME
    
final public static  StringDOMAIN_RESOURCE_MBEAN_OBJECT_NAME
    
final public static  StringERROR_GET_INSTANCE_HOST
    
final public static  StringFS
    
final public static  StringINSTANCE_MBEAN_OBJECT_NAME
    
final public static  StringINSTANCE_RESOURCE_MBEAN_OBJECT_NAME
    
final public static  StringINTEGER_CLASS
    
final public static  StringINTERACTIVE
    
final public static  StringLIST_CLASS
    
final public static  StringOBJECT_NAME
    
final public static  StringOPERATION
    
final public static  StringPARAMS
    
final public static  StringPARAM_DELIMITER
    
final public static  StringPARAM_TYPES
    
final public static  StringPARAM_VALUE_DELIMITER
    
final public static  StringPAS_SETTINGS_FILE
    
final public static  StringPORTAL_MBEAN_OBJECT_NAME
    
final public static  StringPORTAL_RESOURCE_MBEAN_OBJECT_NAME
    
final public static  StringPRIMITIVE_BOOLEAN_CLASS
    
final public static  StringPROPERTIES_CLASS
    
final public static  StringPROPERTY_DELIMITER
    
final public static  StringPROPERTY_FILE
    
final public static  StringRESOURCE_ID
    
final public static  StringRESOURCE_TYPE
    
final public static  StringRETURN_TYPE
    
final public static  StringSTRING_ARRAY
    
public static  StringcliLogFileName
    
protected  LocalStringsManagercommandLocalStringsManager
    
public static  Loggerlogger
    
public static  StringmbeanLogFileName
    

Constructor Summary
public  AdminBaseCommand()
    

Method Summary
protected  FilecheckForFileExistence(String parent, String fileName)
    
protected  voidcloseMBeanServerConnection()
     Closes the client connection to its server.
protected  PropertiescreatePropertiesParam(String propertyVal)
    
public  ObjectgetAttribute(MBeanServerConnection mbs, ObjectName obj, String attribute)
    
protected  StringgetDomainId()
     Gets the Portal Domain ID.
protected  StringgetHost()
     Gets the host name.
public  SetgetInstanceHosts(MBeanServerConnection msc, String portalId)
     Get all hosts that has portal instances for this portal.
protected  StringgetInstanceId()
     Gets the Portal Server Instance ID.
protected  ListgetInstanceNames(String portalId)
    
protected  StringgetInteractiveOption(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  StringgetLocalizedString(String key)
     This method uses the local LocalStringManager object to get the localized string.
protected  StringgetLocalizedString(String key, Object[] toInsert)
     This method uses the local LocalStringsManager object to get the localized string.
public static  LoggergetLogger()
    
protected  MBeanServerConnectiongetMBeanServerConnection(String id, String pwd, String host)
     Gets the MBeanServerConntection.
protected  ListgetMultiValueFromString(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  ListgetMultiValueOption(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  ObjectNamegetObjectName()
    
protected  StringgetOperationName()
    
protected  PSConfigContextgetPSConfigContext()
     Gets the ps config context.
protected  Object[]getParamsInfo()
    
protected  StringgetPassword()
     Gets the admin user password.
protected  StringgetPortalId()
     Gets the Portal ID.
protected  ListgetPortalNames()
    
protected  StringgetPortalUri()
     Gets the Portal URI.
protected  StringgetReturnType()
    
protected  StringgetSearchServerId()
     Gets the Search Server ID.
protected  ListgetSearchServers()
    
protected  String[]getTypesInfo()
    
protected  StringgetUserId()
     Gets the admin user id.
protected  PropertiesgetWebConfigProp()
     Gets the web configuration properties.
protected  voidhandleReturnValue(Object returnval)
    
protected  booleanhasWebLogicAdminServerInstance(String portalId)
    
protected  booleanisExistingInstance()
     Validates the instance option.
protected  booleanisLocal()
     Checks if psadmin is connecting a remote PAS.
public  voidsetEnvironment(String opt, String value)
    
protected  voidsetOutput()
     If output option is set, set output to the file, otherwise set output to standard output.
protected  voidvalidateInstance()
     Validates the instance option.
protected  voidvalidateNonSRACommand()
     Validate the non-sra commands. If a system has only SRA installed, then only sra, logger, or monitoring commands can be executed.
public  booleanvalidateOptions()
    
protected  voidvalidatePassword()
     Loads and validates the passwords from the password file. This method will read the password from the password file.
protected  voidvalidatePortalId()
     Validates the portal-id option.
protected  voidvalidatePortalUri()
     Validates the portal-id option.
protected  voidvalidateSRACommand()
     Validate the sra commands. If a system does not has SRA installed, and the user attempt to execute a sra command, throws exception.
protected  voidvalidateSearchServerID()
     Validates the searchserver-id option.

Field Detail
ATTRIBUTE_LIST_CLASS
final public static String ATTRIBUTE_LIST_CLASS(Code)



BOOLEAN_CLASS
final public static String BOOLEAN_CLASS(Code)



DISPLAY_TYPE
final public static String DISPLAY_TYPE(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)



FS
final public static String FS(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)



INTEGER_CLASS
final public static String INTEGER_CLASS(Code)



INTERACTIVE
final public static String INTERACTIVE(Code)



LIST_CLASS
final public static String LIST_CLASS(Code)



OBJECT_NAME
final public static String OBJECT_NAME(Code)



OPERATION
final public static String OPERATION(Code)



PARAMS
final public static String PARAMS(Code)



PARAM_DELIMITER
final public static String PARAM_DELIMITER(Code)



PARAM_TYPES
final public static String PARAM_TYPES(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)



PROPERTY_FILE
final public static String PROPERTY_FILE(Code)



RESOURCE_ID
final public static String RESOURCE_ID(Code)



RESOURCE_TYPE
final public static String RESOURCE_TYPE(Code)



RETURN_TYPE
final public static String RETURN_TYPE(Code)



STRING_ARRAY
final public static String STRING_ARRAY(Code)



cliLogFileName
public static String cliLogFileName(Code)



commandLocalStringsManager
protected LocalStringsManager commandLocalStringsManager(Code)



logger
public static Logger logger(Code)



mbeanLogFileName
public static String mbeanLogFileName(Code)




Constructor Detail
AdminBaseCommand
public AdminBaseCommand()(Code)




Method Detail
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



getAttribute
public Object getAttribute(MBeanServerConnection mbs, ObjectName obj, String attribute)(Code)



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.



getInstanceHosts
public Set getInstanceHosts(MBeanServerConnection msc, String portalId) throws CommandException(Code)
Get all hosts that has portal instances for this portal.



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



getLogger
public static Logger getLogger()(Code)



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.



getReturnType
protected String getReturnType()(Code)



getSearchServerId
protected String getSearchServerId()(Code)
Gets the Search Server ID. The Search Server ID.



getSearchServers
protected List getSearchServers() throws CommandException(Code)



getTypesInfo
protected String[] getTypesInfo()(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.



setEnvironment
public void setEnvironment(String opt, String value)(Code)



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



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.