Class WebLogic9x10x12x14xConfigXmlInstalledLocalDeployer
- java.lang.Object
-
- org.codehaus.cargo.util.log.LoggedObject
-
- org.codehaus.cargo.container.spi.deployer.AbstractDeployer
-
- org.codehaus.cargo.container.spi.deployer.AbstractLocalDeployer
-
- org.codehaus.cargo.container.spi.deployer.AbstractInstalledLocalDeployer
-
- org.codehaus.cargo.container.weblogic.WebLogic9x10x12x14xConfigXmlInstalledLocalDeployer
-
public class WebLogic9x10x12x14xConfigXmlInstalledLocalDeployer extends AbstractInstalledLocalDeployer
Static deployer that manages deployment configuration by manipulating the WebLogic config.xml file.
-
-
Constructor Summary
Constructors Constructor Description WebLogic9x10x12x14xConfigXmlInstalledLocalDeployer(InstalledLocalContainer container)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddDeployableToDomain(Deployable deployable, Element domain)Create and insert an app-deployment element into the domain of the WebLogic server.protected ElementcreateElementForDeployableInDomain(Deployable deployable, Element domain)create the config.xml element representing the Deployable.protected StringcreateIdForDeployable(Deployable deployable)Get a string name for the configuration of this deployable.voiddeploy(Deployable deployable)Deploy aDeployableto the running container and make it available for requests.protected StringgetConfigXmlPath()Return the absolute path of the config.xml file.protected StringgetDomainHome()get the DOMAIN_HOME of the server.protected StringgetServerName()return the running server's name.DocumentreadConfigXml()read the domain's config.xml file into a Document.protected voidremoveDeployableFromDomain(Deployable deployable, Element domain)Remove the corresponding app-deployment element from the domain of the WebLogic server.protected voidreorderAppDeploymentsAfterConfigurationVersion(Element domain)Per current schema of the weblogic domain, app-deployment elements need to come directly after the configuration-version element.protected List<Element>selectAppDeployments(Deployable deployable, Element domain)this will select the node(s) that match the below deployment.voidundeploy(Deployable deployable)Undeploy aDeployablefrom the running container.voidwriteConfigXml(Document configXml)write the domain's config.xml to disk.-
Methods inherited from class org.codehaus.cargo.container.spi.deployer.AbstractInstalledLocalDeployer
getType
-
Methods inherited from class org.codehaus.cargo.container.spi.deployer.AbstractLocalDeployer
getContainer, getFileHandler
-
Methods inherited from class org.codehaus.cargo.container.spi.deployer.AbstractDeployer
deploy, deploy, redeploy, redeploy, redeploy, start, start, stop, stop, undeploy
-
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger, setLogger
-
-
-
-
Constructor Detail
-
WebLogic9x10x12x14xConfigXmlInstalledLocalDeployer
public WebLogic9x10x12x14xConfigXmlInstalledLocalDeployer(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 aDeployableto 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:
deployin interfaceDeployer- Overrides:
deployin classAbstractDeployer- Parameters:
deployable- theDeployableto deploy
-
undeploy
public void undeploy(Deployable deployable)
Undeploy aDeployablefrom 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:
undeployin interfaceDeployer- Overrides:
undeployin classAbstractDeployer- Parameters:
deployable- theDeployableto 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 removedomain- - 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 fordomain- 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 configuredomain- - 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 configuredomain- 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
-
getServerName
protected String getServerName()
return the running server's name.- Returns:
- the WebLogic server's name
-
-