org.codehaus.cargo.maven2.configuration
Class Deployable

java.lang.Object
  extended by org.codehaus.cargo.maven2.configuration.AbstractDependency
      extended by org.codehaus.cargo.maven2.configuration.Deployable

public class Deployable
extends AbstractDependency

Holds configuration data for the <deployable> tag used to configure the plugin in the pom.xml file.

Version:
$Id: Deployable.java 1678 2008-07-24 21:43:31Z mwringe $

Constructor Summary
Deployable()
           
 
Method Summary
protected  String computeExtension(String packaging)
           
protected  String computeLocation(CargoProject project)
           
 Deployable createDeployable(String containerId, CargoProject project)
           
 String getImplementation()
           
 Long getPingTimeout()
           
 URL getPingURL()
           
 Map getProperties()
           
protected  String getSetterMethodName(String propertyName)
          Transform a property into a method name by transforming the first letter of the property name to uppercase.
protected  boolean isTypeCompatible(CargoProject project)
           
 void setImplementation(String implementation)
           
 void setProperties(Map properties)
           
protected  void setPropertiesOnDeployable(Deployable deployable, CargoProject project)
          Set user-defined properties on the created deployable.
 
Methods inherited from class org.codehaus.cargo.maven2.configuration.AbstractDependency
findArtifactLocation, getArtifactId, getClassifier, getGroupId, getLocation, getType, setArtifactId, setClassifier, setGroupId, setLocation, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Deployable

public Deployable()
Method Detail

getProperties

public Map getProperties()

setProperties

public void setProperties(Map properties)

getPingURL

public URL getPingURL()

getPingTimeout

public Long getPingTimeout()

setImplementation

public void setImplementation(String implementation)

getImplementation

public String getImplementation()

createDeployable

public Deployable createDeployable(String containerId,
                                   CargoProject project)
                            throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

setPropertiesOnDeployable

protected void setPropertiesOnDeployable(Deployable deployable,
                                         CargoProject project)
Set user-defined properties on the created deployable.

Parameters:
deployable - the deployable on which to set the properties

computeLocation

protected String computeLocation(CargoProject project)
                          throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

isTypeCompatible

protected boolean isTypeCompatible(CargoProject project)
Returns:
true if the deployable type is compatible with the project's packaging

computeExtension

protected String computeExtension(String packaging)
Parameters:
packaging - the Maven project packaging (ex: ejb, ear, rar, war, etc)
Returns:
the artifact extension matching the packaging

getSetterMethodName

protected String getSetterMethodName(String propertyName)
Transform a property into a method name by transforming the first letter of the property name to uppercase.

Parameters:
propertyName - the property name to transform into a setter method
Returns:
the setter method's name


Copyright © 2004-2012 Codehaus. All Rights Reserved.