Class WebLogic9xStandaloneLocalConfiguration

  • All Implemented Interfaces:
    org.codehaus.cargo.container.configuration.Configuration, org.codehaus.cargo.container.configuration.entry.DataSourceSupport, org.codehaus.cargo.container.configuration.entry.ResourceSupport, org.codehaus.cargo.container.configuration.LocalConfiguration, org.codehaus.cargo.container.configuration.StandaloneLocalConfiguration, org.codehaus.cargo.container.spi.configuration.ContainerConfiguration, WebLogicConfiguration, org.codehaus.cargo.util.log.Loggable
    Direct Known Subclasses:
    WebLogic10xStandaloneLocalConfiguration

    public class WebLogic9xStandaloneLocalConfiguration
    extends org.codehaus.cargo.container.spi.configuration.builder.AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
    implements WebLogicConfiguration
    WebLogic standalone ContainerConfiguration implementation.
    • Field Summary

      • Fields inherited from class org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration

        RESOURCE_PATH
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addDataSourceToDomain​(org.codehaus.cargo.container.configuration.entry.DataSource ds, Element domain)
      Insert the corresponding datasource element into the domain of the WebLogic server.
      protected String buildDataSourceFileName​(org.codehaus.cargo.container.configuration.entry.DataSource ds)
      determines the full path to store the datasource configuration file.
      protected void createBlankDataSourceFile​(String path)
      Create a blank datasource file with correct namespace.
      protected org.codehaus.cargo.container.configuration.builder.ConfigurationBuilder createConfigurationBuilder​(org.codehaus.cargo.container.LocalContainer container)
      protected void deployCargoPing​(WebLogicLocalContainer container)
      Deploy the Cargo Ping utility to the container.
      protected void doConfigure​(org.codehaus.cargo.container.LocalContainer container)
      org.codehaus.cargo.container.configuration.ConfigurationCapability getCapability()
      protected String getConfigXmlPath()
      Return the absolute path of the config.xml file.
      String getDomainHome()
      The DOMAIN_HOME holds the configuration and runtime files of a WebLogic domain.
      protected Map<String,​String> getNamespaces()
      protected String getOrCreateDataSourceConfigurationFile​(org.codehaus.cargo.container.configuration.entry.DataSource ds, org.codehaus.cargo.container.LocalContainer container)
      protected String getOrCreateResourceConfigurationFile​(org.codehaus.cargo.container.configuration.entry.Resource resource, org.codehaus.cargo.container.LocalContainer container)
      This implementation throws an UnsupportedOperationException as Resource configuration is not supported in WebLogic.
      protected String getServerName()
      return the running server's name.
      protected String getXpathForDataSourcesParent()
      protected String getXpathForResourcesParent()
      This implementation throws an UnsupportedOperationException as Resource configuration is not supported in WebLogic.
      protected void linkDataSourceToConfigXml​(org.codehaus.cargo.container.configuration.entry.DataSource ds)
      This will add a reference to an externally defined datasource file into the config.xml file.
      Document readConfigXml()
      read the domain's config.xml file into a Document.
      void setFileHandler​(org.codehaus.cargo.util.FileHandler fileHandler)
      String toString()
      void writeConfigXml​(Document configXml)
      write the domain's config.xml to disk.
      • Methods inherited from class org.codehaus.cargo.container.spi.configuration.builder.AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder

        configure, configure, configure, configureDataSources, configureResources, writeConfigurationToXpath
      • Methods inherited from class org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration

        addXmlReplacement, addXmlReplacement, addXmlReplacement, addXmlReplacement, configureFiles, getType, getXmlReplacements, performXmlReplacements, removeXmlReplacement, removeXmlReplacement, replaceInFile, setupConfigurationDir, verify
      • Methods inherited from class org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration

        addDataSource, addDataSourcesFromProperties, addDeployable, addResource, addResourcesFromProperties, addUser, addUsersFromProperties, applyPortOffset, applyPortOffset, collectUnsupportedDataSourcesAndThrowException, collectUnsupportedResourcesAndThrowException, createFilterChain, flagOffsetApplied, getAntUtils, getDataSources, getDeployables, getDestDirectoryLocation, getDestFileLocation, getFileHandler, getFileProperties, getFilterChain, getHome, getPropertyValue, getResources, getResourceUtils, getUsers, isOffsetApplied, isOffsetApplied, parsePropertiesForPendingConfiguration, revertPortOffset, revertPortOffset, setConfigFileProperty, setFileProperty, setLogger
      • Methods inherited from class org.codehaus.cargo.container.spi.configuration.AbstractConfiguration

        getProperties, setProperty
      • Methods inherited from class org.codehaus.cargo.util.log.LoggedObject

        getLogger
      • Methods inherited from interface org.codehaus.cargo.container.configuration.Configuration

        getProperties, getPropertyValue, setProperty
      • Methods inherited from interface org.codehaus.cargo.container.configuration.LocalConfiguration

        addDataSource, addDeployable, addResource, addUser, applyPortOffset, getDataSources, getDeployables, getFileHandler, getFileProperties, getHome, getResources, getUsers, isOffsetApplied, revertPortOffset, setConfigFileProperty, setFileProperty
      • Methods inherited from interface org.codehaus.cargo.util.log.Loggable

        getLogger, setLogger
    • Constructor Detail

      • WebLogic9xStandaloneLocalConfiguration

        public WebLogic9xStandaloneLocalConfiguration​(String dir)
        See Also:
        AbstractStandaloneLocalConfiguration(String)
    • Method Detail

      • getCapability

        public org.codehaus.cargo.container.configuration.ConfigurationCapability getCapability()
        Specified by:
        getCapability in interface org.codehaus.cargo.container.configuration.Configuration
      • doConfigure

        protected void doConfigure​(org.codehaus.cargo.container.LocalContainer container)
                            throws Exception
        Specified by:
        doConfigure in class org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration
        Throws:
        Exception
      • deployCargoPing

        protected void deployCargoPing​(WebLogicLocalContainer container)
                                throws IOException
        Deploy the Cargo Ping utility to the container.
        Parameters:
        container - the container to configure
        Throws:
        IOException - if the cargo ping deployment fails
      • getDomainHome

        public String getDomainHome()
        The DOMAIN_HOME holds the configuration and runtime files of a WebLogic domain. One or more server processes execute from this directory and must have permissions to write to it.
        Specified by:
        getDomainHome in interface WebLogicConfiguration
        Returns:
        The DOMAIN_HOME, or instance-specific installation of WebLogic
      • getXpathForDataSourcesParent

        protected String getXpathForDataSourcesParent()
        Specified by:
        getXpathForDataSourcesParent in class org.codehaus.cargo.container.spi.configuration.builder.AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
      • getNamespaces

        protected Map<String,​String> getNamespaces()
        Specified by:
        getNamespaces in class org.codehaus.cargo.container.spi.configuration.builder.AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
      • createConfigurationBuilder

        protected org.codehaus.cargo.container.configuration.builder.ConfigurationBuilder createConfigurationBuilder​(org.codehaus.cargo.container.LocalContainer container)
        Specified by:
        createConfigurationBuilder in class org.codehaus.cargo.container.spi.configuration.builder.AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
      • getOrCreateDataSourceConfigurationFile

        protected String getOrCreateDataSourceConfigurationFile​(org.codehaus.cargo.container.configuration.entry.DataSource ds,
                                                                org.codehaus.cargo.container.LocalContainer container)
        Specified by:
        getOrCreateDataSourceConfigurationFile in class org.codehaus.cargo.container.spi.configuration.builder.AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
      • linkDataSourceToConfigXml

        protected void linkDataSourceToConfigXml​(org.codehaus.cargo.container.configuration.entry.DataSource ds)
        This will add a reference to an externally defined datasource file into the config.xml file.
        Parameters:
        ds - - datasource to reference
      • addDataSourceToDomain

        protected void addDataSourceToDomain​(org.codehaus.cargo.container.configuration.entry.DataSource ds,
                                             Element domain)
        Insert the corresponding datasource element into the domain of the WebLogic server.
        Parameters:
        ds - - datasource component to configure
        domain - - Domain element of the WebLogic server
      • getServerName

        protected String getServerName()
        return the running server's name.
        Returns:
        the WebLogic server's name
      • writeConfigXml

        public void writeConfigXml​(Document configXml)
        write the domain's config.xml to disk.
        Parameters:
        configXml - document to write to disk
      • readConfigXml

        public Document readConfigXml()
        read the domain's config.xml file into a Document.
        Returns:
        Document corresponding with config.xml
      • createBlankDataSourceFile

        protected void createBlankDataSourceFile​(String path)
        Create a blank datasource file with correct namespace.
        Parameters:
        path - where to create the base file.
      • getConfigXmlPath

        protected String getConfigXmlPath()
        Return the absolute path of the config.xml file.
        Returns:
        path including config.xml
      • buildDataSourceFileName

        protected String buildDataSourceFileName​(org.codehaus.cargo.container.configuration.entry.DataSource ds)
        determines the full path to store the datasource configuration file.
        Parameters:
        ds - datasource to determine the filename of
        Returns:
        full path to the datasource configuration file
      • setFileHandler

        public void setFileHandler​(org.codehaus.cargo.util.FileHandler fileHandler)
        Specified by:
        setFileHandler in interface org.codehaus.cargo.container.configuration.LocalConfiguration
        Overrides:
        setFileHandler in class org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration
      • getOrCreateResourceConfigurationFile

        protected String getOrCreateResourceConfigurationFile​(org.codehaus.cargo.container.configuration.entry.Resource resource,
                                                              org.codehaus.cargo.container.LocalContainer container)
        This implementation throws an UnsupportedOperationException as Resource configuration is not supported in WebLogic.
        Specified by:
        getOrCreateResourceConfigurationFile in class org.codehaus.cargo.container.spi.configuration.builder.AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
      • getXpathForResourcesParent

        protected String getXpathForResourcesParent()
        This implementation throws an UnsupportedOperationException as Resource configuration is not supported in WebLogic.
        Specified by:
        getXpathForResourcesParent in class org.codehaus.cargo.container.spi.configuration.builder.AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder