atg.svc.agent.ticketing
Class TicketingTools

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.svc.agent.ticketing.TicketingTools
All Implemented Interfaces:
atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameResolver, atg.nucleus.AdminableService, 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

public class TicketingTools
extends atg.nucleus.GenericService

This component contains a base set of API for dealing with tickets in the Service application.


Field Summary
static java.lang.String CLASS_VERSION
           
protected  EnvironmentTools mEnvironmentTools
           
protected  FrameworkProfileService mProfileService
           
protected  atg.ticketing.TicketingManager mTicketingManager
           
protected  java.util.ResourceBundle sTicketingResourceBundle
           
protected static java.lang.String TICKETINGRESOURCES
          Resources file
 
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
TicketingTools()
           
 
Method Summary
 boolean addActivityNote(atg.repository.RepositoryItem pTicket, atg.repository.RepositoryItem pActivity, java.lang.String pTicketNote, java.lang.String pApplicationName, atg.repository.RepositoryItem pAgentProfile, boolean pShare, boolean pInbound)
          Either sets the work note properties of the given activity or creates a new callNoteActivity and adds it to the ticket.
 atg.repository.RepositoryItem addWorkNote(atg.repository.RepositoryItem pTicket, java.lang.String pTicketNote, java.lang.String pApplicationName, atg.repository.RepositoryItem pAgentProfile, boolean pShare)
          Adds a work note to the ticket.
 atg.repository.RepositoryItem close(atg.repository.RepositoryItem pTicket, atg.repository.RepositoryItem pAgentProfile, java.lang.String pApplicationName, java.lang.String pReasonCode, java.lang.String pSubStatus)
          Closes a ticket.
 atg.repository.RepositoryItem defer(atg.repository.RepositoryItem pTicket, atg.repository.RepositoryItem pAgentProfile, java.lang.String pApplicationName, java.util.Date pDate, boolean pRetainOwnership, java.lang.String pReasonCode)
          Defers a ticket.
 atg.repository.RepositoryItem escalate(atg.repository.RepositoryItem pTicket, atg.repository.RepositoryItem pAgentProfile, java.lang.String pApplicationName, java.lang.String pEscalationLevel, java.lang.String pReasonCode)
          Escalates a ticket to the given level and sends the escalate ticket event.
 java.util.List getAllAgents()
          Returns all agents in the repository sorted by login name
 EnvironmentTools getEnvironmentTools()
           
 int getNextHigherEscalationLevel(atg.repository.RepositoryItem pTicket)
          Returns the next escalation level for the ticket
 int getNextHigherEscalationLevelForCurrentTicket()
          Returns the next escalation level for the environment's current ticket
 atg.repository.RepositoryItem getNextPushedTicket(java.lang.String pApplicationName, atg.repository.RepositoryItem pAgentProfile)
          Returns the next ticket from the agent's queue if they are push agent.
 FrameworkProfileService getProfileService()
           
 atg.ticketing.TicketingManager getTicketingManager()
           
 java.util.List getTicketQueues()
          Creates a list of ticket queues
 atg.repository.RepositoryItem reassign(atg.repository.RepositoryItem pTicket, atg.repository.RepositoryItem pAgentProfile, java.lang.String pAssigneeProfileId, java.lang.String pApplicationName, java.lang.String pReasonCode)
          Assigns the ticket to a different agent.
 atg.repository.RepositoryItem release(atg.repository.RepositoryItem pTicket, atg.repository.RepositoryItem pAgentProfile, java.lang.String pApplicationName, java.lang.String pReasonCode, boolean pForced)
          Releases the current ticket
 atg.repository.RepositoryItem sendToGroup(atg.repository.RepositoryItem pTicket, java.lang.String pGroup, atg.repository.RepositoryItem pAgentProfile, java.lang.String pApplicationName, java.lang.String pReasonCode)
          Reassigns the ticket to a specific group (ticket queue)
 void setEnvironmentTools(EnvironmentTools pEnvironmentTools)
           
 void setProfileService(FrameworkProfileService pProfileService)
           
 void setTicketingManager(atg.ticketing.TicketingManager pTicketingManager)
           
 void updateRecentTickets(java.lang.String ticketId, atg.svc.repository.beans.RecentTicketsType type)
          Updates the the recent ticket service with the given ticket
 void workTicket(atg.repository.RepositoryItem pTicket, java.lang.String pApplicationName, atg.repository.RepositoryItem pAgentProfile)
          Reopens and either claims or unsuspends a ticket for an agent to "work" on it.
 
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
See Also:
Constant Field Values

