Class PEDomainsManager
- java.lang.Object
-
- com.sun.enterprise.admin.servermgmt.KeystoreManager
-
- com.sun.enterprise.admin.servermgmt.MasterPasswordFileManager
-
- com.sun.enterprise.admin.servermgmt.RepositoryManager
-
- 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
Fields Modifier and Type Field Description static String
PROFILEPROPERTY_DOMAINXML_STYLESHEETS
static String
PROFILEPROPERTY_DOMAINXML_TOKENVALUES
-
Fields inherited from class com.sun.enterprise.admin.servermgmt.RepositoryManager
CERTUTIL_CMD, DEBUG, messages, NEW_LINE
-
Fields inherited from class com.sun.enterprise.admin.servermgmt.KeystoreManager
_fileLayout, CERTIFICATE_ALIAS, DEFAULT_MASTER_PASSWORD, INSTANCE_SECURE_ADMIN_ALIAS
-
-
Constructor Summary
Constructors Constructor Description PEDomainsManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changeMasterPassword(DomainConfig config)
Changes the master password for the domainprotected void
createJBIInstance(String instanceName, DomainConfig domainConfig)
protected void
createScripts(DomainConfig domainConfig)
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.String[]
getExtraPasswordOptions(DomainConfig config)
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.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)
void
validateDomain(DomainConfig domainConfig, boolean domainExists)
void
validateMasterPassword(DomainConfig domainConfig)
Checks that the master password in the config is valid for the keystore-
Methods inherited from class com.sun.enterprise.admin.servermgmt.RepositoryManager
changePasswordAliasKeystorePassword, checkRepository, checkRepository, checkRepository, createHttpBCInstallRoot, createJavaEESEInstallRoot, createJBIInstance, createMQInstance, createTimerDbn, createTimerWal, createWSDLSLInstallRoot, deleteRepository, deleteRepository, generateFromTemplate, getClearPasswordForAlias, getConfigForRepositoryStatus, getInteractiveOptions, getMessages, getRepositoryDir, getRepositoryRootDir, isNSSSupportAvailable, isValidRepository, isValidRepository, listRepository, repositoryExists, setMessages, setPermissions, validateMasterPassword
-
Methods inherited from class com.sun.enterprise.admin.servermgmt.MasterPasswordFileManager
changeMasterPasswordInMasterPasswordFile, changeMasterPasswordInMasterPasswordFile, createMasterPasswordFile, deleteMasterPasswordFile, readMasterPasswordFile
-
Methods inherited from class com.sun.enterprise.admin.servermgmt.KeystoreManager
addKeyPair, addKeyPair, changeKeyPassword, changeKeyStorePassword, changeKeyStorePassword, changeKeyStorePassword, changeS1ASAliasPassword, changeSSLCertificateDatabasePassword, chmod, copyCert, copyCertificates, createKeyStore, enforcePasswordComplexity, getCertificateDN, getDASCertDN, getFileLayout, getInstanceCertDN, getInvalidCertificates, getValidCertificates, openKeyStore, readPemCertificateChain, readPlainPKCS8PrivateKey, readPlainPKCS8PrivateKey, saveKeyStore, updateCertificates
-
-
-
-
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
-
-
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 interfaceDomainsManager
- Returns:
- flags toggling SE/EE specific behavior.
-
validateDomain
public void validateDomain(DomainConfig domainConfig, boolean domainExists) throws DomainException
- Specified by:
validateDomain
in interfaceDomainsManager
- Throws:
DomainException
-
validateMasterPassword
public void validateMasterPassword(DomainConfig domainConfig) throws DomainException
Description copied from interface:DomainsManager
Checks that the master password in the config is valid for the keystore- Specified by:
validateMasterPassword
in interfaceDomainsManager
- Parameters:
domainConfig
- the config to get the password from- Throws:
DomainException
- if the password fails to open the keystore
-
createJBIInstance
protected void createJBIInstance(String instanceName, DomainConfig domainConfig) throws DomainException
- 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 interfaceDomainsManager
- Throws:
DomainException
- This exception is thrown if-
- the domain does not exist.
- an exception occurred while deleting the domain.
-
listDomains
public String[] listDomains(DomainConfig domainConfig) throws DomainException
Lists all the domains.- Specified by:
listDomains
in interfaceDomainsManager
- Returns:
- an array of all the domain names
- Throws:
DomainException
- if an exception occured
-
createScripts
protected void createScripts(DomainConfig domainConfig) 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- Specified by:
changeMasterPassword
in interfaceDomainsManager
- Parameters:
config
- the config for the domain to change- 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 interfaceDomainsManager
- Parameters:
config
- the config to get the options from- Returns:
- the extra options
- Throws:
DomainException
- if an error occurred
-
-