atg.deployment
Class DeploymentManager

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.deployment.DeploymentManager
All Implemented Interfaces:
MessageSink, atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener

public class DeploymentManager
extends GenericService
implements MessageSink

Manages the deployment of repository items from a source repository to a target repository. A deployment can perform the following operations:
ADD - Adds an item to the target repository UPDATE - Updates an existing item in the target repository DELETE - Removes an existing item from the target repository

These actions max be performed by multiple threads. The following parameters control how threads are created. maxThreadSize - The maximum number of threads created for processing threadBatchSize - The ideal number of items per thread

Initially the deployment manager will create threads by assigning "threadBatchSize" items per thread. If that triggers more than "maxThreadSize" threads to be created, then a new batch size will be calculated that limits the number of threads to "maxThreadSize".

By default, maxThreadSize = 10 and threadBatchSize = 5000;

To trigger a deployment create an object of type RepositoryDeploymentData:
For each item to be added or updated invoke RepositoryDeploymentData.addItemForUpdate(). To identify an item for delete, invoke RepositoryDeploymentData.addItemForDelete() Example:
RepositoryDeploymentData dd = new RepositoryDeploymentDataImpl(sourceRepository, targetRepository); dd.addItemForUpdate(myRepositoryItem); dd.addItemForDelete(myOtherRepositoryItem); dd.deploy(dd);


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 long mLostThreadTimeout
           
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
DeploymentManager()
          Default Constructor
 
Method Summary
 void addDeploymentListener(atg.deployment.DeploymentListener pListener)
          Allows for a component which implements the DeploymentListener interface to be notified as various events occur.
 void cancel(java.lang.String pDeploymentId, boolean pAllowResume)
          This method should be called to cancel a deployment.
