com.sun.enterprise.admin.servermgmt.pe
Class PEDomainsManager

java.lang.Object
  extended by com.sun.enterprise.admin.servermgmt.KeystoreManager
      extended by com.sun.enterprise.admin.servermgmt.MasterPasswordFileManager
          extended by com.sun.enterprise.admin.servermgmt.RepositoryManager
              extended by com.sun.enterprise.admin.servermgmt.pe.PEDomainsManager
All Implemented Interfaces:
DomainsManager

public class PEDomainsManager
extends RepositoryManager
implements DomainsManager


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.enterprise.admin.servermgmt.RepositoryManager
RepositoryManager.RepositoryManagerMessages
 
Nested classes/interfaces inherited from class com.sun.enterprise.admin.servermgmt.KeystoreManager
KeystoreManager.KeytoolExecutor
 
Field Summary
static String PROFILEPROPERTY_DOMAINXML_STYLESHEETS
           
static String PROFILEPROPERTY_DOMAINXML_TOKENVALUES
           
 
Fields inherited from class com.sun.enterprise.admin.servermgmt.RepositoryManager
_messages, CERTUTIL_CMD, DEBUG, NEW_LINE
 
Fields inherited from class com.sun.enterprise.admin.servermgmt.KeystoreManager
_fileLayout, CERTIFICATE_ALIAS, DEFAULT_MASTER_PASSWORD, INSTANCE_SECURE_ADMIN_ALIAS
 
Constructor Summary
PEDomainsManager()
           
 
Method Summary
 void changeMasterPassword(DomainConfig config)
          Changes the master password for the domain
protected  void createAppClientContainerXml(DomainConfig domainConfig)
           
protected  void createDefaultWebXml(DomainConfig domainConfig)
           
 void createDomain(DomainConfig domainConfig)
          Creates a domain
protected  void createDomainXml(DomainConfig domainConfig)
           
protected  void createDomainXmlEvents(DomainConfig domainConfig)
           
protected  void createIndexFile(DomainConfig domainConfig)
           
protected  void createJBIInstance(String instanceName, DomainConfig domainConfig)
           
protected  void createLoggingProperties(DomainConfig domainConfig)
           
protected  void createLoginConf(RepositoryConfig config)
           
protected  void createScripts(DomainConfig domainConfig)
           
protected  void createWssServerConfig(RepositoryConfig config)
           
protected  void createWssServerConfigOld(RepositoryConfig config)
           
 void deleteDomain(DomainConfig domainConfig)
          Deletes a domain identified by the given name.
protected  File getDomainDir(DomainConfig domainConfig)
           
 BitSet getDomainFlags()
          In SE/EE we need an admin user/password that the DAS can use to authenticate to Node Agents and servers in the domain.
protected static String getDomainPasswordClear(DomainConfig domainConfig)
          Returns the domain user's password in cleartext from the domainConfig.
protected  File getDomainRoot(DomainConfig domainConfig)
           
protected static String getDomainUser(DomainConfig domainConfig)
          Returns the domain user from the domainConfig.
protected  TokenValueSet getDomainXmlTokens(DomainConfig domainConfig)
          The EEDomains manager needs to have an augmented set of tokens
 String[] getExtraPasswordOptions(DomainConfig config)
          SE/EE supports NSS as its native SSL database.
protected static String getMasterPasswordClear(DomainConfig domainConfig)
           
protected static String getNewMasterPasswordClear(DomainConfig domainConfig)
           
 String[] listDomains(DomainConfig domainConfig)
          Lists all the domains.
protected static boolean saveMasterPassword(DomainConfig domainConfig)
           
protected  void setPermissions(DomainConfig domainConfig)
          Sets the permissions for the domain directory, its config directory, startserv/stopserv scripts etc.
 void validateDomain(DomainConfig domainConfig, boolean domainExists)
          Changes the master password for the domain
 void validateMasterPassword(DomainConfig domainConfig)
           
 
Methods inherited from class com.sun.enterprise.admin.servermgmt.RepositoryManager
changePasswordAliasKeystorePassword, checkRepository, checkRepository, checkRepository, createAdminKeyFile, createHttpBCInstallRoot, createJavaEESEInstallRoot, createJBIInstance, createKeyFile, createMQInstance, createPasswordAliasKeystore, createServerPolicyFile, createTimerDbn, createTimerWal, createWSDLSLInstallRoot, deleteRepository, deleteRepository, generateFromTemplate, getClearPasswordForAlias, getConfigForRepositoryStatus, getInteractiveOptions, getMessages, getRepositoryDir, getRepositoryRootDir, handleDerby, isNSSSupportAvailable, isValidRepository, isValidRepository, listRepository, repositoryExists, setMessages, setPermissions, validateMasterPassword
 
Methods inherited from class com.sun.enterprise.admin.servermgmt.MasterPasswordFileManager
changeMasterPasswordInMasterPasswordFile, createMasterPasswordFile, deleteMasterPasswordFile, readMasterPasswordFile
 
Methods inherited from class com.sun.enterprise.admin.servermgmt.KeystoreManager
changeKeystorePassword, changeS1ASAliasPassword, changeSSLCertificateDatabasePassword, chmod, createKeyStore, createSSLCertificateDatabase, createTrustStore, getCertificateDN, getDASCertDN, getFileLayout, getInstanceCertDN
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROFILEPROPERTY_DOMAINXML_STYLESHEETS

public static final String PROFILEPROPERTY_DOMAINXML_STYLESHEETS
See Also:
Constant Field Values

PROFILEPROPERTY_DOMAINXML_TOKENVALUES

public static final String PROFILEPROPERTY_DOMAINXML_TOKENVALUES
See Also:
Constant Field Values
Constructor Detail

PEDomainsManager

