public class RepositoryManager extends MasterPasswordFileManager
| Modifier and Type | Class and Description |
|---|---|
protected static class |
RepositoryManager.RepositoryManagerMessages
The RepositoryManagerMessages class is used to abstract out ResourceBundle messages that are specific to a domain,
node-agent, or server instance.
|
KeystoreManager.KeytoolExecutor| Modifier and Type | Field and Description |
|---|---|
protected static String |
CERTUTIL_CMD |
static String |
DEBUG |
protected RepositoryManager.RepositoryManagerMessages |
messages |
protected static String |
NEW_LINE |
_fileLayout, CERTIFICATE_ALIAS, DEFAULT_MASTER_PASSWORD, INSTANCE_SECURE_ADMIN_ALIAS| Constructor and Description |
|---|
RepositoryManager()
Creates a new instance of RepositoryManager
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
changePasswordAliasKeystorePassword(RepositoryConfig config,
String oldPassword,
String newPassword)
Change the password protecting the password alias keystore
|
protected void |
checkRepository(RepositoryConfig config) |
void |
checkRepository(RepositoryConfig config,
boolean existingRepository) |
void |
checkRepository(RepositoryConfig config,
boolean existingRepository,
boolean checkRootDir)
Sanity check on the repository.This is executed prior to create/delete/start/stop.
|
void |
createHttpBCInstallRoot(PEFileLayout layout)
This method is used to create httpsoapbc install root
|
void |
createJavaEESEInstallRoot(PEFileLayout layout)
This method is used to create Java EESE install root
|
protected void |
createJBIInstance(String instanceName,
RepositoryConfig config)
Create JBI instance.
|
protected void |
createMQInstance(RepositoryConfig config)
Create MQ instance.
|
protected void |
createTimerDbn(RepositoryConfig config)
Create the timer database dbn file.
|
protected void |
createTimerWal(RepositoryConfig config)
Create the timer database wal file.
|
void |
createWSDLSLInstallRoot(PEFileLayout layout)
This method is used to create WSDLSL install root
|
protected void |
deleteRepository(RepositoryConfig config)
Deletes the repository (domain, node agent, server instance).
|
protected void |
deleteRepository(RepositoryConfig config,
boolean deleteJMSProvider)
Deletes the repository (domain, node agent, server instance).
|
protected void |
generateFromTemplate(TokenValueSet tokens,
File template,
File destinationFile) |
String |
getClearPasswordForAlias(RepositoryConfig config,
String password,
String alias)
retrieve clear password from password alias keystore
|
protected RepositoryConfig |
getConfigForRepositoryStatus(RepositoryConfig config,
String repository)
Return all repositories (domains, node agents, server instances) and their corresponding status (e.g.running or
stopped) in string form.
|
protected String[] |
getInteractiveOptions(String user,
String password,
String masterPassword,
HashMap<Object,Object> extraPasswords) |
protected RepositoryManager.RepositoryManagerMessages |
getMessages() |
protected File |
getRepositoryDir(RepositoryConfig config) |
protected File |
getRepositoryRootDir(RepositoryConfig config) |
static boolean |
isNSSSupportAvailable()
Determines if the NSS support is available in this installation.
|
protected boolean |
isValidRepository(File f) |
protected boolean |
isValidRepository(RepositoryConfig config) |
protected String[] |
listRepository(RepositoryConfig config)
Return all repositories (domains, node agents, server instances)
|
protected boolean |
repositoryExists(RepositoryConfig config) |
protected void |
setMessages(RepositoryManager.RepositoryManagerMessages messages) |
protected void |
setPermissions(RepositoryConfig repositoryConfig)
Sets the permissions for the domain directory, its config directory, startserv/stopserv scripts etc.
|
void |
validateMasterPassword(RepositoryConfig config,
String password)
We validate the master password by trying to open the password alias keystore.
|
changeMasterPasswordInMasterPasswordFile, changeMasterPasswordInMasterPasswordFile, createMasterPasswordFile, deleteMasterPasswordFile, readMasterPasswordFileaddKeyPair, addKeyPair, changeKeyPassword, changeKeyStorePassword, changeKeyStorePassword, changeKeyStorePassword, changeS1ASAliasPassword, changeSSLCertificateDatabasePassword, chmod, copyCertificates, copyCertificatesFromJdk, createKeyStore, enforcePasswordComplexity, getCertificateDN, getDASCertDN, getFileLayout, getInstanceCertDN, getValidCertificateAliases, openKeyStore, readPemCertificateChain, readPlainPKCS8PrivateKey, readPlainPKCS8PrivateKey, saveKeyStoreprotected static final String CERTUTIL_CMD
protected static final String NEW_LINE
protected RepositoryManager.RepositoryManagerMessages messages
public static final String DEBUG
public RepositoryManager()
protected void setMessages(RepositoryManager.RepositoryManagerMessages messages)
protected RepositoryManager.RepositoryManagerMessages getMessages()
protected void generateFromTemplate(TokenValueSet tokens, File template, File destinationFile) throws IOException
IOExceptionprotected boolean repositoryExists(RepositoryConfig config)
protected boolean isValidRepository(File f)
protected boolean isValidRepository(RepositoryConfig config)
protected File getRepositoryDir(RepositoryConfig config)
protected File getRepositoryRootDir(RepositoryConfig config)
protected void checkRepository(RepositoryConfig config) throws RepositoryException
RepositoryExceptionpublic void checkRepository(RepositoryConfig config, boolean existingRepository) throws RepositoryException
RepositoryExceptionpublic void checkRepository(RepositoryConfig config, boolean existingRepository, boolean checkRootDir) throws RepositoryException
config - The base configurationexistingRepository - true if the domain or instance must exist, false if it must notcheckRootDir - whether to check if the root directory is read/writableRepositoryExceptionprotected void setPermissions(RepositoryConfig repositoryConfig) throws RepositoryException
repositoryConfig - the RepositoryConfig to set permissions forRepositoryException - if unable to set permissionsprotected void deleteRepository(RepositoryConfig config) throws RepositoryException
config - the repository to deleteRepositoryException - if it was unable to delete the repositoryprotected void deleteRepository(RepositoryConfig config, boolean deleteJMSProvider) throws RepositoryException
config - the repository to deletedeleteJMSProvider - if the JMS provider should be deleted as wellRepositoryException - if it failed to delete the repositoryprotected String[] listRepository(RepositoryConfig config) throws RepositoryException
config - the configuration to look inRepositoryExceptionprotected RepositoryConfig getConfigForRepositoryStatus(RepositoryConfig config, String repository)
config - the base RepositoryConfigrepository - the domain or agent namepublic void validateMasterPassword(RepositoryConfig config, String password) throws RepositoryException
config - the RepositoryConfig to check againstpassword - the master password to validateRepositoryException - if the master password failed to validatepublic String getClearPasswordForAlias(RepositoryConfig config, String password, String alias) throws RepositoryException
config - the RepositoryConfig which has the alias keystorepassword - the master passwordalias - for which the clear text password would returnsRepositoryExceptionprotected void changePasswordAliasKeystorePassword(RepositoryConfig config, String oldPassword, String newPassword) throws RepositoryException
config - the config to find the keystore location fromoldPassword - old passwordnewPassword - new passwordRepositoryExceptionprotected void createJBIInstance(String instanceName, RepositoryConfig config) throws RepositoryException
instanceName - the name of the instance to createconfig - the RepositoryConfig to create the JBI instance withinRepositoryException - if an error occured creating the JBI instancepublic void createHttpBCInstallRoot(PEFileLayout layout) throws Exception
layout - PEFileLayoutException - if an error occured creating the filepublic void createJavaEESEInstallRoot(PEFileLayout layout) throws Exception
layout - PEFileLayoutException - IllegalArgumentException if source does not exist,
RuntimeException if the a parent directory of the destination cannot be
created or a IOException if there is an error creating the output file or coping it.public void createWSDLSLInstallRoot(PEFileLayout layout) throws Exception
layout - PEFileLayoutException - if an error occured creating the fileprotected void createMQInstance(RepositoryConfig config)
config - the RepositoryConfig to create the MQ instance withinprotected void createTimerWal(RepositoryConfig config) throws RepositoryException
config - the RepositoryConfig to get the file locations fromRepositoryException - if an error occured creating the fileprotected void createTimerDbn(RepositoryConfig config) throws RepositoryException
config - the RepositoryConfigRepositoryException - if an error occurred creating the fileprotected String[] getInteractiveOptions(String user, String password, String masterPassword, HashMap<Object,Object> extraPasswords)
public static boolean isNSSSupportAvailable()
certutil executable.Copyright © 2019. All rights reserved.