TICKETINGRESOURCES

protected static final java.lang.String TICKETINGRESOURCES
Resources file

See Also:
Constant Field Values

sTicketingResourceBundle

protected final java.util.ResourceBundle sTicketingResourceBundle

mEnvironmentTools

protected EnvironmentTools mEnvironmentTools

mTicketingManager

protected atg.ticketing.TicketingManager mTicketingManager

mProfileService

protected FrameworkProfileService mProfileService
Constructor Detail

TicketingTools

public TicketingTools()
Method Detail

setEnvironmentTools

public void setEnvironmentTools(EnvironmentTools pEnvironmentTools)

getEnvironmentTools

public EnvironmentTools getEnvironmentTools()

setTicketingManager

public void setTicketingManager(atg.ticketing.TicketingManager pTicketingManager)

getTicketingManager

public atg.ticketing.TicketingManager getTicketingManager()

setProfileService

public void setProfileService(FrameworkProfileService pProfileService)

getProfileService

public FrameworkProfileService getProfileService()

addActivityNote

public boolean addActivityNote(atg.repository.RepositoryItem pTicket,
                               atg.repository.RepositoryItem pActivity,
                               java.lang.String pTicketNote,
                               java.lang.String pApplicationName,
                               atg.repository.RepositoryItem pAgentProfile,
                               boolean pShare,
                               boolean pInbound)
                        throws atg.ticketing.TicketingException,
                               atg.repository.RepositoryException
Either sets the work note properties of the given activity or creates a new callNoteActivity and adds it to the ticket.

Parameters:
pTicket - The ticket to receive the note
pActivity - (optional) If provided, the note is set on the activity.
pTicketNote - The text of the note
pApplicationName - The application name used for the note
pAgentProfile - The agent's profile repository item
pShare - determines the customer visibility of the note.
pInbound - Applies only when pActivity is null. Used as the inbound property value of the new callNoteActivity created for the note.
Returns:
true if the note was successfully added
Throws:
atg.ticketing.TicketingException
atg.repository.RepositoryException

addWorkNote

public atg.repository.RepositoryItem addWorkNote(atg.repository.RepositoryItem pTicket,
                                                 java.lang.String pTicketNote,
                                                 java.lang.String pApplicationName,
                                                 atg.repository.RepositoryItem pAgentProfile,
                                                 boolean pShare)
                                          throws atg.ticketing.TicketingException
Adds a work note to the ticket.

Parameters:
pTicket - The ticket to recieve the note
pTicketNote - The text of the note
pApplicationName - The application name used for the note
pAgentProfile - The agent's profile repository item
pShare - determines the customer visibility of the note.
Returns:
RepositoryItem the work note.
Throws:
atg.ticketing.TicketingException

getNextPushedTicket

public atg.repository.RepositoryItem getNextPushedTicket(java.lang.String pApplicationName,
                                                         atg.repository.RepositoryItem pAgentProfile)
Returns the next ticket from the agent's queue if they are push agent.

Returns:
ticket repository item

workTicket

public void workTicket(atg.repository.RepositoryItem pTicket,
                       java.lang.String pApplicationName,
                       atg.repository.RepositoryItem pAgentProfile)
                throws atg.ticketing.TicketingException
Reopens and either claims or unsuspends a ticket for an agent to "work" on it.

Parameters:
pTicket -
pApplicationName -
pAgentProfile - the agent for which the ticket is being claimed
Throws:
atg.ticketing.TicketingException

defer

public atg.repository.RepositoryItem defer(atg.repository.RepositoryItem pTicket,
                                           atg.repository.RepositoryItem pAgentProfile,
                                           java.lang.String pApplicationName,
                                           java.util.Date pDate,
                                           boolean pRetainOwnership,
                                           java.lang.String pReasonCode)
                                    throws atg.ticketing.TicketingException
Defers a ticket.

Parameters:
pTicket -
pAgentProfile -
pApplicationName -
pDate -
pRetainOwnership -
pReasonCode -
Returns:
the ticket activity created by suspending the ticket
Throws:
atg.ticketing.TicketingException
See Also:
TicketingManager.suspendTicket(String, RepositoryItem, RepositoryItem, String, boolean, Date)

