Class WebLogic9x10x103x12xConfigXmlInstalledLocalDeployer

  • All Implemented Interfaces:
    Deployer, Loggable

    public class WebLogic9x10x103x12xConfigXmlInstalledLocalDeployer
    extends AbstractInstalledLocalDeployer
    Static deployer that manages deployment configuration by manipulating the WebLogic config.xml file.
    • Constructor Detail

      • WebLogic9x10x103x12xConfigXmlInstalledLocalDeployer

        public WebLogic9x10x103x12xConfigXmlInstalledLocalDeployer​(InstalledLocalContainer container)
        Parameters:
        container - container to configure
    • Method Detail

      • readConfigXml

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

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

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

        protected String getDomainHome()
        get the DOMAIN_HOME of the server.
        Returns:
        location to find files like config.xml
      • deploy

        public void deploy​(Deployable deployable)
        Deploy a Deployable to the running container and make it available for requests. deploys files by adding their configuration to the config.xml file of the WebLogic server.
        Specified by:
        deploy in interface Deployer
        Overrides:
        deploy in class AbstractDeployer
        Parameters:
        deployable - the Deployable to deploy
      • undeploy

        public void undeploy​(Deployable deployable)
        Undeploy a Deployable from the running container. The service becomes unavailable for requests. undeploys files by removing their configuration to the config.xml file of the WebLogic server.
        Specified by:
        undeploy in interface Deployer
        Overrides:
        undeploy in class AbstractDeployer
        Parameters:
        deployable - the Deployable to undeploy
      • removeDeployableFromDomain

        protected void removeDeployableFromDomain​(Deployable deployable,
                                                  Element domain)
        Remove the corresponding app-deployment element from the domain of the WebLogic server.
        Parameters:
        deployable - - application component to remove
        domain - - Domain element of the WebLogic server
      • selectAppDeployments

        protected List<Element> selectAppDeployments​(Deployable deployable,
                                                     Element domain)
        this will select the node(s) that match the below deployment.
        Parameters:
        deployable - what to search for
        domain - root element to search in
        Returns:
        list of child elements that match the deployment
      • addDeployableToDomain

        protected void addDeployableToDomain​(Deployable deployable,
                                             Element domain)
        Create and insert an app-deployment element into the domain of the WebLogic server. Ensure that schema ordering is correct.
        Parameters:
        deployable - - application component to configure
        domain - - Domain element of the WebLogic server
      • createElementForDeployableInDomain

        protected Element createElementForDeployableInDomain​(Deployable deployable,
                                                             Element domain)
        create the config.xml element representing the Deployable. In WebLogic 9x, this is the element app-deployment.
        Parameters:
        deployable - to configure
        domain - root element of the config.xml file
        Returns:
        app-deployment element
      • reorderAppDeploymentsAfterConfigurationVersion

        protected void reorderAppDeploymentsAfterConfigurationVersion​(Element domain)
        Per current schema of the weblogic domain, app-deployment elements need to come directly after the configuration-version element.
        Parameters:
        domain - - domain to re-order
      • createIdForDeployable

        protected String createIdForDeployable​(Deployable deployable)
        Get a string name for the configuration of this deployable. This should be XML friendly. For example, the String returned will have no slashes or colons, and be as short as possible.
        Parameters:
        deployable - used to construct the id
        Returns:
        a string that can be used to name this configuration
      • createIdFromFileName

        protected String createIdFromFileName​(Deployable deployable)
        Get a string name for the configuration of this deployable based on its filename.
        Parameters:
        deployable - used to construct the id
        Returns:
        a string that can be used to name this configuration
      • getServerName

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