protected  javax.servlet.Servlet createAdminServlet()
          Creates and returns a new Servlet that will administer this service.
 void deleteDummyReferenceItems()
          This method is meant to be exposed in the admin server pages so a user can try to force delete all the dummy reference items.
 java.lang.String deploy(DeploymentData[] pDataArray, DeploymentOptions pOptions)
          This method starts a new deployment using the data specified in the pDataArray parameter.
 java.lang.String deploy(DeploymentData[] pDataArray, DeploymentOptions pOptions, java.lang.String pUserDeploymentId)
          This method starts a new deployment using the data specified in the pDataArray parameter.
 java.lang.String deploy(DeploymentData pData, DeploymentOptions pOptions)
          Convenience method to pass in a single DeploymentData object to deploy
 java.lang.String deploy(DeploymentData pData, DeploymentOptions pOptions, java.lang.String pUserDeploymentId)
          Convenience method to pass in a single DeploymentData object to deploy
 void deploy(java.lang.String pDeploymentId, int pType)
          This method is used to resume a previously failed or cancelled deployment.
 boolean deploymentExists(java.lang.String pDeploymentId)
          This method is used to determine if a deployment exists with the given id.
 void deploymentFailed(java.lang.String pId)
          Called by a deployment object to be sure that a local event goes out to listeners registered for deployment notifications.
 void doStartService()
          This is called after a Service has been created, placed into the naming hierarchy, and initialized with its configured property values.
 void doStopService()
          This is called when a Service is required to shut down.
 atg.service.clustername.ClusterName getClusterNameService()
           
 java.util.Comparator<atg.deployment.DeploymentListener> getDeploymentListenerComparator()
          An optional java.util.Comparator implementation to sort the configured DeploymentListener implementations, if necessary.
 java.util.Collection getDeploymentListeners()
           
 DeploymentProgress getDeploymentProgress(java.lang.String pDeploymentId)
          Returns an object which contains information about the progress of a deployment.
 atg.deployment.DeploymentReporter getDeploymentReporter()
          Returns a DeploymentReporter object that can be used to interrogate a deployment about succeeded and failed items.
 Repository getDeploymentRepository()
           
 int getDeploymentShutdownTimeout()
           
 int getLocalDeploymentPhaseCompletePollingInterval()
           
 ClientLockManager getLockManager()
           
 long getLostThreadTimeout()
          Returns the number of milliseconds to wait before failing the deployment after the main Deployment has found that there are no more worker threads, but there are still assets remaining to be deployed.
 int getMarkerPollingInterval()
           
 long getMaxDeploymentPollingInterval()
          Maximum poll interval for dynamically determined polling.
 int getMaxFailureCount()
           
 int getMaxThreads()
           
 atg.deployment.messaging.DeploymentMessagingSource getMessagingSource()
           
 float getMinPollIntervalPerThousandDeployed()
          Minimum polling interval in seconds per thousand items in deployment.
 int getPhaseCompletePollingInterval()
           
 java.util.Map getRepositoryMappings()
           
 int getServerAliveMessageResponseWaitTime()
           
 int getServerDownIterationDetectionCount()
           
 atg.service.ServerName getServerNameService()
           
 int getThreadBatchSize()
           
 atg.deployment.ThreadFactory getThreadFactory()
          Get the factory that can be used to create DeploymentWorkerThread instances.
 int getThreadSpawnInterval()
           
 int getTransactionBatchSize()
           
 javax.transaction.TransactionManager getTransactionManager()
           
 int getTransientErrorRetryCount()
           
 int getTransientErrorRetryTransactionBatchSize()
           
 VersionManager getVersionManager()
           
 void handleMessage(atg.deployment.messaging.DeploymentMessage pMessage)
          This method handles processing the DeploymentMessage object which was delivered as part of a JMS message.
 boolean isAvoidTransactionSuspend()
          Returns property avoidTransactionSuspend.
 java.lang.Boolean isDeploymentCanceled(java.lang.String pDeploymentId)
          Whether the deployment has canceled
 java.lang.Boolean isDeploymentCompleted(java.lang.String pDeploymentId)
          Whether the deployment has completed successfully.
 java.lang.Boolean isDeploymentFailed(java.lang.String pDeploymentId)
          Whether the deployment has failed
 boolean isDeploymentRunning(java.lang.String pDeploymentId)
          Returns true if the currently executing deployment's id is pDeploymentId.
 boolean isEnablePurge()
           
 boolean isLoggingFileDebug()
           
 boolean isLoggingItemDebug()
           
 boolean isLoggingPollingDebug()
           
 boolean isLoggingPropertyDebug()
           
 boolean isLoggingThreadDebug()
           
 boolean isPurgeDeploymentData()
           
 boolean isReferenceUpdateCommitOnNewItemType()
           
 boolean isShowReadonlyAdmin()
          If component admin should be shown in readonly mode.
 boolean isStrictFileOperations()
           
 boolean isStrictRepositoryOperations()
           
 boolean isUseDistributedDeployment()
           
 void logDebug(java.lang.String pMessage)
          Logs an debug event with the specified message
 void notifyDeploymentListeners(java.lang.String pDeploymentId, java.lang.String pEvent)
          Notifies the deployment listeners of some event
 void purgeDataForCompletedDeployments()
          This method removes the deployment data and the markers for all completed deployments.
 void purgeDeploymentData(java.lang.String pDeploymentId, boolean pPurgeDeploymentItem)
          This method removes the deployment data and the markers for the completed deployment.
 void receiveMessage(java.lang.String pPortName, javax.jms.Message pMessage)
          This is called to notify the component that a Message has arrived through the given input port.
 void removeDeploymentListener(atg.deployment.DeploymentListener pListener)
          Removes a DeploymentListener from the deployment listener notification collection
 void restart(java.lang.String pDeploymentId)
          This method is used to restart a previously failed or cancelled deployment.
 void resume(java.lang.String pDeploymentId)
          This method is used to resume a previously failed or cancelled deployment.
 void setAvoidTransactionSuspend(boolean pAvoidTransactionSuspend)
          Sets property avoidTransactionSuspend.
 void setClusterNameService(atg.service.clustername.ClusterName pClusterNameService)
           
 void setDeploymentListenerComparator(java.util.Comparator<atg.deployment.DeploymentListener> pDeploymentListenerComparator)
          An optional java.util.Comparator implementation to sort the configured DeploymentListener implementations, if necessary.
 void setDeploymentListeners(java.util.Collection pDeploymentListeners)
           
 void setDeploymentRepository(Repository pDeploymentRepository)
           
 void setDeploymentShutdownTimeout(int pDeploymentShutdownTimeout)
           
 void setEnablePurge(boolean pEnablePurge)
           
 void setLocalDeploymentPhaseCompletePollingInterval(int pLocalDeploymentPhaseCompletePollingInterval)
           
 void setLockManager(ClientLockManager pLockManager)
           
 void setLoggingFileDebug(boolean pLoggingFileDebug)
           
 void setLoggingItemDebug(boolean pLoggingItemDebug)
           
 void setLoggingPollingDebug(boolean pLoggingPollingDebug)
           
 void setLoggingPropertyDebug(boolean pLoggingPropertyDebug)
           
 void setLoggingThreadDebug(boolean pLoggingThreadDebug)
           
 void setLostThreadTimeout(long pTimeout)
          Sets the number of milliseconds to wait before failing the deployment after the main Deployment has found that there are no more worker threads, but there are still assets remaining to be deployed.
 void setMarkerPollingInterval(int pMarkerPollingInterval)
           
 void setMaxDeploymentPollingInterval(long pMaxDeploymentPollingInterval)
          Maximum poll interval for dynamically determined polling.
 void setMaxFailureCount(int pMaxFailureCount)
           
 void setMaxThreads(int pMax)
          Sets the maximum number of worker threads.
 void setMessagingSource(atg.deployment.messaging.DeploymentMessagingSource pMessagingSource)
           
 void setMinPollIntervalPerThousandDeployed(float pMinPollIntervalPerThousandDeployed)
          Minimum polling interval in seconds per thousand items in deployment.
 void setPhaseCompletePollingInterval(int pPhaseCompletePollingInterval)
           
 void setPurgeDeploymentData(boolean pPurgeDeploymentData)
           
 void setReferenceUpdateCommitOnNewItemType(boolean pReferenceUpdateCommitOnNewItemType)
           
 void setRepositoryMappings(java.util.Map pRepositoryMappings)
           
 void setServerAliveMessageResponseWaitTime(int pServerAliveMessageResponseWaitTime)
           
 void setServerDownIterationDetectionCount(int pServerDownIterationDetectionCount)
           
 void setServerNameService(atg.service.ServerName pServerNameService)
           
 void setShowReadonlyAdmin(boolean pShowReadonlyAdmin)
          Set to true when admin should be readonly.
 void setStrictFileOperations(boolean pStrictFileOperations)
           
 void setStrictRepositoryOperations(boolean pStrictRepositoryOperations)
           
 void setThreadBatchSize(int pThreadBatchSize)
          This parameter determines the maximum number of items a single thread is expected to process.
 void setThreadFactory(atg.deployment.ThreadFactory pThreadFactory)
          Set a factory for creating instances of DeploymentWorkerThread class.
 void setThreadSpawnInterval(int pThreadSpawnInterval)
           
 void setTransactionBatchSize(int pTransactionBatchSize)
          The maximum number of items to process before commiting a transaction batch.
 void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
           
 void setTransientErrorRetryCount(int pTransientErrorRetryCount)
           
 void setTransientErrorRetryTransactionBatchSize(int pTransientErrorRetryTransactionBatchSize)
           
 void setUseDistributedDeployment(boolean pUseDistributedDeployment)
           
 void setVersionManager(VersionManager pVersionManager)
           
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


