Class AbstractGlassFishStandaloneLocalConfiguration
- 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.glassfish.internal.AbstractGlassFishStandaloneLocalConfiguration
-
- All Implemented Interfaces:
Configuration
,LocalConfiguration
,StandaloneLocalConfiguration
,ContainerConfiguration
,Loggable
- Direct Known Subclasses:
GlassFish2xStandaloneLocalConfiguration
,GlassFish3xStandaloneLocalConfiguration
public abstract class AbstractGlassFishStandaloneLocalConfiguration extends AbstractStandaloneLocalConfiguration
GlassFish standalone local configuration.
-
-
Field Summary
-
Fields inherited from class org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration
RESOURCE_PATH
-
-
Constructor Summary
Constructors Constructor Description AbstractGlassFishStandaloneLocalConfiguration(String home)
Creates the local configuration object.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract int
configureUsingAsAdmin(AbstractGlassFishInstalledLocalContainer abstractGlassFishInstalledLocalContainer)
Configures the domain usingasadmin
.protected void
doConfigure(LocalContainer container)
Creates a new domain and set up the workspace by invoking the "asadmin" command.protected String
getPropertyValueString(String key)
Returns a system property value string.void
verify()
Verify that the configuration is valid.-
Methods inherited from class org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration
addXmlReplacement, addXmlReplacement, addXmlReplacement, addXmlReplacement, configureFiles, getType, getXmlReplacements, performXmlReplacements, removeXmlReplacement, removeXmlReplacement, replaceInFile, setupConfigurationDir
-
Methods inherited from class org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration
addDataSource, addDataSourcesFromProperties, addDeployable, addResource, addResourcesFromProperties, addUser, addUsersFromProperties, applyPortOffset, applyPortOffset, collectUnsupportedDataSourcesAndThrowException, collectUnsupportedResourcesAndThrowException, configure, flagOffsetApplied, getDataSources, getDeployables, getDestDirectoryLocation, getDestFileLocation, getFileHandler, getFileProperties, getHome, getPropertyValue, getReplacements, getResources, getResourceUtils, getUsers, isOffsetApplied, isOffsetApplied, parsePropertiesForPendingConfiguration, revertPortOffset, revertPortOffset, setConfigFileProperty, setFileHandler, 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, toString, wait, wait, wait
-
Methods inherited from interface org.codehaus.cargo.container.configuration.Configuration
getCapability, getProperties, getPropertyValue, setProperty
-
Methods inherited from interface org.codehaus.cargo.container.configuration.LocalConfiguration
addDataSource, addDeployable, addResource, addUser, applyPortOffset, configure, getDataSources, getDeployables, getFileHandler, getFileProperties, getHome, getResources, getUsers, isOffsetApplied, revertPortOffset, setConfigFileProperty, setFileHandler, setFileProperty
-
-
-
-
Constructor Detail
-
AbstractGlassFishStandaloneLocalConfiguration
public AbstractGlassFishStandaloneLocalConfiguration(String home)
Creates the local configuration object.- Parameters:
home
- The work directory where files needed to run GlassFish will be created.
-
-
Method Detail
-
verify
public void verify()
Description copied from class:AbstractStandaloneLocalConfiguration
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 interfaceContainerConfiguration
- Overrides:
verify
in classAbstractStandaloneLocalConfiguration
-
doConfigure
protected void doConfigure(LocalContainer container) throws Exception
Creates a new domain and set up the workspace by invoking the "asadmin" command. 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:
doConfigure
in classAbstractLocalConfiguration
- Parameters:
container
- the container to configure- Throws:
Exception
- if any error is raised during the configuration
-
getPropertyValueString
protected String getPropertyValueString(String key)
Returns a system property value string.- Parameters:
key
- Key to look for.- Returns:
- Associated value.
-
configureUsingAsAdmin
protected abstract int configureUsingAsAdmin(AbstractGlassFishInstalledLocalContainer abstractGlassFishInstalledLocalContainer)
Configures the domain usingasadmin
.- Parameters:
abstractGlassFishInstalledLocalContainer
- GlassFish container.- Returns:
- Whatever
asadmin
returned.
-
-