atg.commerce.csr.ticketing
Class TicketingActivityRecorder

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.commerce.csr.ticketing.TicketingActivityRecorder
All Implemented Interfaces:
atg.naming.AbsoluteNameable, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameContextParentable, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.Configured, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, java.util.EventListener
Direct Known Subclasses:
TicketingPropertyUpdateRecorder

public class TicketingActivityRecorder
extends atg.nucleus.GenericService

Base class for creating ticketing activity records.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
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
TicketingActivityRecorder()
           
 
Method Summary
protected  void addHeading(atg.repository.MutableRepositoryItem pTicketActivity, atg.agent.events.AgentEvent pAgentEvent)
          Adds the "heading" to the activity - a string that describes the activity
protected  boolean associateOrder(atg.repository.MutableRepository pTicketingRepository, atg.repository.MutableRepositoryItem pTicket, atg.agent.events.AgentEvent pAgentEvent)
          Checks if there is a non-transient order id in the event.
protected  atg.repository.MutableRepositoryItem createActivityItem(atg.repository.MutableRepository pTicketingRepository, atg.agent.events.AgentEvent pAgentEvent, atg.repository.RepositoryItem pTicket, atg.repository.RepositoryItem pAgentProfile)
          Creates the mutable ticketing activity repository item
 java.lang.String getApplicationName()
           
 CSRAgentTools getCSRAgentTools()
          Returns the cSRAgentTools.
 java.util.Map getCustomProperties()
           
 java.lang.String getHeadingPropertyName()
           
 atg.repository.Repository getInternalProfileRepository()
           
 java.lang.String getOrderItemDescriptorName()
           
 atg.repository.Repository getOrderRepository()
           
 java.lang.String getOrdersPropertyName()
           
 atg.ticketing.TicketingManager getTicketingManager()
           
 java.lang.String getUserItemDescriptorName()
           
 boolean isSaveTransientOrderActivities()
           
 void logEvent(atg.repository.MutableRepository pTicketingRepository, atg.agent.events.AgentEvent pAgentEvent)
          Creates a ticketing activity repository item based on the agent event and adds it to the ticketing repository.
protected  void populateCustomProperties(atg.repository.MutableRepository pTicketingRepository, atg.repository.MutableRepositoryItem pActivityItem, atg.agent.events.AgentEvent pAgentEvent)
          Copies the properties defined in the customProperties property from the agent event to the activity item.
 void setApplicationName(java.lang.String pApplicationName)
          The application name that should be saved with the ticket activity
 void setCSRAgentTools(CSRAgentTools pAgentTools)
          Sets the cSRAgentTools.
 void setCustomProperties(java.util.Map pCustomProperties)
          Sets the map of properties that will be copied from the agent event to the activity repository item.
 void setHeadingPropertyName(java.lang.String pHeadingPropertyName)
          The property in the ticket activity repository item that stores a description of the activity
 void setInternalProfileRepository(atg.repository.Repository pInternalProfileRepository)
          The repository where the agent profiles live
 void setOrderItemDescriptorName(java.lang.String pOrderItemDescriptorName)
          The name of the order item descriptor in the order repository
 void setOrderRepository(atg.repository.Repository pOrderRepository)
          The repository in which the orders are stored
 void setOrdersPropertyName(java.lang.String pOrdersPropertyName)
          The property in the ticket repository item that stores the associated orders
 void setSaveTransientOrderActivities(boolean pSaveTransientOrderActivities)
          Boolean indicating if activities relating to transient orders should be saved to the ticket
 void setTicketingManager(atg.ticketing.TicketingManager pTicketingManager)
          The TicketingManager used to add activities to tickets
 void setUserItemDescriptorName(java.lang.String pUserItemDescriptorName)
          The name of the user item descriptor in the InternalProfileRepository
 boolean shouldSaveTicket(atg.repository.RepositoryItem pTicket)
          The ticket should be saved if the activity added means it should not be discarded
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, 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 final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Constructor Detail

TicketingActivityRecorder

public TicketingActivityRecorder()
Method Detail

getCSRAgentTools

public CSRAgentTools getCSRAgentTools()
Returns the cSRAgentTools.

Returns:
cSRAgentTools

setCSRAgentTools

public void setCSRAgentTools(CSRAgentTools pAgentTools)
Sets the cSRAgentTools.

Parameters:
pAgentTools -

setApplicationName

public void setApplicationName(java.lang.String pApplicationName)
The application name that should be saved with the ticket activity

Parameters:
pApplicationName - the application name that should be saved with the ticket activity

getApplicationName

public java.lang.String getApplicationName()
Returns:
the application name that should be saved with the ticket activity

getCustomProperties

public java.util.Map getCustomProperties()
Returns:
Returns the map of properties that will be copied from the agent event to the activity repository item. Map includes the agent property names mapped to their associated activity item property name.

setCustomProperties

public void setCustomProperties(java.util.Map pCustomProperties)
Sets the map of properties that will be copied from the agent event to the activity repository item. Map includes the agent property names mapped to their associated activity item property name.

Parameters:
pCustomProperties - The customProperties to set.

setHeadingPropertyName

public void setHeadingPropertyName(java.lang.String pHeadingPropertyName)
The property in the ticket activity repository item that stores a description of the activity

Parameters:
pHeadingPropertyName - The property in the ticket activity repository item that stores a description of the activity

getHeadingPropertyName

public java.lang.String getHeadingPropertyName()
Returns:
The property in the ticket activity repository item that stores a description of the activity