mLostThreadTimeout

public long mLostThreadTimeout
Constructor Detail

DeploymentManager

public DeploymentManager()
Default Constructor

Method Detail

setLostThreadTimeout

public void setLostThreadTimeout(long pTimeout)
Sets the number of milliseconds to wait before failing the deployment after the main Deployment has found that there are no more worker threads, but there are still assets remaining to be deployed.

Parameters:
pTimeout -

getLostThreadTimeout

public long getLostThreadTimeout()
Returns the number of milliseconds to wait before failing the deployment after the main Deployment has found that there are no more worker threads, but there are still assets remaining to be deployed.


getMaxThreads

public int getMaxThreads()

setMaxThreads

public void setMaxThreads(int pMax)
Sets the maximum number of worker threads.

Parameters:
pMax -

setAvoidTransactionSuspend

public void setAvoidTransactionSuspend(boolean pAvoidTransactionSuspend)
Sets property avoidTransactionSuspend. Avoid suspending transaction in order to work around mysql issue.


isAvoidTransactionSuspend

public boolean isAvoidTransactionSuspend()
Returns property avoidTransactionSuspend. Avoid suspending transaction in order to work around mysql issue.


getTransientErrorRetryCount

public int getTransientErrorRetryCount()
Returns:
Returns the value of the transientErrorRetryCount property.

