- java.lang.Object
-
- org.wildfly.plugin.core.UndeployDescription
-
- All Implemented Interfaces:
Comparable<UndeployDescription>,DeploymentDescription
public class UndeployDescription extends Object implements DeploymentDescription, Comparable<UndeployDescription>
Represents the description for undeploying content from a running container.Instances of this are not thread-safe.
- Author:
- James R. Perkins
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UndeployDescriptionaddServerGroup(String serverGroup)Adds a server group for the deployment description.UndeployDescriptionaddServerGroups(String... serverGroups)Adds the server groups for the deployment description.UndeployDescriptionaddServerGroups(Collection<String> serverGroups)Adds the server groups for the deployment description.intcompareTo(UndeployDescription o)booleanequals(Object obj)StringgetName()Returns the name for this deployment.Set<String>getServerGroups()Returns the server groups for this deployment.inthashCode()booleanisFailOnMissing()Indicates whether or not a failure should occur if the deployment does not exist on the container.booleanisRemoveContent()Indicates whether or not the content should be removed from the content repository.static UndeployDescriptionof(String name)Creates a new undeploy description.static UndeployDescriptionof(DeploymentDescription deploymentDescription)Creates a new undeploy description.UndeployDescriptionsetFailOnMissing(boolean failOnMissing)Sets whether or not a failure should occur if the deployment does exist on the container.UndeployDescriptionsetRemoveContent(boolean removeContent)Sets whether or not the content should be removed after theundeployoperation.StringtoString()
-
-
-
Method Detail
-
of
public static UndeployDescription of(String name)
Creates a new undeploy description.- Parameters:
name- the name of the deployment- Returns:
- the description
-
of
public static UndeployDescription of(DeploymentDescription deploymentDescription)
Creates a new undeploy description.- Parameters:
deploymentDescription- the deployment description to copy- Returns:
- the description
-
addServerGroup
public UndeployDescription addServerGroup(String serverGroup)
Adds a server group for the deployment description.- Parameters:
serverGroup- the server group to add- Returns:
- this deployment description
-
addServerGroups
public UndeployDescription addServerGroups(String... serverGroups)
Adds the server groups for the deployment description.- Parameters:
serverGroups- the server groups to add- Returns:
- this deployment description
-
addServerGroups
public UndeployDescription addServerGroups(Collection<String> serverGroups)
Adds the server groups for the deployment description.- Parameters:
serverGroups- the server groups to add- Returns:
- this deployment description
-
getServerGroups
public Set<String> getServerGroups()
Description copied from interface:DeploymentDescriptionReturns the server groups for this deployment.- Specified by:
getServerGroupsin interfaceDeploymentDescription- Returns:
- a set of server groups for this deployment
-
getName
public String getName()
Description copied from interface:DeploymentDescriptionReturns the name for this deployment.- Specified by:
getNamein interfaceDeploymentDescription- Returns:
- the name for this deployment
-
isFailOnMissing
public boolean isFailOnMissing()
Indicates whether or not a failure should occur if the deployment does not exist on the container. A value oftrueindicates the deployment should fail.- Returns:
trueif the undeploy should fail if not found on the container, otherwisefalse
-
setFailOnMissing
public UndeployDescription setFailOnMissing(boolean failOnMissing)
Sets whether or not a failure should occur if the deployment does exist on the container.- Parameters:
failOnMissing-trueif the undeploy should fail if the deployment was not found on the server,falseif the deployment does not exist and the undeploy should be ignored- Returns:
- the deployment description
-
isRemoveContent
public boolean isRemoveContent()
Indicates whether or not the content should be removed from the content repository.- Returns:
trueif the content should also be removed from the repository,falseit only anundeployoperation should be executed and the content should remain in the repository
-
setRemoveContent
public UndeployDescription setRemoveContent(boolean removeContent)
Sets whether or not the content should be removed after theundeployoperation.The default value is
true.- Parameters:
removeContent-trueif the content should be removed,falseif the content should remain in the repository- Returns:
- the deployment description
-
compareTo
public int compareTo(UndeployDescription o)
- Specified by:
compareToin interfaceComparable<UndeployDescription>
-
-