Class 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:

    1. repositoryName -- domain or node agent name (e.g. domain1 or agent1)
    2. repositoryRoot -- the parent directory of the repository (e.g. $installDir/domains or $installDir/agents)
    3. instanceName -- the optional server instance name (e.g. server1)
    4. configurationName -- the optional configuration name of the server instance (e.g. default-config).
    Using (repositoryName, repositoryRoot, instanceName, configurationName) syntax. Here are the following permutations:
    1. For a domain: (domainRootDirectory, domainName, null, null) e.g. ("/sun/appserver/domains", "domain1", null, null)
    2. 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".
    3. For a server instance (agentRootDirectory, agentName, instanceName, configName) e.g. ("/sun/appserver/agents", "agent1", "server1", "default-config")
    The RepositoryConfig class is an extensible HashMap that can contain any attributes, but also relies on two system properties being set:
    1. com.sun.aas.installRoot -- installation root directory stored under the K_INSTALL_ROOT key.
    2. 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
    • 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 null
        instanceName - Name of the server instance. May be null
        configName - 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​(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

      • getFilePath

        protected String getFilePath​(String propertyName)
      • 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)