setTransientErrorRetryCount

public void setTransientErrorRetryCount(int pTransientErrorRetryCount)
Parameters:
pTransientErrorRetryCount - Sets the property value of the transientErrorRetryCount property.

getMaxFailureCount

public int getMaxFailureCount()
Returns:
Returns the value of the maxFailureCount property.

setMaxFailureCount

public void setMaxFailureCount(int pMaxFailureCount)
Parameters:
pMaxFailureCount - Sets the property value of the maxFailureCount property.

getThreadBatchSize

public int getThreadBatchSize()
Returns:
Returns the value of the threadBatchSize property.

setThreadBatchSize

public void setThreadBatchSize(int pThreadBatchSize)
This parameter determines the maximum number of items a single thread is expected to process.

Parameters:
pThreadBatchSize - Sets the value of the threadBatchSize property.

getTransactionBatchSize

public int getTransactionBatchSize()
Returns:
Returns the value of the TransactionBatchSize property.

setTransactionBatchSize

public void setTransactionBatchSize(int pTransactionBatchSize)
The maximum number of items to process before commiting a transaction batch. Increasing this value will potentially improve perfomance at the cost of memory. Increasing this parameter too high could cause an OutOfMemoryException.

Parameters:
pTransactionBatchSize - Sets the value of the TransactionBatchSize property.

getTransientErrorRetryTransactionBatchSize

public int getTransientErrorRetryTransactionBatchSize()
Returns:
Returns the value of the transientErrorRetryTransactionBatchSize property.

setTransientErrorRetryTransactionBatchSize

public void setTransientErrorRetryTransactionBatchSize(int pTransientErrorRetryTransactionBatchSize)
Parameters:
pTransientErrorRetryTransactionBatchSize - Sets the property value of the transientErrorRetryTransactionBatchSize property.

getRepositoryMappings

public java.util.Map getRepositoryMappings()
Returns:
Returns the repositoryMappings.

setRepositoryMappings

public void setRepositoryMappings(java.util.Map pRepositoryMappings)
Parameters:
pRepositoryMappings - The repositoryMappings to set.

isUseDistributedDeployment

public boolean isUseDistributedDeployment()
Returns:
the useDistributedDeployment

setUseDistributedDeployment

public void setUseDistributedDeployment(boolean pUseDistributedDeployment)
Parameters:
pUseDistributedDeployment - the useDistributedDeployment to set

getPhaseCompletePollingInterval

public int getPhaseCompletePollingInterval()
Returns:
Returns the value of the phaseCompletePollingInterval property.

setPhaseCompletePollingInterval

public void setPhaseCompletePollingInterval(int pPhaseCompletePollingInterval)
Parameters:
pPhaseCompletePollingInterval - Sets the property value of the phaseCompletePollingInterval property.

getLocalDeploymentPhaseCompletePollingInterval

public int getLocalDeploymentPhaseCompletePollingInterval()
Returns:
the localDeploymentPhaseCompletePollingInterval

setLocalDeploymentPhaseCompletePollingInterval

public void setLocalDeploymentPhaseCompletePollingInterval(int pLocalDeploymentPhaseCompletePollingInterval)
Parameters:
pLocalDeploymentPhaseCompletePollingInterval - the localDeploymentPhaseCompletePollingInterval to set

getMinPollIntervalPerThousandDeployed

public float getMinPollIntervalPerThousandDeployed()
Minimum polling interval in seconds per thousand items in deployment. So if this is 0.5 and we deployment 6000 items, then there will be a poll interval of 3 seconds.

Returns:
the MinPollIntervalPerThousandDeployed

setMinPollIntervalPerThousandDeployed

public void setMinPollIntervalPerThousandDeployed(float pMinPollIntervalPerThousandDeployed)
Minimum polling interval in seconds per thousand items in deployment. So if this is 0.5 and we deployment 6000 items, then there will be a poll interval of 3 seconds.

Parameters:
pMinPollIntervalPerThousandDeployed - the MinPollIntervalPerThousandDeployed to set

getMaxDeploymentPollingInterval

public long getMaxDeploymentPollingInterval()
Maximum poll interval for dynamically determined polling. 60 seconds by default.

