atg.commerce.csr.ticketing
Class CSRTicketDispositionMonitor

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.logging.ApplicationLoggingImpl
          extended by atg.commerce.csr.ticketing.CSRTicketDispositionMonitor
All Implemented Interfaces:
atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.ticketing.TicketDispositionMonitor

public class CSRTicketDispositionMonitor
extends atg.nucleus.logging.ApplicationLoggingImpl
implements atg.ticketing.TicketDispositionMonitor

The CSR implementation of the TicketDispositionMonitor interface. This monitor checks the ticket for any Commerce activities. If any exist, shouldDiscard returns "false". Created: July 28 2005


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
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
CSRTicketDispositionMonitor()
           
 
Method Summary
 java.lang.String getActivitiesPropertyName()
           
 java.lang.String[] getNonDiscardableActivityTypes()
          Default value is the list of defaultRecorderactivities and eventTypeToRecorderMap if not specified in property file.
 TicketingEventListener getTicketingEventListener()
           
 boolean isOwnerChangeable(atg.repository.RepositoryItem pTicket, java.lang.String pNewOwnerId)
          Whether the ticket can have it owner property changed to a new owner.
 void setActivitiesPropertyName(java.lang.String pActivitiesPropertyName)
          The name of the activities property of the ticket item descriptor
 void setNonDiscardableActivityTypes(java.lang.String[] pNonDiscardableActivityTypes)
          The types of activities whose presence on a ticket will result in the ticket not being discarded
 void setTicketingEventListener(TicketingEventListener pTicketingEventListener)
          The TicketingEventListener component which will provide the CSR activity types by default
 boolean shouldDiscard(atg.repository.RepositoryItem pTicket)
          Whether we should discard the ticket in question.
 boolean shouldDiscardImmediately(atg.repository.RepositoryItem pTicket)
          Whether we should dispose a ticket immediately.
 
Methods inherited from class atg.nucleus.logging.ApplicationLoggingImpl
addGlobalLogListeners, addLogListener, getLoggingForVlogging, getLoggingIdentifer, getLoggingIdentifier, getLogListenerCount, getLogListeners, initializeFromServiceEvent, isAutoInitListeners, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, removeLogListener, sendLogEvent, setAutoInitListeners, setLoggingDebug, setLoggingError, setLoggingIdentifier, setLoggingInfo, setLoggingTrace, setLoggingWarning
 
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

Constructor Detail

CSRTicketDispositionMonitor

public CSRTicketDispositionMonitor()
Method Detail

setActivitiesPropertyName

public void setActivitiesPropertyName(java.lang.String pActivitiesPropertyName)
The name of the activities property of the ticket item descriptor

Parameters:
pActivitiesPropertyName - the name of the activities property of the ticket item descriptor

getActivitiesPropertyName

public java.lang.String getActivitiesPropertyName()
Returns:
the name of the activities property of the ticket item descriptor

setNonDiscardableActivityTypes

public void setNonDiscardableActivityTypes(java.lang.String[] pNonDiscardableActivityTypes)
The types of activities whose presence on a ticket will result in the ticket not being discarded

Parameters:
pNonDiscardableActivityTypes - the types of activities whose presence on a ticket will result in the ticket not being discarded

getNonDiscardableActivityTypes

public java.lang.String[] getNonDiscardableActivityTypes()
Default value is the list of defaultRecorderactivities and eventTypeToRecorderMap if not specified in property file.

Returns:
the types of activities whose prescense on a ticket will result in the ticket not being discarded

setTicketingEventListener

public void setTicketingEventListener(TicketingEventListener pTicketingEventListener)
The TicketingEventListener component which will provide the CSR activity types by default

Parameters:
pTicketingEventListener - the TicketingEventListener component which will provide the CSR activity types by default

getTicketingEventListener

public TicketingEventListener getTicketingEventListener()
Returns:
the TicketingEventListener component which will provide the CSR activity types by default

shouldDiscard

public boolean shouldDiscard(atg.repository.RepositoryItem pTicket)
Whether we should discard the ticket in question. If the ticket contains any Commerce activities, we return false

Specified by:
shouldDiscard in interface atg.ticketing.TicketDispositionMonitor
Parameters:
pTicket - the ticket in question.
Returns:
true if the ticket should be discarded, true if the ticket should be persisted.

shouldDiscardImmediately

public boolean shouldDiscardImmediately(atg.repository.RepositoryItem pTicket)
Whether we should dispose a ticket immediately. Returns the result of "shouldDiscard". We rely on the platform TicketDispositionMonitors to not discard immediately if there have been any actions on this ticket.

Specified by:
shouldDiscardImmediately in interface atg.ticketing.TicketDispositionMonitor
Parameters:
pTicket - the ticket in question.
Returns:
true if the ticket should be discarded immediately,

isOwnerChangeable

public boolean isOwnerChangeable(atg.repository.RepositoryItem pTicket,
                                 java.lang.String pNewOwnerId)
Whether the ticket can have it owner property changed to a new owner.

This monitor always returns the value of shouldDiscard.

If there are any commerce activities on the ticket, the owner cannot change.

Specified by:
isOwnerChangeable in interface atg.ticketing.TicketDispositionMonitor
Parameters:
pTicket - the ticket in question.
pNewOwnerId - the id of the potential new owner
Returns:
true if the owner can change.