com.xebialabs.deployit.ci
Class Deployment

java.lang.Object
  extended by com.xebialabs.deployit.BaseConfigurationItem
      extended by com.xebialabs.deployit.ci.Deployment
All Implemented Interfaces:
java.io.Serializable

@ConfigurationItem(category="deployments",
                   description="A deployment of an application package or a deployable artifact to a middleware CI or an environment.")
public class Deployment
extends BaseConfigurationItem

A deployment of a DeploymentPackage on an Environment.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.xebialabs.deployit.BaseConfigurationItem
label
 
Constructor Summary
Deployment()
           
Deployment(DeploymentPackage source, Environment target)
           
Deployment(DeploymentPackage source, Environment target, java.lang.String virtualHost)
           
 
Method Summary
 void addMapping(Mapping mapping)
          Adds a mapping to this deployment.
 java.util.Set<Mapping> getMappings()
           
<M extends Mapping>
java.util.List<M>
getMappingsForSource(java.lang.Class<M> mappingClass, java.io.Serializable source)
          Returns the mappings on this CI that are of a certain classes (or one of its subclasses) and have a certain source.
<M extends Mapping>
java.util.List<M>
getMappingsForTarget(java.lang.Class<M> mappingClass, java.io.Serializable target)
          Returns the mappings on this CI that are of a certain classes (or one of its subclasses) and have a certain target.
<M extends Mapping>
java.util.List<M>
getMappingsOfType(java.lang.Class<M> mappingClass)
          Returns the mappings on this CI that are of a certain classes (or one of its subclasses).
 DeploymentPackage getSource()
           
 Environment getTarget()
           
 java.lang.String getVhostDefinition()
           
 void setMappings(java.util.Set<Mapping> mappings)
          Sets the mappings on this deployment.
 void setSource(DeploymentPackage source)
           
 void setTarget(Environment target)
           
 void setVhostDefinition(java.lang.String vhostDefinition)
           
 
Methods inherited from class com.xebialabs.deployit.BaseConfigurationItem
equals, getLabel, hashCode, setLabel, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Deployment

public Deployment()

Deployment

public Deployment(DeploymentPackage source,
                  Environment target)

Deployment

public Deployment(DeploymentPackage source,
                  Environment target,
                  java.lang.String virtualHost)
Method Detail

getVhostDefinition

public java.lang.String getVhostDefinition()

setVhostDefinition

public void setVhostDefinition(java.lang.String vhostDefinition)

getSource

public DeploymentPackage getSource()

setSource

public void setSource(DeploymentPackage source)

getTarget

public Environment getTarget()

setTarget

public void setTarget(Environment target)

getMappings

public java.util.Set<Mapping> getMappings()

getMappingsForSource

public <M extends Mapping> java.util.List<M> getMappingsForSource(java.lang.Class<M> mappingClass,
                                                                  java.io.Serializable source)
Returns the mappings on this CI that are of a certain classes (or one of its subclasses) and have a certain source.

Type Parameters:
M - the type of the mappings sought after
Parameters:
mappingClass - the class of the mappings sought after
source - the source of the mappings sought after
Returns:
a list of mappings that are of class mappingClass or one of its subclasses and that have source as their source.

getMappingsForTarget

public <M extends Mapping> java.util.List<M> getMappingsForTarget(java.lang.Class<M> mappingClass,
                                                                  java.io.Serializable target)
Returns the mappings on this CI that are of a certain classes (or one of its subclasses) and have a certain target.

Type Parameters:
M - the type of the mappings sought after
Parameters:
mappingClass - the class of the mappings sought after
target - the target of the mappings sought after
Returns:
a list of mappings that are of class mappingClass or one of its subclasses and that have target as their target.

getMappingsOfType

public <M extends Mapping> java.util.List<M> getMappingsOfType(java.lang.Class<M> mappingClass)
Returns the mappings on this CI that are of a certain classes (or one of its subclasses).

Type Parameters:
M - the type of the mappings sought after
Parameters:
mappingClass - the class of the mappings sought after
Returns:
a list of mappings that are of class mappingClass or one of its subclasses.

setMappings

public void setMappings(java.util.Set<Mapping> mappings)
Sets the mappings on this deployment.

Parameters:
mappings - the mappings to set.

addMapping

public void addMapping(Mapping mapping)
Adds a mapping to this deployment.

Parameters:
mapping - the mapping to add.


Copyright © 2010. All Rights Reserved.