Returns:
Returns the value of the MaxDeploymentPollingInterval property.

setMaxDeploymentPollingInterval

public void setMaxDeploymentPollingInterval(long pMaxDeploymentPollingInterval)
Maximum poll interval for dynamically determined polling. 60 seconds by default.

Parameters:
pMaxDeploymentPollingInterval - Sets the property value of the MaxDeploymentPollingInterval property.

getMarkerPollingInterval

public int getMarkerPollingInterval()
Returns:
Returns the value of the markerPollingInterval property.

setMarkerPollingInterval

public void setMarkerPollingInterval(int pMarkerPollingInterval)
Parameters:
pMarkerPollingInterval - Sets the property value of the markerPollingInterval property.

getThreadSpawnInterval

public int getThreadSpawnInterval()
Returns:
Returns the threadSpawnInterval.

setThreadSpawnInterval

public void setThreadSpawnInterval(int pThreadSpawnInterval)
Parameters:
pThreadSpawnInterval - The threadSpawnInterval to set.

getServerDownIterationDetectionCount

public int getServerDownIterationDetectionCount()
Returns:
Returns the value of the serverDownIterationDetectionCount property.

setServerDownIterationDetectionCount

public void setServerDownIterationDetectionCount(int pServerDownIterationDetectionCount)
Parameters:
pServerDownIterationDetectionCount - Sets the value of the serverDownIterationDetectionCount property.

getServerAliveMessageResponseWaitTime

public int getServerAliveMessageResponseWaitTime()
Returns:
Returns the value of the serverAliveMessageResponseWaitTime property.

setServerAliveMessageResponseWaitTime

public void setServerAliveMessageResponseWaitTime(int pServerAliveMessageResponseWaitTime)
Parameters:
pServerAliveMessageResponseWaitTime - Sets the value of the serverAliveMessageResponseWaitTime property.

getDeploymentShutdownTimeout

public int getDeploymentShutdownTimeout()
Returns:
Returns the value of the DeploymentShutdownTimeout property.

setDeploymentShutdownTimeout

public void setDeploymentShutdownTimeout(int pDeploymentShutdownTimeout)
Parameters:
pDeploymentShutdownTimeout - Sets the value of the DeploymentShutdownTimeout property.

isStrictRepositoryOperations

public boolean isStrictRepositoryOperations()
Returns:
Returns the value of the StrictRepositoryOperations property.

setStrictRepositoryOperations

public void setStrictRepositoryOperations(boolean pStrictRepositoryOperations)
Parameters:
pStrictRepositoryOperations - Sets the value of the StrictRepositoryOperations property.

isStrictFileOperations

public boolean isStrictFileOperations()
Returns:
Returns the value of the StrictFileOperations property.

setStrictFileOperations

public void setStrictFileOperations(boolean pStrictFileOperations)
Parameters:
pStrictFileOperations - Sets the value of the StrictFileOperations property.

isEnablePurge

public boolean isEnablePurge()
Returns:
Returns the value of the enablePurge property.

setEnablePurge

public void setEnablePurge(boolean pEnablePurge)
Parameters:
pEnablePurge - Sets the value of the enablePurge property.

getDeploymentListeners

public java.util.Collection getDeploymentListeners()
Returns:
Returns the value of the deploymentListeners property.

setDeploymentListeners

public void setDeploymentListeners(java.util.Collection pDeploymentListeners)
Parameters:
pDeploymentListeners - Sets the value of the deploymentListeners property.

addDeploymentListener

public void addDeploymentListener(atg.deployment.DeploymentListener pListener)
Allows for a component which implements the DeploymentListener interface to be notified as various events occur.

Parameters:
pListener - a DeploymentListener to notify

removeDeploymentListener

public void removeDeploymentListener(atg.deployment.DeploymentListener pListener)
Removes a DeploymentListener from the deployment listener notification collection

Parameters:
pListener - the DeploymentListener to remove

getDeploymentListenerComparator

public java.util.Comparator<atg.deployment.DeploymentListener> getDeploymentListenerComparator()
An optional java.util.Comparator implementation to sort the configured DeploymentListener implementations, if necessary.


setDeploymentListenerComparator

