atg.deployment.server.queue
Class RecurringDeploymentService

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.deployment.server.queue.RecurringDeploymentService
All Implemented Interfaces:
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, Schedulable, java.util.EventListener

public class RecurringDeploymentService
extends GenericService
implements Schedulable

This service is responsible for initiating a deployment of all pending projects at a user defined interval.


Field Summary
static java.lang.String CLASS_VERSION
           
 
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
RecurringDeploymentService()
           
 
Method Summary
 void doStartService()
          Schedules the recurring deployment job
 void doStopService()
          Removes the recurring deployment job from the scheduler
 java.lang.String[] getCandidateTargetNames()
          Get CandidateTargetNames.
 DeploymentServer getDeploymentServer()
           
 boolean getEnabled()
           
 java.lang.String getPersonaPrefix()
           
 java.util.Collection getProjectsToDeploy(java.util.Collection pAllPendingProjects, java.lang.String pTargetId)
          Returns the list of projects to deploy.
 Schedule getSchedule()
           
 Scheduler getScheduler()
          Get property scheduler
 javax.transaction.TransactionManager getTransactionManager()
           
 UserDirectoryUserAuthority getUserAuthority()
          Returns the UserAuthority
 java.lang.String getUsername()
           
 VersionManager getVersionManager()
           
 boolean isForceFull()
          Whether to force a full deployment.
protected  boolean login()
          Authenticate this session to permit further operations requiring a knowledge of the user's identity.
protected  void logout()
           
 void performScheduledTask(Scheduler pScheduler, ScheduledJob pJob)
          Perform the scheduled task for this service.
 void setCandidateTargetNames(java.lang.String[] pCandidateTargetNames)
          Set CandidateTargetNames.
 void setDeploymentServer(DeploymentServer pDeploymentServer)
           
 void setEnabled(boolean pEnabled)
           
 void setForceFull(boolean pForceFull)
           
 void setPersonaPrefix(java.lang.String string)
           
 void setSchedule(Schedule schedule)
           
 void setScheduler(Scheduler pScheduler)
          Set property scheduler
 void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
           
 void setUserAuthority(UserDirectoryUserAuthority pUserAuthority)
          Sets the UserAuthority
 void setUsername(java.lang.String string)
           
 void setVersionManager(VersionManager pVersionManager)
           
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, 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
Constructor Detail

RecurringDeploymentService

public RecurringDeploymentService()
Method Detail

getSchedule

public Schedule getSchedule()
Returns:
the recurring deployment schedule which is supplied to the scheduler service

setSchedule

public void setSchedule(Schedule schedule)
Parameters:
schedule - the recurring deployment schedule which is supplied to the scheduler service

setCandidateTargetNames

public void setCandidateTargetNames(java.lang.String[] pCandidateTargetNames)
Set CandidateTargetNames.

Parameters:
pCandidateTargetNames - the value to set.

getCandidateTargetNames

public java.lang.String[] getCandidateTargetNames()
Get CandidateTargetNames.

Returns:
CandidateTargetNames.

getUserAuthority

public UserDirectoryUserAuthority getUserAuthority()
Returns the UserAuthority


setUserAuthority

public void setUserAuthority(UserDirectoryUserAuthority pUserAuthority)
Sets the UserAuthority


getPersonaPrefix

public java.lang.String getPersonaPrefix()
Returns:
the persona prefix to use to resolve the username given in the action within the workflow

setPersonaPrefix

public void setPersonaPrefix(java.lang.String string)
Parameters:
string - the persona prefix to use to resolve the username given in the action within the workflow

isForceFull

public boolean isForceFull()
Whether to force a full deployment.

Returns:
Returns the forceFull.

setForceFull

public void setForceFull(boolean pForceFull)
Parameters:
pForceFull - The forceFull to set.

getUsername

public java.lang.String getUsername()
Returns:
the username to execute the deployment in the context of

setUsername

public void setUsername(java.lang.String string)
Parameters:
string - the username to execute the deployment in the context of

setScheduler

public void setScheduler(Scheduler pScheduler)
Set property scheduler

Parameters:
pScheduler - new value to set

getScheduler

public Scheduler getScheduler()
Get property scheduler

Returns:
scheduler

getDeploymentServer

public DeploymentServer getDeploymentServer()
Returns:
Returns the deploymentServer.

setDeploymentServer

public void setDeploymentServer(DeploymentServer pDeploymentServer)
Parameters:
pDeploymentServer - The deploymentServer to set.

getTransactionManager

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

setTransactionManager

public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Parameters:
pTransactionManager - The transactionManager to set.

getVersionManager

public VersionManager getVersionManager()
Returns:
Returns the versionManger.

setVersionManager

public void setVersionManager(VersionManager pVersionManager)
Parameters:
pVersionManager - The versionManager to set.

getEnabled

public boolean getEnabled()
Returns:
the enabled flag

setEnabled

public void setEnabled(boolean pEnabled)
Parameters:
pEnabled - the enabled flag

doStartService

public void doStartService()
                    throws ServiceException
Schedules the recurring deployment job

Overrides:
doStartService in class GenericService
Throws:
ServiceException - if the Service had a problem starting up
See Also:
GenericService.doStartService()

doStopService

public void doStopService()
                   throws ServiceException
Removes the recurring deployment job from the scheduler

Overrides:
doStopService in class GenericService
Throws:
ServiceException - if the Service had a problem shutting down
See Also:
GenericService.doStopService()

performScheduledTask

public void performScheduledTask(Scheduler pScheduler,
                                 ScheduledJob pJob)
Perform the scheduled task for this service.

Specified by:
performScheduledTask in interface Schedulable
Parameters:
pScheduler - the scheduler which is starting this job
pJob - the job to start

getProjectsToDeploy

public java.util.Collection getProjectsToDeploy(java.util.Collection pAllPendingProjects,
                                                java.lang.String pTargetId)
Returns the list of projects to deploy. Override this method to change the list of projects to be deployed.

Parameters:
pAllPendingProjects - the list of all the current pending projects for deployment.
pTargetId -
Returns:
a list of projects to deploy. The projects in the pAllPendingProjects collection can be changed in this method if user defined filtering needs to occur. By default this method returns pAllPendingProjects.

login

protected boolean login()
Authenticate this session to permit further operations requiring a knowledge of the user's identity.


logout

protected void logout()