public class RepositoryDeploymentData extends java.lang.Object implements DeploymentData, java.lang.Cloneable
addItemForUpdate()
method.
To signal that an item is to be deleted, use the addItemForDelete()
method.
This class is NOT threadsafe and should only be used from a single thread.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
java.util.LinkedHashMap |
mIdsToAddMap |
java.util.LinkedHashMap |
mIdsToAddRollbackMap |
java.util.LinkedHashMap |
mIdsToDeleteMap |
java.util.LinkedHashMap |
mIdsToDeleteRollbackMap |
java.util.LinkedHashMap |
mIdsToUpdateMap |
java.util.LinkedHashMap |
mIdsToUpdateRollbackMap |
static java.lang.String |
REPOSITORY_TYPE |
Constructor and Description |
---|
RepositoryDeploymentData(Repository pSourceRepository,
MutableRepository pDestRepository) |
Modifier and Type | Method and Description |
---|---|
void |
addItemForDelete(RepositoryItem pItem)
Convenience method for adding an item for deletion from the destination
repository
|
void |
addItemForDelete(RepositoryItem pItem,
java.lang.String pForwardSourceDevelopmentLineID,
java.lang.String pRollbackSourceDevelopmentLineID)
Convenience method for adding an item for deletion from the destination
repository
|
void |
addItemForDelete(java.lang.String pItemDescriptorName,
java.lang.String pItemId)
Convenience method for adding an item for deletion from the destination
repository
|
void |
addItemForDelete(java.lang.String pItemDescriptorName,
java.lang.String pItemId,
java.lang.String pForwardSourceDevelopmentLineID,
java.lang.String pRollbackSourceDevelopmentLineID)
Convenience method for adding an item for deletion from the destination
repository
|
void |
addItemForUpdate(RepositoryItem pItem)
Convenience method for adding an item for update to the destination
repository
|
void |
addItemForUpdate(RepositoryItem pItem,
java.lang.String pForwardSourceDevelopmentLineID,
java.lang.String pRollbackSourceDevelopmentLineID)
Convenience method for adding an item for update to the destination
repository
|
void |
addItemForUpdate(java.lang.String pItemDescriptorName,
java.lang.String pItemId)
Convenience method for adding an item for update to the destination
repository
|
void |
addItemForUpdate(java.lang.String pItemDescriptorName,
java.lang.String pItemId,
java.lang.String pForwardSourceDevelopmentLineID,
java.lang.String pRollbackSourceDevelopmentLineID)
Convenience method for adding an item for update to the destination
repository
|
void |
addNewItem(RepositoryItem pItem)
Convenience method for adding a new item to the destination repository
|
void |
addNewItem(RepositoryItem pItem,
java.lang.String pForwardSourceDevelopmentLineID,
java.lang.String pRollbackSourceDevelopmentLineID)
Convenience method for adding a new item to the destination repository
|
void |
addNewItem(java.lang.String pItemDescriptorName,
java.lang.String pItemId)
Convenience method for adding a new item to the destination repository
|
void |
addNewItem(java.lang.String pItemDescriptorName,
java.lang.String pItemId,
java.lang.String pForwardSourceDevelopmentLineID,
java.lang.String pRollbackSourceDevelopmentLineID)
Convenience method for adding a new item to the destination repository
|
java.lang.Object |
clone()
Returns a clone of this object.
|
void |
convertToRollbackData()
Converts a particular DeploymentData from a list of items modified
in a deployment to a rollback for that deployment.
|
MutableRepository |
getDestinationRepository() |
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
getItemDescriptorToIdsMap() |
int |
getMarkerCount()
Returns the number of markers for deployment
|
java.util.Collection |
getNextSetOfMarkers(int pCurrentIndex,
int pBatchSize)
Returns some set of markers, starting at pCurrentIndex, of a number
up to pBatchsize.
|
RepositoryItem |
getRepositoryItem()
Returns the deployment data repository item
|
Repository |
getSourceRepository() |
java.lang.Integer |
operationForItem(java.lang.String pItemDescriptorName,
java.lang.String pItemId)
Convenience method checking if an item is already in the DeploymentData
|
void |
persist(MutableRepository pDeploymentRepository,
MutableRepositoryItem pDeploymentItem)
Writes the deploymentData item to the repository.
|
public static java.lang.String CLASS_VERSION
public static final java.lang.String REPOSITORY_TYPE
public java.util.LinkedHashMap mIdsToAddMap
public java.util.LinkedHashMap mIdsToUpdateMap
public java.util.LinkedHashMap mIdsToDeleteMap
public java.util.LinkedHashMap mIdsToAddRollbackMap
public java.util.LinkedHashMap mIdsToUpdateRollbackMap
public java.util.LinkedHashMap mIdsToDeleteRollbackMap
public RepositoryDeploymentData(Repository pSourceRepository, MutableRepository pDestRepository)
public Repository getSourceRepository()
public MutableRepository getDestinationRepository()
public java.util.Collection getNextSetOfMarkers(int pCurrentIndex, int pBatchSize)
getNextSetOfMarkers
in interface DeploymentData
public java.lang.Integer operationForItem(java.lang.String pItemDescriptorName, java.lang.String pItemId) throws RepositoryException
RepositoryException
public void addNewItem(RepositoryItem pItem, java.lang.String pForwardSourceDevelopmentLineID, java.lang.String pRollbackSourceDevelopmentLineID) throws RepositoryException
RepositoryException
- If the item's item descriptor cannot be accessedjava.lang.IllegalArgumentException
- if the item is already in the deployment, if it is
transient, or if it does not exist in the source repositorypublic void addNewItem(RepositoryItem pItem) throws RepositoryException
RepositoryException
- If the item's item descriptor cannot be accessedjava.lang.IllegalArgumentException
- if the item is already in the deployment, if it is
transient, or if it does not exist in the source repositorypublic void addNewItem(java.lang.String pItemDescriptorName, java.lang.String pItemId, java.lang.String pForwardSourceDevelopmentLineID, java.lang.String pRollbackSourceDevelopmentLineID) throws RepositoryException
RepositoryException
- If the item's item descriptor cannot be accessedjava.lang.IllegalArgumentException
- if the item is already in the deployment, if it is
transient, or if it does not exist in the source repositorypublic void addNewItem(java.lang.String pItemDescriptorName, java.lang.String pItemId) throws RepositoryException
RepositoryException
- If the item's item descriptor cannot be accessedjava.lang.IllegalArgumentException
- if the item is already in the deployment, if it is
transient, or if it does not exist in the source repositorypublic void addItemForUpdate(RepositoryItem pItem, java.lang.String pForwardSourceDevelopmentLineID, java.lang.String pRollbackSourceDevelopmentLineID) throws RepositoryException
RepositoryException
- If the item's item descriptor cannot be accessedjava.lang.IllegalArgumentException
- if the item is already in the deployment, if it is
transient, or if it does not exist in the source repositorypublic void addItemForUpdate(RepositoryItem pItem) throws RepositoryException
RepositoryException
- If the item's item descriptor cannot be accessedjava.lang.IllegalArgumentException
- if the item is already in the deployment, if it is
transient, or if it does not exist in the source repositorypublic void addItemForUpdate(java.lang.String pItemDescriptorName, java.lang.String pItemId, java.lang.String pForwardSourceDevelopmentLineID, java.lang.String pRollbackSourceDevelopmentLineID) throws RepositoryException
RepositoryException
- If the item's item descriptor cannot be accessedjava.lang.IllegalArgumentException
- if the item is already in the deployment, if it is
transient, or if it does not exist in the source repositorypublic void addItemForUpdate(java.lang.String pItemDescriptorName, java.lang.String pItemId) throws RepositoryException
RepositoryException
- If the item's item descriptor cannot be accessedjava.lang.IllegalArgumentException
- if the item is already in the deployment, if it is
transient, or if it does not exist in the source repositorypublic void addItemForDelete(RepositoryItem pItem, java.lang.String pForwardSourceDevelopmentLineID, java.lang.String pRollbackSourceDevelopmentLineID) throws RepositoryException
RepositoryException
- If the item's item descriptor cannot be accessedjava.lang.IllegalArgumentException
- if the item is already in the deployment, if it is
transient, or if it does not exist in the source repositorypublic void addItemForDelete(RepositoryItem pItem) throws RepositoryException
RepositoryException
- If the item's item descriptor cannot be accessedjava.lang.IllegalArgumentException
- if the item is already in the deployment, if it is
transient, or if it does not exist in the source repositorypublic void addItemForDelete(java.lang.String pItemDescriptorName, java.lang.String pItemId, java.lang.String pForwardSourceDevelopmentLineID, java.lang.String pRollbackSourceDevelopmentLineID) throws RepositoryException
RepositoryException
- If the item's item descriptor cannot be accessedjava.lang.IllegalArgumentException
- if the item is already in the deployment, if it is
transient, or if it does not exist in the source repositorypublic void addItemForDelete(java.lang.String pItemDescriptorName, java.lang.String pItemId) throws RepositoryException
RepositoryException
- If the item's item descriptor cannot be accessedjava.lang.IllegalArgumentException
- if the item is already in the deployment, if it is
transient, or if it does not exist in the source repositorypublic void persist(MutableRepository pDeploymentRepository, MutableRepositoryItem pDeploymentItem) throws atg.deployment.DistributedDeploymentException
persist
in interface DeploymentData
atg.deployment.DistributedDeploymentException
- if an error occurs while persistingpublic RepositoryItem getRepositoryItem()
getRepositoryItem
in interface DeploymentData
public int getMarkerCount()
getMarkerCount
in interface DeploymentData
public void convertToRollbackData()
add -> delete
update -> update
delete -> add
Note that this function is reversible - calling it twice is the same as not calling it.
Versions are not handled here - we depend on the snapshot setting to get the appropriate versions for a rollback deployment.
convertToRollbackData
in interface DeploymentData
public java.lang.Object clone()
clone
in interface DeploymentData
clone
in class java.lang.Object
public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getItemDescriptorToIdsMap()