escalate

public atg.repository.RepositoryItem escalate(atg.repository.RepositoryItem pTicket,
                                              atg.repository.RepositoryItem pAgentProfile,
                                              java.lang.String pApplicationName,
                                              java.lang.String pEscalationLevel,
                                              java.lang.String pReasonCode)
                                       throws atg.ticketing.TicketingException
Escalates a ticket to the given level and sends the escalate ticket event.

Parameters:
pTicket -
pAgentProfile -
pApplicationName -
pEscalationLevel -
pReasonCode -
Returns:
the activity item created for the escalate
Throws:
atg.ticketing.TicketingException

close

public atg.repository.RepositoryItem close(atg.repository.RepositoryItem pTicket,
                                           atg.repository.RepositoryItem pAgentProfile,
                                           java.lang.String pApplicationName,
                                           java.lang.String pReasonCode,
                                           java.lang.String pSubStatus)
                                    throws atg.ticketing.TicketingException
Closes a ticket.

In addition to closing the ticket, this method removes any work in progress activity on the ticket and sends the close ticket agent event.

Parameters:
pTicket -
pAgentProfile -
pApplicationName -
pReasonCode -
pSubStatus -
Returns:
the ticket activity created by closing the ticket
Throws:
atg.ticketing.TicketingException

updateRecentTickets

public void updateRecentTickets(java.lang.String ticketId,
                                atg.svc.repository.beans.RecentTicketsType type)
Updates the the recent ticket service with the given ticket

Parameters:
ticketId -
type -

reassign

public atg.repository.RepositoryItem reassign(atg.repository.RepositoryItem pTicket,
                                              atg.repository.RepositoryItem pAgentProfile,
                                              java.lang.String pAssigneeProfileId,
                                              java.lang.String pApplicationName,
                                              java.lang.String pReasonCode)
                                       throws atg.ticketing.TicketingException,
                                              atg.repository.RepositoryException
Assigns the ticket to a different agent.

Parameters:
pTicket -
pAgentProfile -
pAssigneeProfileId -
pApplicationName -
pReasonCode -
Returns:
the ticket activity repository item created by the reassignment.
Throws:
atg.ticketing.TicketingException
atg.repository.RepositoryException

sendToGroup

public atg.repository.RepositoryItem sendToGroup(atg.repository.RepositoryItem pTicket,
                                                 java.lang.String pGroup,
                                                 atg.repository.RepositoryItem pAgentProfile,
                                                 java.lang.String pApplicationName,
                                                 java.lang.String pReasonCode)
                                          throws atg.ticketing.TicketingException,
                                                 atg.repository.RepositoryException
Reassigns the ticket to a specific group (ticket queue)

Parameters:
pTicket -
pGroup -
pAgentProfile -
pApplicationName -
pReasonCode -
Returns:
the ticket activity item generated from the send.
Throws:
atg.ticketing.TicketingException
atg.repository.RepositoryException

getTicketQueues

public java.util.List getTicketQueues()
Creates a list of ticket queues

Returns:
List

getNextHigherEscalationLevelForCurrentTicket

public int getNextHigherEscalationLevelForCurrentTicket()
Returns the next escalation level for the environment's current ticket

Returns:
int

getNextHigherEscalationLevel

public int getNextHigherEscalationLevel(atg.repository.RepositoryItem pTicket)
Returns the next escalation level for the ticket

Returns:
int

release

public atg.repository.RepositoryItem release(atg.repository.RepositoryItem pTicket,
                                             atg.repository.RepositoryItem pAgentProfile,
                                             java.lang.String pApplicationName,
                                             java.lang.String pReasonCode,
                                             boolean pForced)
                                      throws atg.ticketing.TicketingException,
                                             atg.repository.RepositoryException
Releases the current ticket

Parameters:
pTicket -
pAgentProfile -
pApplicationName -
pReasonCode -
pForced -
Returns:
RepositoryItem
Throws:
atg.ticketing.TicketingException
atg.repository.RepositoryException
See Also:
TicketingManager.releaseTicket(String, RepositoryItem, RepositoryItem, String, boolean)

getAllAgents

public java.util.List getAllAgents()
Returns all agents in the repository sorted by login name

Returns:
List of agent repository items