public void setDeploymentListenerComparator(java.util.Comparator<atg.deployment.DeploymentListener> pDeploymentListenerComparator)
An optional java.util.Comparator implementation to sort the configured DeploymentListener implementations, if necessary.


isPurgeDeploymentData

public boolean isPurgeDeploymentData()
Returns:
Returns the value of the purgeDeploymentData property.

setPurgeDeploymentData

public void setPurgeDeploymentData(boolean pPurgeDeploymentData)
Parameters:
pPurgeDeploymentData - Sets the property value of the purgeDeploymentData property.

getDeploymentReporter

public atg.deployment.DeploymentReporter getDeploymentReporter()
Returns a DeploymentReporter object that can be used to interrogate a deployment about succeeded and failed items.


getDeploymentRepository

public Repository getDeploymentRepository()
Returns:
Returns the value of the deploymentRepository property.

setDeploymentRepository

public void setDeploymentRepository(Repository pDeploymentRepository)
Parameters:
pDeploymentRepository - Sets the property value of the deploymentRepository property.

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()
Returns:
Returns the value of the transactionManager property.

setTransactionManager

public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Parameters:
pTransactionManager - Sets the property value of the transactionManager property.

getLockManager

public ClientLockManager getLockManager()
Returns:
Returns the value of the lockManager property.

setLockManager

public void setLockManager(ClientLockManager pLockManager)
Parameters:
pLockManager - Sets the property value of the lockManager property.

getMessagingSource

public atg.deployment.messaging.DeploymentMessagingSource getMessagingSource()
Returns:
Returns the value of the messagingSource property.

setMessagingSource

public void setMessagingSource(atg.deployment.messaging.DeploymentMessagingSource pMessagingSource)
Parameters:
pMessagingSource - Sets the property value of the messagingSource property.

getServerNameService

public atg.service.ServerName getServerNameService()
Returns:
Returns the value of the serverNameService property.

setServerNameService

public void setServerNameService(atg.service.ServerName pServerNameService)
Parameters:
pServerName - Sets the value of the serverNameService property.

getClusterNameService

public atg.service.clustername.ClusterName getClusterNameService()
Returns:
Returns the value of the ClusterNameService property.

setClusterNameService

public void setClusterNameService(atg.service.clustername.ClusterName pClusterNameService)
Parameters:
pClusterName - Sets the value of the ClusterNameService property.

getVersionManager

public VersionManager getVersionManager()
Returns:
Returns the value of the versionManager property. This property is only set if the Publishing.base module is running.

setVersionManager

public void setVersionManager(VersionManager pVersionManager)
Parameters:
pVersionManager - Sets the value of the versionManager property. This property is only set if the Publishing.base module is running.

getThreadFactory

public atg.deployment.ThreadFactory getThreadFactory()
Get the factory that can be used to create DeploymentWorkerThread instances.

Returns:

setThreadFactory

public void setThreadFactory(atg.deployment.ThreadFactory pThreadFactory)
Set a factory for creating instances of DeploymentWorkerThread class.

Parameters:
pThreadFactory -

isShowReadonlyAdmin

public boolean isShowReadonlyAdmin()
If component admin should be shown in readonly mode.

Returns:

setShowReadonlyAdmin

public void setShowReadonlyAdmin(boolean pShowReadonlyAdmin)
Set to true when admin should be readonly.

Parameters:
pShowReadonlyAdmin -

isReferenceUpdateCommitOnNewItemType

public boolean isReferenceUpdateCommitOnNewItemType()
Returns:
the referenceUpdateCommitOnNewItemType

setReferenceUpdateCommitOnNewItemType

public void setReferenceUpdateCommitOnNewItemType(boolean pReferenceUpdateCommitOnNewItemType)
Parameters:
pReferenceUpdateCommitOnNewItemType - the referenceUpdateCommitOnNewItemType to set

deploy

public java.lang.String deploy(DeploymentData[] pDataArray,
                               DeploymentOptions pOptions,
                               java.lang.String pUserDeploymentId)
                        throws atg.deployment.DistributedDeploymentException
This method starts a new deployment using the data specified in the pDataArray parameter.

Parameters:
pDataArray - an array of DeploymentData objects, each which specify the source, destination, and data to be deployed
pOptions - deployment specific options used to control various aspects of deployment
Returns:
a deployment id
Throws:
atg.deployment.DistributedDeploymentException

