org.codehaus.mojo.weblogic
Class DeployMojoBase

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.weblogic.AbstractWeblogicMojo
          extended by org.codehaus.mojo.weblogic.DeployMojoBase
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
CancelMojo, DeployMojo, ListAppsMojo, ReDeployMojo, StartMojo, StopMojo, UnDeployMojo

public abstract class DeployMojoBase
extends AbstractWeblogicMojo

This class is a base class for all deployment related mojos.

Version:
$Id: DeployMojoBase.java 7099 2008-05-31 19:30:04Z jonnio $
Author:
Scott Ryan

Field Summary
 
Fields inherited from class org.codehaus.mojo.weblogic.AbstractWeblogicMojo
WEBLOGIC_HOME_KEY
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
DeployMojoBase()
           
 
Method Summary
 void execute()
          This method will perform the deployment of the object to the proper server url.
protected  boolean executeDeployer(String[] parameters, String errorMessage)
          Executes the deployer with the given parameters.
 String getAdminServerHostName()
          Returns the value for the admin server host name property.
 String getAdminServerPort()
          Returns the value for the admin server port property.
 String getAdminServerProtocol()
          Getter for property admin server protocol.
 String getArtifactPath()
          Getter for property artifact path.
protected  String[] getInputParameters(String inOperation)
          This method will build up the parameters required for the various deployment operations.
 String getName()
          Returns the value for the name property.
 String getPassword()
          Returns the value for the password property.
 String getProjectPackaging()
          Getter for property project packaging.
 List getTargetList()
          This method will return a list of target by parsing the comma separated list of targets..
 String getTargetNames()
          Returns the value for the target names property.
 int getTimeout()
          Getter for deployment timeout
 String getUserId()
          Returns the value for the user id property.
 boolean isContinueOnFailure()
          Getter for continueOnFailure
 boolean isDebug()
           
 boolean isExploded()
          Getter for exploded.
 boolean isNoExit()
          getter for this.noExit
 boolean isNoVersion()
          Getter for the -noversion flag
 boolean isNoWait()
          Getter for noWait
 boolean isRemote()
          Getter for property remote.
 boolean isStage()
           
 boolean isUpload()
           
 boolean isVerbose()
           
 boolean isVersion()
          Getter for version
 void setAdminServerHostName(String inAdminServerHostName)
          Sets the value of the admin server host name property.
 void setAdminServerPort(String inAdminServerPort)
          Sets the value of the admin server port property.
 void setAdminServerProtocol(String inAdminServerProtocol)
          Setter for the admin server protocol.
 void setArtifactPath(String inArtifactPath)
          Setter for the artifact path.
 void setContinueOnFailure(boolean continueOnFailure)
          Setter for continue on failure.
 void setDebug(boolean debug)
           
 void setExploded(boolean exploded)
          Setter for exploded.
 void setName(String inName)
          Sets the value of the name property.
 void setNoExit(boolean noExit)
          Setter for this.noExit
 void setNoVersion(boolean noVersion)
          Setter for noVersion.
 void setNoWait(boolean noWait)
          Setter for noWait
 void setPassword(String inPassword)
          Sets the value of the password property.
 void setProjectPackaging(String inProjectPackaging)
          Setter for the project packaging.
 void setRemote(boolean inRemote)
          Setter for the remote.
 void setStage(boolean stage)
           
 void setTargetNames(String inTargetNames)
          Sets the value of the target names property.
 void setTimeout(int timeout)
          Setter for the deployment timeout
 void setUpload(boolean upload)
           
 void setUserId(String inUserId)
          Sets the value of the user id property.
 void setVerbose(boolean verbose)
           
 void setVersion(boolean version)
          Setter for version
 String toString()
          toString methode: creates a String representation of the object
 
Methods inherited from class org.codehaus.mojo.weblogic.AbstractWeblogicMojo
createTargetDirectory, getArtifacts, getDefaultLogger, getDependencies, getOutputDirectory, getPluginArtifacts, getWeblogicHome, setArtifacts, setDependencies, setOutputDirectory, setPluginArtifacts, setProperties, setWeblogicHome
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeployMojoBase

public DeployMojoBase()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
This method will perform the deployment of the object to the proper server url.

Specified by:
execute in interface org.apache.maven.plugin.Mojo
Overrides:
execute in class AbstractWeblogicMojo
Throws:
org.apache.maven.plugin.MojoExecutionException - Thrown if we fail to obtain a Weblogic deployment instance.
See Also:
AbstractWeblogicMojo.weblogicHome

getAdminServerHostName

public String getAdminServerHostName()
Returns the value for the admin server host name property.

Returns:
The value of the admin server host name property.

setAdminServerHostName

public void setAdminServerHostName(String inAdminServerHostName)
Sets the value of the admin server host name property.

Parameters:
inAdminServerHostName - The new value of the admin server host name property.

getAdminServerPort

public String getAdminServerPort()
Returns the value for the admin server port property.

Returns:
The value of the admin server port property.

setAdminServerPort

public void setAdminServerPort(String inAdminServerPort)
Sets the value of the admin server port property.

Parameters:
inAdminServerPort - The new value of the admin server port property.

getName

public String getName()
Returns the value for the name property.

Returns:
The value of the name property.

setName

public void setName(String inName)
Sets the value of the name property.

