org.codehaus.cargo.container.weblogic
Class WebLogicStandaloneLocalConfiguration

java.lang.Object
  extended by org.codehaus.cargo.util.log.LoggedObject
      extended by org.codehaus.cargo.container.spi.configuration.AbstractConfiguration
          extended by org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration
              extended by org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration
                  extended by org.codehaus.cargo.container.spi.configuration.builder.AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
                      extended by org.codehaus.cargo.container.weblogic.WebLogicStandaloneLocalConfiguration
All Implemented Interfaces:
Configuration, DataSourceSupport, ResourceSupport, LocalConfiguration, StandaloneLocalConfiguration, ContainerConfiguration, WebLogicConfiguration, Loggable

public class WebLogicStandaloneLocalConfiguration
extends AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
implements WebLogicConfiguration

WebLogic standalone ContainerConfiguration implementation.

Version:
$Id: WebLogicStandaloneLocalConfiguration.java 1892 2009-02-13 15:43:12Z adriancole $

Field Summary
 
Fields inherited from class org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration
RESOURCE_PATH
 
Constructor Summary
WebLogicStandaloneLocalConfiguration(String dir)
          
 
Method Summary
protected  ConfigurationBuilder createConfigurationBuilder(LocalContainer container)
          
protected  void deployCargoPing(WebLogicLocalContainer container)
          Deploy the Cargo Ping utility to the container.
protected  void doConfigure(LocalContainer container)
          Implementation of LocalConfiguration.configure(LocalContainer) that all local configuration using this class must implement.
 ConfigurationCapability getCapability()
          
 String getDomainHome()
          The DOMAIN_HOME holds the configuration and runtime files of a WebLogic domain.
protected  Map getNamespaces()
          Implementations should avoid passing null, and instead pass Collections.EMPTY_MAP, if the document is DTD bound.
protected  String getOrCreateDataSourceConfigurationFile(DataSource ds, LocalContainer container)
          note that this file could hold other configuration besides datasources.
protected  String getOrCreateResourceConfigurationFile(Resource resource, LocalContainer container)
          note that this file could hold other configuration besides Resources.
protected  String getXpathForDataSourcesParent()
          DataSource entries must be stored in the xml configuration file.
protected  String getXpathForResourcesParent()
          Resource entries must be stored in the xml configuration file.
 String toString()
          
 
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
configureFiles, createFilterChain, getDestDirectoryLocation, getDestFileLocation, getFileProperties, getFilterChain, getType, setConfigFileProperty, setFileProperty, setupConfigurationDir, verify
 
Methods inherited from class org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration
addDataSource, addDataSourcesFromProperties, addDeployable, addResource, addResourcesFromProperties, collectUnsupportedDataSourcesAndThrowException, collectUnsupportedResourcesAndThrowException, getAntUtils, getDataSources, getDeployables, getFileHandler, getHome, getResources, getResourceUtils, parsePropertiesForPendingConfiguration, setFileHandler
 
Methods inherited from class org.codehaus.cargo.container.spi.configuration.AbstractConfiguration
getProperties, getPropertyValue, setProperty
 
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger, setLogger
 
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.LocalConfiguration
addDeployable, addResource, getDeployables, getFileHandler, getHome, getResources, setFileHandler
 
Methods inherited from interface org.codehaus.cargo.container.configuration.Configuration
getProperties, getPropertyValue, setProperty
 
Methods inherited from interface org.codehaus.cargo.util.log.Loggable
getLogger, setLogger
 

Constructor Detail

WebLogicStandaloneLocalConfiguration

public WebLogicStandaloneLocalConfiguration(String dir)

See Also:
AbstractStandaloneLocalConfiguration#AbstractStandaloneLocalConfiguration(String)
Method Detail

getCapability

public ConfigurationCapability getCapability()

Specified by:
getCapability in interface Configuration
Returns:
the ConfigurationCapability of the configuration in term of properties it supports, etc
See Also:
Configuration.getCapability()

doConfigure

protected void doConfigure(LocalContainer container)
                    throws Exception
Implementation of LocalConfiguration.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:
doConfigure in class AbstractLocalConfiguration
Parameters:
container - the container to configure
Throws:
Exception - if any error is raised during the configuration
See Also:
AbstractStandaloneLocalConfiguration#toConfigurationEntry(LocalContainer)

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

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()

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()
DataSource entries must be stored in the xml configuration file. Under which element do we insert the entries? example: //Engine/DefaultContext

Specified by:
getXpathForDataSourcesParent in class AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
Returns:
path the the parent element datasources should be inserted under.

getNamespaces

protected Map getNamespaces()
Implementations should avoid passing null, and instead pass Collections.EMPTY_MAP, if the document is DTD bound. WebLogic 8.x application servers currently use DTD, and therefore return and empty map;

Specified by:
getNamespaces in class AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
Returns:
a map of prefixes to the url namespaces used in the datasource configuration file.

createConfigurationBuilder

protected ConfigurationBuilder createConfigurationBuilder(LocalContainer container)

Specified by:
createConfigurationBuilder in class AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
Parameters:
container - Container the dataSource will be configured on.
Returns:
the object that produces xml entries for DataSource definitions.
See Also:
WebLogic8xConfigurationBuilder

getOrCreateDataSourceConfigurationFile

protected String getOrCreateDataSourceConfigurationFile(DataSource ds,
                                                        LocalContainer container)
note that this file could hold other configuration besides datasources.

Specified by:
getOrCreateDataSourceConfigurationFile in class AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
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.

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:
getOrCreateResourceConfigurationFile in class AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
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:
getXpathForResourcesParent in class AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
Returns:
path the the parent element Resources should be inserted under.


Copyright © 2004-2012 Codehaus. All Rights Reserved.