Class RepositoryConfig
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<String,Object>
-
- com.sun.enterprise.admin.servermgmt.RepositoryConfig
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,Object>
- Direct Known Subclasses:
DomainConfig
public class RepositoryConfig extends HashMap<String,Object>
This class represents a repository configuration.A repository can be either a domain, a node agent, or a server instance. Configuration specific to each (DomainConfig, AgentConfig, InstanceConfig) is derived from this class. A repository config consists of the following attributes:
- repositoryName -- domain or node agent name (e.g. domain1 or agent1)
- repositoryRoot -- the parent directory of the repository (e.g. $installDir/domains or $installDir/agents)
- instanceName -- the optional server instance name (e.g. server1)
- configurationName -- the optional configuration name of the server instance (e.g. default-config).
- For a domain: (domainRootDirectory, domainName, null, null) e.g. ("/sun/appserver/domains", "domain1", null, null)
- For a node agent: (agentRootDirectory, agentName, "agent", null) e.g ("/sun/appserver/agents", "agent1", "agent", null). Note that the instance name of a node agent is always the literal string "agent".
- For a server instance (agentRootDirectory, agentName, instanceName, configName) e.g. ("/sun/appserver/agents", "agent1", "server1", "default-config")
- com.sun.aas.installRoot -- installation root directory stored under the K_INSTALL_ROOT key.
- com.sun.aas.configRoot -- configuration root (for locating asenv.conf) stored under the K_CONFIG_ROOT key.
- Since:
- August 19, 2003, 1:59 PM
- Author:
- kebbs
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static String
K_CONFIG_ROOT
static String
K_INSTALL_ROOT
static String
K_REFRESH_CONFIG_CONTEXT
-
Constructor Summary
Constructors Constructor Description RepositoryConfig()
Creates a RepositoryConfig based off the instance root propertyRepositoryConfig(String instanceRootString)
Creates a new instance of RepositoryConfig defined using the system property com.sun.aas.instanceRoot.It is assumed that this system property is a directory of the form: <repositoryRootDirectory>/<repositoryName>/<instanceName>RepositoryConfig(String repositoryName, String repositoryRoot)
Creates a RepositoryConfig for a domainRepositoryConfig(String repositoryName, String repositoryRoot, String instanceName)
Creates a RepositoryConfig for a node agentRepositoryConfig(String repositoryName, String repositoryRoot, String instanceName, String configName)
Creates a new instance of RepositoryConfig The K_INSTALL_ROOT and K_CONFIG_ROOT attributes are implicitly set
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getConfigRoot()
String
getConfigurationName()
String
getDisplayName()
protected String
getFilePath(String propertyName)
String
getInstallRoot()
String
getInstanceName()
Boolean
getRefreshConfigContext()
String
getRepositoryName()
String
getRepositoryRoot()
void
setConfigurationName(String configurationName)
void
setInstanceName(String instanceName)
void
setRefreshConfingContext(boolean refresh)
protected void
setRepositoryRoot(String repositoryRoot)
String
toString()
-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode
-
-
-
-
Field Detail
-
K_INSTALL_ROOT
public static final String K_INSTALL_ROOT
- See Also:
- Constant Field Values
-
K_CONFIG_ROOT
public static final String K_CONFIG_ROOT
- See Also:
- Constant Field Values
-
K_REFRESH_CONFIG_CONTEXT
public static final String K_REFRESH_CONFIG_CONTEXT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RepositoryConfig
public RepositoryConfig(String repositoryName, String repositoryRoot, String instanceName, String configName)
Creates a new instance of RepositoryConfig The K_INSTALL_ROOT and K_CONFIG_ROOT attributes are implicitly set- Parameters:
repositoryName
- Name of the domain or node agent. Cannot be null.repositoryRoot
- Root directory where the domain or node agent resides. Cannot be nullinstanceName
- Name of the server instance. May be nullconfigName
- Name of the configuration. May be null
-
RepositoryConfig
public RepositoryConfig(String repositoryName, String repositoryRoot, String instanceName)
Creates a RepositoryConfig for a node agent- Parameters:
repositoryName
- Name of the domain or node agent.repositoryRoot
- Root directory where the domain or node agent resides.instanceName
- Name of the server instance.
-
RepositoryConfig
public RepositoryConfig(String repositoryName, String repositoryRoot)
Creates a RepositoryConfig for a domain- Parameters:
repositoryName
- Name of the domain or node agent.repositoryRoot
- Root directory where the domain or node agent resides.
-
RepositoryConfig
public RepositoryConfig()
Creates a RepositoryConfig based off the instance root property- See Also:
RepositoryConfig(java.lang.String)
-
RepositoryConfig
public RepositoryConfig(String instanceRootString)
Creates a new instance of RepositoryConfig defined using the system property com.sun.aas.instanceRoot.It is assumed that this system property is a directory of the form: <repositoryRootDirectory>/<repositoryName>/<instanceName>- Parameters:
instanceRootString
-
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toString
in classAbstractMap<String,Object>
-
setConfigurationName
public void setConfigurationName(String configurationName)
-
getConfigurationName
public String getConfigurationName()
-
getDisplayName
public String getDisplayName()
-
setInstanceName
public void setInstanceName(String instanceName)
-
getInstanceName
public String getInstanceName()
-
getRepositoryName
public String getRepositoryName()
-
setRepositoryRoot
protected void setRepositoryRoot(String repositoryRoot)
-
getRepositoryRoot
public String getRepositoryRoot()
-
getInstallRoot
public String getInstallRoot()
-
getConfigRoot
public String getConfigRoot()
-
getRefreshConfigContext
public Boolean getRefreshConfigContext()
-
setRefreshConfingContext
public void setRefreshConfingContext(boolean refresh)
-
-