deploy

public java.lang.String deploy(DeploymentData[] pDataArray,
                               DeploymentOptions pOptions)
                        throws atg.deployment.DistributedDeploymentException
This method starts a new deployment using the data specified in the pDataArray parameter.

Parameters:
pDataArray - an array of DeploymentData objects, each which specify the source, destination, and data to be deployed
pOptions - deployment specific options used to control various aspects of deployment
Returns:
a deployment id
Throws:
atg.deployment.DistributedDeploymentException

deploy

public java.lang.String deploy(DeploymentData pData,
                               DeploymentOptions pOptions,
                               java.lang.String pUserDeploymentId)
                        throws atg.deployment.DistributedDeploymentException
Convenience method to pass in a single DeploymentData object to deploy

Parameters:
pData - a DeploymentData object
pOptions - deployment specific options used to control various aspects of deployment
Returns:
a deployment id
Throws:
atg.deployment.DistributedDeploymentException

deploy

public java.lang.String deploy(DeploymentData pData,
                               DeploymentOptions pOptions)
                        throws atg.deployment.DistributedDeploymentException
Convenience method to pass in a single DeploymentData object to deploy

Parameters:
pData - a DeploymentData object
pOptions - deployment specific options used to control various aspects of deployment
Returns:
a deployment id
Throws:
atg.deployment.DistributedDeploymentException

resume

public void resume(java.lang.String pDeploymentId)
            throws atg.deployment.DistributedDeploymentException
This method is used to resume a previously failed or cancelled deployment.

Parameters:
pDeploymentId - The deployment id of the deployment to resume.
Throws:
atg.deployment.DistributedDeploymentException

restart

public void restart(java.lang.String pDeploymentId)
             throws atg.deployment.DistributedDeploymentException
This method is used to restart a previously failed or cancelled deployment.

Parameters:
pDeploymentId - The deployment id of the deployment to restart.
Throws:
atg.deployment.DistributedDeploymentException

deploy

public void deploy(java.lang.String pDeploymentId,
                   int pType)
            throws atg.deployment.DistributedDeploymentException
This method is used to resume a previously failed or cancelled deployment.

Parameters:
pDeploymentId - The deployment id of the deployment to resume.
pType - either Deployment.RESUME or Deployment.RESTART
Throws:
atg.deployment.DistributedDeploymentException

deploymentExists

public boolean deploymentExists(java.lang.String pDeploymentId)
This method is used to determine if a deployment exists with the given id.

Parameters:
pDeploymentId - The deployment id of the deployment.
Returns:
true if a deployment with the given id exists, false otherwise

isDeploymentRunning

public boolean isDeploymentRunning(java.lang.String pDeploymentId)
Returns true if the currently executing deployment's id is pDeploymentId. Will return false if the deployment with id pDeploymentId is waiting but not running.


cancel

public void cancel(java.lang.String pDeploymentId,
                   boolean pAllowResume)
            throws atg.deployment.DistributedDeploymentException
This method should be called to cancel a deployment. It changes the status of the deployment to cancel and then sends a message to all the running instances to cancel the deployment.

Parameters:
pDeploymentId - the deployment id of a running deployment
pAllowResume - if true, does not clean up deployment data and allows for later resume. If false, cleans up all deployment data and deployment id is no longer valid.
Throws:
DistributedDeploymentException - if any number of errors occurs, the source exception will be wrapped in the DeploymentException if another exception was caught in this method

getDeploymentProgress

public DeploymentProgress getDeploymentProgress(java.lang.String pDeploymentId)
Returns an object which contains information about the progress of a deployment.

Parameters:
pDeploymentId - the id of a deployment to get progress information for
Returns:
a DeploymentProgress object which contains the progress information

isDeploymentCompleted

public java.lang.Boolean isDeploymentCompleted(java.lang.String pDeploymentId)
Whether the deployment has completed successfully.

Parameters:
pDeploymentId - the id of a deployment to get progress information for
Returns:
Whether the deployment is completed. Null indicates no saved deployment

isDeploymentFailed

public java.lang.Boolean isDeploymentFailed(java.lang.String pDeploymentId)
Whether the deployment has failed

Parameters:
pDeploymentId - the id of a deployment to get progress information for
Returns:
Whether the deployment has failed. Null indicates no saved deployment