Parameters:
inName - The new value of the name property.

getPassword

public String getPassword()
Returns the value for the password property.

Returns:
The value of the password property.

setPassword

public void setPassword(String inPassword)
Sets the value of the password property.

Parameters:
inPassword - The new value of the password property.

getTargetNames

public String getTargetNames()
Returns the value for the target names property.

Returns:
The value of the target names property.

setTargetNames

public void setTargetNames(String inTargetNames)
Sets the value of the target names property.

Parameters:
inTargetNames - The new value of the target names property.

getUserId

public String getUserId()
Returns the value for the user id property.

Returns:
The value of the user id property.

setUserId

public void setUserId(String inUserId)
Sets the value of the user id property.

Parameters:
inUserId - The new value of the user id property.

getTargetList

public List getTargetList()
This method will return a list of target by parsing the comma separated list of targets..

Returns:
The value of target list.

isRemote

public boolean isRemote()
Getter for property remote.

Returns:
The value of remote.

setRemote

public void setRemote(boolean inRemote)
Setter for the remote.

Parameters:
inRemote - The value of remote.

getAdminServerProtocol

public String getAdminServerProtocol()
Getter for property admin server protocol.

Returns:
The value of admin server protocol.

setAdminServerProtocol

public void setAdminServerProtocol(String inAdminServerProtocol)
Setter for the admin server protocol.

Parameters:
inAdminServerProtocol - The value of admin server protocol.

getInputParameters

protected String[] getInputParameters(String inOperation)
This method will build up the parameters required for the various deployment operations.

Parameters:
inOperation - The deployment operation to take place.
Returns:
The value of input parameters to be passed to the deployer.

executeDeployer

protected boolean executeDeployer(String[] parameters,
                                  String errorMessage)
                           throws org.apache.maven.plugin.MojoExecutionException
Executes the deployer with the given parameters. Returns success or failure.

Parameters:
parameters - the parameters to execute
errorMessage - the error message
Returns:
success
Throws:
org.apache.maven.plugin.MojoExecutionException - when the deployer fails and the continueOnFailure is false

getArtifactPath

public String getArtifactPath()
Getter for property artifact path. If the exploded attribute is set the value will be artifactPath.

Returns:
The value of artifact path.

setArtifactPath

public void setArtifactPath(String inArtifactPath)
Setter for the artifact path.

Parameters:
inArtifactPath - The value of artifact path.

getProjectPackaging

public String getProjectPackaging()
Getter for property project packaging.

Returns:
The value of project packaging.

setProjectPackaging

public void setProjectPackaging(String inProjectPackaging)
Setter for the project packaging.

Parameters:
inProjectPackaging - The value of project packaging.

toString

public String toString()
toString methode: creates a String representation of the object

Overrides:
toString in class AbstractWeblogicMojo
Returns:
the String representation

isStage

public boolean isStage()
Returns:
the stage

setStage

public void setStage(boolean stage)
Parameters:
stage - the stage to set

isDebug

public boolean isDebug()
Returns:
the debug

setDebug

public void setDebug(boolean debug)
Parameters:
debug - the debug to set

isVerbose

public boolean isVerbose()
Returns:
the verbose

setVerbose

public void setVerbose(boolean verbose)
Parameters:
verbose - the verbose to set

isUpload

public boolean isUpload()
Returns:
the upload

setUpload

public void setUpload(boolean upload)
Parameters:
upload - the upload to set

isContinueOnFailure

public boolean isContinueOnFailure()
Getter for continueOnFailure

Returns:
true if the deployer should continue

setContinueOnFailure

public void setContinueOnFailure(boolean continueOnFailure)
Setter for continue on failure. Set to true so the deployer will not stop if there is a failure.

Parameters:
continueOnFailure - the value to set

isNoWait

public boolean isNoWait()
Getter for noWait

Returns:
the value of noWait

setNoWait

public void setNoWait(boolean noWait)
Setter for noWait

Parameters:
noWait - if set to true, weblogic will not wait for deployment success

getTimeout

public int getTimeout()
Getter for deployment timeout

Returns:
the timeout in seconds

setTimeout

public void setTimeout(int timeout)
Setter for the deployment timeout

Parameters:
timeout - in seconds

isVersion

public boolean isVersion()
Getter for version

Returns:
true if weblogic should print the version

setVersion

public void setVersion(boolean version)
Setter for version

Parameters:
version - set to true to have weblogic print the version

isNoVersion

public boolean isNoVersion()
Getter for the -noversion flag

Returns:
true if the -noversion flag should be used.

setNoVersion

public void setNoVersion(boolean noVersion)
Setter for noVersion.

Parameters:
noVersion - set to true if the -noversion flag should be used

isNoExit

public boolean isNoExit()
getter for this.noExit

Returns:
true if weblogic should not use System.exit() when problems arise.

setNoExit

public void setNoExit(boolean noExit)
Setter for this.noExit

Parameters:
noExit - set to true if weblogic should NOT use System.exit() when problems arise.

isExploded

public boolean isExploded()
Getter for exploded.

Returns:
true if the deployer should use the target artifact path as the source parameter

setExploded

public void setExploded(boolean exploded)
Setter for exploded.

Parameters:
exploded - true to use the target artifact path as the -source parameter


Copyright © 2005-2008 Codehaus. All Rights Reserved.