public PEDomainsManager()
Method Detail

getDomainFlags

public BitSet getDomainFlags()
Description copied from interface: DomainsManager
In SE/EE we need an admin user/password that the DAS can use to authenticate to Node Agents and servers in the domain. This is not the case in PE; hence this flag -- DomainConfig.K_FLAG_START_DOMAIN_NEEDS_ADMIN_USER In SE/EE we need an extra non secure http port to host the Lockhart components which is controlled by -- DomainConfig.K_FLAG_CREATE_DOMAIN_NEEDS_ALTERNATE_ADMIN_PORT

Specified by:
getDomainFlags in interface DomainsManager
Returns:
flags toggling SE/EE specific behavior.

validateDomain

public void validateDomain(DomainConfig domainConfig,
                           boolean domainExists)
                    throws DomainException
Description copied from interface: DomainsManager
Changes the master password for the domain

Specified by:
validateDomain in interface DomainsManager
Throws:
DomainException

validateMasterPassword

public void validateMasterPassword(DomainConfig domainConfig)
                            throws DomainException
Specified by:
validateMasterPassword in interface DomainsManager
Throws:
DomainException

createDomain

public void createDomain(DomainConfig domainConfig)
                  throws DomainException
Description copied from interface: DomainsManager
Creates a domain

Specified by:
createDomain in interface DomainsManager
Parameters:
domainConfig - The configuration params that are required to create the domain. (eg :- domain admin port, http port, default locale, domain root, install root etc.) The relevant keys are defined in DomainConfig. The implementors of this class should validate the values that are supplied.
Throws:
DomainException - This exception is thrown if - the domain already exists. - an invalid or insufficient config. is supplied. - an exception occurred during domain creation.

createJBIInstance

protected void createJBIInstance(String instanceName,
                                 DomainConfig domainConfig)
                          throws DomainException
Throws:
DomainException

setPermissions

protected void setPermissions(DomainConfig domainConfig)
                       throws DomainException
Sets the permissions for the domain directory, its config directory, startserv/stopserv scripts etc.

Throws:
DomainException

deleteDomain

public void deleteDomain(DomainConfig domainConfig)
                  throws DomainException
Description copied from interface: DomainsManager
Deletes a domain identified by the given name. (Should we stop the DAS and instances administered by this domain before deleting the domain?)

Specified by:
deleteDomain in interface DomainsManager
Throws:
DomainException - This exception is thrown if
    - the domain doesnot exist. - an exception occurred while deleting the domain.

listDomains

public String[] listDomains(DomainConfig domainConfig)
                     throws DomainException
Lists all the domains.

Specified by:
listDomains in interface DomainsManager
Throws:
DomainException

createDomainXmlEvents

protected void createDomainXmlEvents(DomainConfig domainConfig)
                              throws DomainException
Throws:
DomainException

getDomainXmlTokens

protected TokenValueSet getDomainXmlTokens(DomainConfig domainConfig)
The EEDomains manager needs to have an augmented set of tokens


createDomainXml

protected void createDomainXml(DomainConfig domainConfig)
                        throws DomainException
Throws:
DomainException

createScripts

protected void createScripts(DomainConfig domainConfig)
                      throws DomainException
Throws:
DomainException

createAppClientContainerXml

protected void createAppClientContainerXml(DomainConfig domainConfig)
                                    throws DomainException
Throws:
DomainException

createIndexFile

protected void createIndexFile(DomainConfig domainConfig)
                        throws DomainException
Throws:
DomainException

createLoggingProperties

protected void createLoggingProperties(DomainConfig domainConfig)
                                throws DomainException
Throws:
DomainException

createDefaultWebXml

protected void createDefaultWebXml(DomainConfig domainConfig)
                            throws DomainException
Throws:
DomainException

createLoginConf

protected void createLoginConf(RepositoryConfig config)
                        throws DomainException
Throws:
DomainException

createWssServerConfigOld

protected void createWssServerConfigOld(RepositoryConfig config)
                                 throws DomainException
Throws:
DomainException

createWssServerConfig

protected void createWssServerConfig(RepositoryConfig config)
                              throws DomainException
Throws:
DomainException

getDomainDir

protected File getDomainDir(DomainConfig domainConfig)

getDomainRoot

protected File getDomainRoot(DomainConfig domainConfig)

getDomainUser

protected static String getDomainUser(DomainConfig domainConfig)
Returns the domain user from the domainConfig.

Parameters:
domainConfig - that represents the domain configuration
Returns:
String representing the domain user if the given map contains it, null otherwise

getDomainPasswordClear

protected static String getDomainPasswordClear(DomainConfig domainConfig)
Returns the domain user's password in cleartext from the domainConfig.

Parameters:
domainConfig - that represents the domain configuration
Returns:
String representing the domain user password if the given map contains it, null otherwise

getMasterPasswordClear

protected static String getMasterPasswordClear(DomainConfig domainConfig)

getNewMasterPasswordClear

protected static String getNewMasterPasswordClear(DomainConfig domainConfig)

saveMasterPassword

protected static boolean saveMasterPassword(DomainConfig domainConfig)

changeMasterPassword

public void changeMasterPassword(DomainConfig config)
                          throws DomainException
Changes the master password for the domain

Throws:
DomainException

getExtraPasswordOptions

public String[] getExtraPasswordOptions(DomainConfig config)
                                 throws DomainException
Description copied from interface: DomainsManager
SE/EE supports NSS as its native SSL database. NSS is capable of supporting multiple slots (e.g. for different SSL hardware devices, smartcards, etc). Each device needs a specific password which the CLI must prompt for.

Specified by:
getExtraPasswordOptions in interface DomainsManager
Throws:
DomainException


Copyright © 2012 GlassFish Community. All Rights Reserved.