setInternalProfileRepository

public void setInternalProfileRepository(atg.repository.Repository pInternalProfileRepository)
The repository where the agent profiles live

Parameters:
pInternalProfileRepository - the repository where the agent profiles live

getInternalProfileRepository

public atg.repository.Repository getInternalProfileRepository()
Returns:
the repository where the agent profiles live

setOrderItemDescriptorName

public void setOrderItemDescriptorName(java.lang.String pOrderItemDescriptorName)
The name of the order item descriptor in the order repository

Parameters:
pOrderItemDescriptorName - the name of the order item descriptor in the order repository

getOrderItemDescriptorName

public java.lang.String getOrderItemDescriptorName()
Returns:
the name of the order item descriptor in the order repository

setOrderRepository

public void setOrderRepository(atg.repository.Repository pOrderRepository)
The repository in which the orders are stored

Parameters:
pOrderRepository - the repository in which the orders are stored

getOrderRepository

public atg.repository.Repository getOrderRepository()
Returns:
the repository in which the orders are stored

setOrdersPropertyName

public void setOrdersPropertyName(java.lang.String pOrdersPropertyName)
The property in the ticket repository item that stores the associated orders

Parameters:
pOrdersPropertyName - the property in the ticket repository item that stores the associated orders

getOrdersPropertyName

public java.lang.String getOrdersPropertyName()
Returns:
the property in the ticket repository item that stores the associated orders

setSaveTransientOrderActivities

public void setSaveTransientOrderActivities(boolean pSaveTransientOrderActivities)
Boolean indicating if activities relating to transient orders should be saved to the ticket

Parameters:
pSaveTransientOrderActivities - boolean indicating if activities relating to transient orders should be saved to the ticket

isSaveTransientOrderActivities

public boolean isSaveTransientOrderActivities()
Returns:
boolean indicating if activities relating to transient orders should be saved to the ticket

setTicketingManager

public void setTicketingManager(atg.ticketing.TicketingManager pTicketingManager)
The TicketingManager used to add activities to tickets

Parameters:
pTicketingManager - the TicketingManager used to add activities to tickets

getTicketingManager

public atg.ticketing.TicketingManager getTicketingManager()
Returns:
the TicketingManager used to add activities to tickets

setUserItemDescriptorName

public void setUserItemDescriptorName(java.lang.String pUserItemDescriptorName)
The name of the user item descriptor in the InternalProfileRepository

Parameters:
pUserItemDescriptorName - the name of the user item descriptor in the InternalProfileRepository

getUserItemDescriptorName

public java.lang.String getUserItemDescriptorName()
Returns:
the name of the user item descriptor in the InternalProfileRepository

addHeading

protected void addHeading(atg.repository.MutableRepositoryItem pTicketActivity,
                          atg.agent.events.AgentEvent pAgentEvent)
                   throws atg.ticketing.TicketingException
Adds the "heading" to the activity - a string that describes the activity

Parameters:
pTicketActivity -
pAgentEvent -
Throws:
atg.ticketing.TicketingException

associateOrder

protected boolean associateOrder(atg.repository.MutableRepository pTicketingRepository,
                                 atg.repository.MutableRepositoryItem pTicket,
                                 atg.agent.events.AgentEvent pAgentEvent)
                          throws atg.ticketing.TicketingException
Checks if there is a non-transient order id in the event. If so, it associates that order with the ticket

Parameters:
pTicketingRepository -
pTicket -
pAgentEvent -
Throws:
atg.ticketing.TicketingException

createActivityItem

protected atg.repository.MutableRepositoryItem createActivityItem(atg.repository.MutableRepository pTicketingRepository,
                                                                  atg.agent.events.AgentEvent pAgentEvent,
                                                                  atg.repository.RepositoryItem pTicket,
                                                                  atg.repository.RepositoryItem pAgentProfile)
                                                           throws atg.repository.RepositoryException,
                                                                  atg.ticketing.TicketingException
Creates the mutable ticketing activity repository item

Parameters:
pTicketingRepository - the ticketing repository
pAgentEvent - the agent event the will be recorded in the item
pTicket - the ticket item
pAgentProfile - the agent profile
Returns:
the mutable ticket activity repository item
Throws:
atg.repository.RepositoryException
atg.ticketing.TicketingException

populateCustomProperties

protected void populateCustomProperties(atg.repository.MutableRepository pTicketingRepository,
                                        atg.repository.MutableRepositoryItem pActivityItem,
                                        atg.agent.events.AgentEvent pAgentEvent)
                                 throws atg.ticketing.TicketingException
Copies the properties defined in the customProperties property from the agent event to the activity item.

Parameters:
pActivityItem -
pAgentEvent -
Throws:
atg.ticketing.TicketingException

logEvent

public void logEvent(atg.repository.MutableRepository pTicketingRepository,
                     atg.agent.events.AgentEvent pAgentEvent)
              throws atg.ticketing.TicketingException
Creates a ticketing activity repository item based on the agent event and adds it to the ticketing repository.

Parameters:
pTicketingRepository -
pAgentEvent -
Throws:
atg.ticketing.TicketingException

shouldSaveTicket

public boolean shouldSaveTicket(atg.repository.RepositoryItem pTicket)
                         throws atg.ticketing.TicketingException
The ticket should be saved if the activity added means it should not be discarded

Parameters:
pTicket - the ticket repository item
Throws:
atg.ticketing.TicketingException