org.codehaus.cargo.container.jboss
Class JBossStandaloneLocalConfiguration

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.jboss.JBossStandaloneLocalConfiguration
All Implemented Interfaces:
Configuration, LocalConfiguration, StandaloneLocalConfiguration, ContainerConfiguration, Loggable
Direct Known Subclasses:
JBoss5xStandaloneLocalConfiguration

public class JBossStandaloneLocalConfiguration
extends AbstractStandaloneLocalConfiguration

Implementation of a standalone Configuration for JBoss 3.x series and JBoss 4.x series.

Version:
$Id: JBossStandaloneLocalConfiguration.java 1746 2008-10-13 09:44:11Z alitokmen $

Field Summary
protected  JBossInstalledLocalContainer jbossContainer
          JBoss container instance.
 
Fields inherited from class org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration
RESOURCE_PATH
 
Constructor Summary
JBossStandaloneLocalConfiguration(String dir)
          
 
Method Summary
protected  void copyExternalResources(File sourceDir, File destDir, String[] cargoFiles)
          Copy external resources to cargo configuration directory.
protected  org.apache.tools.ant.types.FilterChain createJBossFilterChain(JBossInstalledLocalContainer container)
          Create filter to replace token in configuration file with user defined token.
protected  void doConfigure(LocalContainer container)
          Implementation of LocalConfiguration.configure(LocalContainer) that all local configuration using this class must implement.
 ConfigurationCapability getCapability()
          
 JBossInstalledLocalContainer getJbossContainer()
           
 String toString()
          
 void verify()
          Verify that the configuration is valid.
 
Methods inherited from class org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration
configure, configureFiles, createFilterChain, getDestDirectoryLocation, getDestFileLocation, getFileProperties, getFilterChain, getType, setConfigFileProperty, setFileProperty, setupConfigurationDir
 
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
 

Field Detail

jbossContainer

protected JBossInstalledLocalContainer jbossContainer
JBoss container instance.

Constructor Detail

JBossStandaloneLocalConfiguration

public JBossStandaloneLocalConfiguration(String dir)

See Also:
AbstractStandaloneLocalConfiguration.AbstractStandaloneLocalConfiguration(String)
Method Detail

getCapability

public ConfigurationCapability getCapability()

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

getJbossContainer

public JBossInstalledLocalContainer getJbossContainer()
Returns:
Returns the jbossContainer.

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:
AbstractLocalConfiguration.configure(LocalContainer)

verify

public void verify()
Verify that the configuration is valid. The checks to be performed may vay whether this is standalone or existing configuration. This method should also be used to verify that the configuration properties specified by the user are valid and that the required ones are set.

Specified by:
verify in interface ContainerConfiguration
Overrides:
verify in class AbstractStandaloneLocalConfiguration
See Also:
AbstractStandaloneLocalConfiguration.verify()

copyExternalResources

protected void copyExternalResources(File sourceDir,
                                     File destDir,
                                     String[] cargoFiles)
                              throws IOException
Copy external resources to cargo configuration directory. This method will copy entire resources in the sourceDir (recursive), if it's a directory.

Parameters:
sourceDir - resource file / directory to be copied
destDir - cargo configuration directory
cargoFiles - list of cargo resources file that will excluded
Throws:
IOException - If an error occurs during the copy.

createJBossFilterChain

protected org.apache.tools.ant.types.FilterChain createJBossFilterChain(JBossInstalledLocalContainer container)
                                                                 throws MalformedURLException
Create filter to replace token in configuration file with user defined token.

Parameters:
container - the JBoss contaiber instance from which we'll find the JBoss installed files to reference
Returns:
token with all the user-defined token value
Throws:
MalformedURLException - If an URL is malformed.

toString

public String toString()

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


Copyright © 2004-2012 Codehaus. All Rights Reserved.