Class WebLogic9xStandaloneLocalConfiguration
- java.lang.Object
 - 
- org.codehaus.cargo.util.log.LoggedObject
 - 
- org.codehaus.cargo.container.spi.configuration.AbstractConfiguration
 - 
- org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration
 - 
- org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration
 - 
- org.codehaus.cargo.container.spi.configuration.builder.AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
 - 
- org.codehaus.cargo.container.weblogic.WebLogic9xStandaloneLocalConfiguration
 
 
 
 
 
 
 
- 
- All Implemented Interfaces:
 Configuration,DataSourceSupport,ResourceSupport,LocalConfiguration,StandaloneLocalConfiguration,ContainerConfiguration,WebLogicConfiguration,Loggable
- Direct Known Subclasses:
 WebLogic10xStandaloneLocalConfiguration
public class WebLogic9xStandaloneLocalConfiguration extends AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder implements WebLogicConfiguration
WebLogic standaloneContainerConfigurationimplementation. 
- 
- 
Field Summary
- 
Fields inherited from class org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration
RESOURCE_PATH 
 - 
 
- 
Constructor Summary
Constructors Constructor Description WebLogic9xStandaloneLocalConfiguration(String dir) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddDataSourceToDomain(DataSource ds, Element domain)Insert the corresponding datasource element into the domain of the WebLogic server.protected StringbuildDataSourceFileName(DataSource ds)determines the full path to store the datasource configuration file.protected voidcreateBlankDataSourceFile(String path)Create a blank datasource file with correct namespace.protected ConfigurationBuildercreateConfigurationBuilder(LocalContainer container)protected voiddeployCargoPing(WebLogicLocalContainer container)Deploy the Cargo Ping utility to the container.protected voiddoConfigure(LocalContainer container)Implementation ofLocalConfiguration.configure(LocalContainer)that all local configuration using this class must implement.ConfigurationCapabilitygetCapability()protected StringgetConfigXmlPath()Return the absolute path of the config.xml file.StringgetDomainHome()The DOMAIN_HOME holds the configuration and runtime files of a WebLogic domain.protected Map<String,String>getNamespaces()Implementations should avoid passing null, and instead passCollections.EMPTY_MAP, if the document is DTD bound.protected StringgetOrCreateDataSourceConfigurationFile(DataSource ds, LocalContainer container)note that this file could hold other configuration besides datasources.protected StringgetOrCreateResourceConfigurationFile(Resource resource, LocalContainer container)note that this file could hold other configuration besides Resources.protected StringgetServerName()return the running server's name.protected StringgetXpathForDataSourcesParent()DataSource entries must be stored in the xml configuration file.protected StringgetXpathForResourcesParent()Resource entries must be stored in the xml configuration file.protected voidlinkDataSourceToConfigXml(DataSource ds)This will add a reference to an externally defined datasource file into the config.xml file.DocumentreadConfigXml()read the domain's config.xml file into a Document.voidsetFileHandler(FileHandler fileHandler)StringtoString()voidwriteConfigXml(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, flagOffsetApplied, getDataSources, getDeployables, getDestDirectoryLocation, getDestFileLocation, getFileHandler, getFileProperties, getHome, getPropertyValue, getReplacements, 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 
- 
Methods inherited from interface org.codehaus.cargo.container.configuration.Configuration
getProperties, getPropertyValue, getType, 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 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
WebLogic9xStandaloneLocalConfiguration
public WebLogic9xStandaloneLocalConfiguration(String dir)
 
 - 
 
- 
Method Detail
- 
getCapability
public ConfigurationCapability getCapability()
- Specified by:
 getCapabilityin interfaceConfiguration- Returns:
 - the 
ConfigurationCapabilityof the configuration in term of properties it supports, etc 
 
- 
doConfigure
protected void doConfigure(LocalContainer container) throws Exception
Implementation ofLocalConfiguration.configure(LocalContainer)that all local configuration using this class must implement. This provides the ability to perform generic actions before and after the container-specific implementation. Another way would be to use AOP...- Specified by:
 doConfigurein classAbstractLocalConfiguration- Parameters:
 container- the container to configure- Throws:
 Exception- if any error is raised during the configuration
 
- 
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:
 getDomainHomein interfaceWebLogicConfiguration- Returns:
 - The DOMAIN_HOME, or instance-specific installation of WebLogic
 
 
- 
getXpathForDataSourcesParent
protected String getXpathForDataSourcesParent()
DataSource entries must be stored in the xml configuration file. Under which element do we insert the entries? example: //Engine/DefaultContext- Specified by:
 getXpathForDataSourcesParentin classAbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder- Returns:
 - path the the parent element datasources should be inserted under.
 
 
- 
getNamespaces
protected Map<String,String> getNamespaces()
Implementations should avoid passing null, and instead passCollections.EMPTY_MAP, if the document is DTD bound.- Specified by:
 getNamespacesin classAbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder- Returns:
 - a map of prefixes to the url namespaces used in the datasource configuration file.
 
 
- 
createConfigurationBuilder
protected ConfigurationBuilder createConfigurationBuilder(LocalContainer container)
- Specified by:
 createConfigurationBuilderin classAbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder- Parameters:
 container- Container the dataSource will be configured on.- Returns:
 - the object that produces xml entries for DataSource definitions.
 
 
- 
getOrCreateDataSourceConfigurationFile
protected String getOrCreateDataSourceConfigurationFile(DataSource ds, LocalContainer container)
note that this file could hold other configuration besides datasources.- Specified by:
 getOrCreateDataSourceConfigurationFilein classAbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder- Parameters:
 ds- the DataSource configuration you wish to install on the container.container- the container whose configuration you wish to affect.- Returns:
 - the file that holds datasource configuration.
 
 
- 
linkDataSourceToConfigXml
protected void linkDataSourceToConfigXml(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(DataSource ds, Element domain)
Insert the corresponding datasource element into the domain of the WebLogic server.- Parameters:
 ds- - datasource component to configuredomain- - 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(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(FileHandler fileHandler)
- Specified by:
 setFileHandlerin interfaceLocalConfiguration- Overrides:
 setFileHandlerin classAbstractLocalConfiguration- Parameters:
 fileHandler- the file utility class to use for performing all file I/O.
 
- 
getOrCreateResourceConfigurationFile
protected String getOrCreateResourceConfigurationFile(Resource resource, LocalContainer container)
note that this file could hold other configuration besides Resources. This implementation throws an UnsupportedOperationException as Resource configuration is not supported in WebLogic.- Specified by:
 getOrCreateResourceConfigurationFilein classAbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder- Parameters:
 resource- the Resource configuration you wish to install on the container.container- the container whose configuration you wish to affect.- Returns:
 - the file that holds Resource configuration.
 
 
- 
getXpathForResourcesParent
protected String getXpathForResourcesParent()
Resource entries must be stored in the xml configuration file. Under which element do we insert the entries? example: //Engine/DefaultContext This implementation throws an UnsupportedOperationException as Resource configuration is not supported in WebLogic.- Specified by:
 getXpathForResourcesParentin classAbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder- Returns:
 - path the the parent element Resources should be inserted under.
 
 
 - 
 
 -