isDeploymentCanceled

public java.lang.Boolean isDeploymentCanceled(java.lang.String pDeploymentId)
Whether the deployment has canceled

Parameters:
pDeploymentId - the id of a deployment to get progress information for
Returns:
Whether the deployment has canceled. Null indicates no saved deployment

receiveMessage

public void receiveMessage(java.lang.String pPortName,
                           javax.jms.Message pMessage)
                    throws javax.jms.JMSException
This is called to notify the component that a Message has arrived through the given input port. The MessageSink should be prepared to handle concurrent calls of this method from multiple Threads.

Specified by:
receiveMessage in interface MessageSink
Throws:
javax.jms.JMSException

handleMessage

public void handleMessage(atg.deployment.messaging.DeploymentMessage pMessage)
                   throws RepositoryException,
                          atg.deployment.DistributedDeploymentException
This method handles processing the DeploymentMessage object which was delivered as part of a JMS message.

Parameters:
pMessage - the DeploymentMessage to process
Throws:
javax.jms.JMSException - if any exceptions occur, they are wrapped in a JMSException
RepositoryException
atg.deployment.DistributedDeploymentException

deleteDummyReferenceItems

public void deleteDummyReferenceItems()
This method is meant to be exposed in the admin server pages so a user can try to force delete all the dummy reference items. If other items references these items, an error will be thrown when they try to delete them.


purgeDataForCompletedDeployments

public void purgeDataForCompletedDeployments()
This method removes the deployment data and the markers for all completed deployments. The purpose of this method is so it can be available in the admin server. This method will cause the deployment repository item to be deleted also.


purgeDeploymentData

public void purgeDeploymentData(java.lang.String pDeploymentId,
                                boolean pPurgeDeploymentItem)
This method removes the deployment data and the markers for the completed deployment.

Parameters:
pDeploymentId - the id of the deployment to purge
pPurgeDeploymentItem - if true removes the deployment repository item also, if false keeps the deployment repository item in the database for reference

deploymentFailed

public void deploymentFailed(java.lang.String pId)
Called by a deployment object to be sure that a local event goes out to listeners registered for deployment notifications.

Parameters:
pId -

notifyDeploymentListeners

public void notifyDeploymentListeners(java.lang.String pDeploymentId,
                                      java.lang.String pEvent)
Notifies the deployment listeners of some event


logDebug

public void logDebug(java.lang.String pMessage)
Description copied from class: GenericService
Logs an debug event with the specified message

Specified by:
logDebug in interface ApplicationLogging
Overrides:
logDebug in class GenericService

isLoggingThreadDebug

public boolean isLoggingThreadDebug()

setLoggingThreadDebug

public void setLoggingThreadDebug(boolean pLoggingThreadDebug)

isLoggingItemDebug

public boolean isLoggingItemDebug()

setLoggingItemDebug

public void setLoggingItemDebug(boolean pLoggingItemDebug)

isLoggingPropertyDebug

public boolean isLoggingPropertyDebug()

setLoggingPropertyDebug

public void setLoggingPropertyDebug(boolean pLoggingPropertyDebug)

isLoggingPollingDebug

public boolean isLoggingPollingDebug()

setLoggingPollingDebug

public void setLoggingPollingDebug(boolean pLoggingPollingDebug)

isLoggingFileDebug

public boolean isLoggingFileDebug()

setLoggingFileDebug

public void setLoggingFileDebug(boolean pLoggingFileDebug)

doStartService

public void doStartService()
                    throws ServiceException
Description copied from class: GenericService
This is called after a Service has been created, placed into the naming hierarchy, and initialized with its configured property values. The Service should override this method to start any processes it requires.

Overrides:
doStartService in class GenericService
Throws:
ServiceException - if the Service had a problem starting up

doStopService

public void doStopService()
                   throws ServiceException
Description copied from class: GenericService
This is called when a Service is required to shut down. The Service should respond by stopping any processes that it has started.

Overrides:
doStopService in class GenericService
Throws:
ServiceException - if the Service had a problem shutting down

createAdminServlet

protected javax.servlet.Servlet createAdminServlet()
Creates and returns a new Servlet that will administer this service. By default, this creates a ServiceAdminServlet, but subclasses may create their own servlets.

Overrides:
createAdminServlet in class GenericService