org.alfresco.deployment.impl.server
Class Deployment

java.lang.Object
  extended by org.alfresco.deployment.impl.server.Deployment
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable

public class Deployment
extends java.lang.Object
implements java.lang.Iterable, java.io.Serializable

This is a record of an ongoing deployment. A collection of Deployed Files

See Also:
Serialized Form

Constructor Summary
Deployment(java.lang.String ticket, java.lang.String targetName, java.lang.String storeName, int version)
          Create a new Deployment record
 
Method Summary
 void abort()
          Mark the Deployment as aborting.
 void add(DeployedFile file)
          Log that a file has been deployed.
 void commit()
          And commit is now in progress.
 java.lang.String getAuthoringStoreName()
          Get the name of the store being deployed.
 int getAuthoringVersion()
          Get the version being deployed.
 DeploymentState getState()
          Get the state of the deployment.
 boolean isMetaError()
          Has there been an error detected with meta-data?
 boolean isStale(long timeout)
          Is the deployment stale.
 java.util.Iterator iterator()
          get the iterator for the files contained within this deployment.
 void prepare()
          Prepare this deployment.
 void setAuthoringStoreName(java.lang.String storeName)
          Get the store name being deployed.
 void setAuthoringVersion(int version)
          Set the authoring version (of the deployment from the authoring server)
 void setDeploymentState(DeploymentState state)
          Set the state of a deployment
 void setMetaError(boolean metaError)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Deployment

public Deployment(java.lang.String ticket,
                  java.lang.String targetName,
                  java.lang.String storeName,
                  int version)
           throws java.io.IOException
Create a new Deployment record

Parameters:
ticket - the ticket for this deployment.
targetName - the name of the deployment target
storeName - the name of the source store on the authoring cluster.
version - the snapshot version (from the authoring cluster) being deployed.
Throws:
java.io.IOException
Method Detail

add

public void add(DeployedFile file)
         throws java.io.IOException
Log that a file has been deployed.

Parameters:
file -
Throws:
java.io.IOException

prepare

public void prepare()
             throws java.io.IOException,
                    DeploymentException
Prepare this deployment.

Throws:
java.io.IOException
DeploymentException

commit

public void commit()
            throws java.io.IOException
And commit is now in progress.

Throws:
java.io.IOException

abort

public void abort()
           throws java.io.IOException
Mark the Deployment as aborting.

Throws:
java.io.IOException

isStale

public boolean isStale(long timeout)
Is the deployment stale.

Parameters:
timeout -
Returns:

iterator

public java.util.Iterator iterator()
get the iterator for the files contained within this deployment.

Specified by:
iterator in interface java.lang.Iterable

getState

public DeploymentState getState()
Get the state of the deployment.

Returns:

setDeploymentState

public void setDeploymentState(DeploymentState state)
Set the state of a deployment

Parameters:
state -

setMetaError

public void setMetaError(boolean metaError)

isMetaError

public boolean isMetaError()
Has there been an error detected with meta-data?

Returns:

setAuthoringVersion

public void setAuthoringVersion(int version)
Set the authoring version (of the deployment from the authoring server)

Parameters:
authoring - version

getAuthoringVersion

public int getAuthoringVersion()
Get the version being deployed. The version relates to the authoring cluster.

Returns:

setAuthoringStoreName

public void setAuthoringStoreName(java.lang.String storeName)
Get the store name being deployed. The store name is from the authoring cluster.

Parameters:
storeName -

getAuthoringStoreName

public java.lang.String getAuthoringStoreName()
Get the name of the store being deployed. The store name is from the authoring cluster.

Returns:
the name of the store on the authoring cluster


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.