atg.svc.repository.service
Class RecentTicketsService

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.svc.repository.service.BaseService
              extended by atg.svc.repository.service.RecentTicketsService
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

@Service(requiredProperties={"optionService","profileService","ticketingRepository"})
public class RecentTicketsService
extends BaseService

Service class for the RecentTickets Repository Item.


Nested Class Summary
protected  class RecentTicketsService.SaveRecentTicketsRunner
          Save Runner that creates a collection of new repository objects from a collection of new beans.
 
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
RecentTicketsService()
           
 
Method Summary
 void checkMaximumRecordLimit(atg.userprofiling.Profile pProfile)
          This method check for the maximum record limit for Recent Tickets for a particular user.
 void checkMaximumRecordLimit(java.lang.String pProfileId, java.util.List<atg.svc.repository.beans.RecentTickets> pRecentTickets)
          This method check for the maximum record limit for Recent Tickets for a particular user.
 void checkMaximumRecordLimit(java.lang.String pProfileId, atg.svc.repository.beans.RecentTickets pRecentTickets)
          This method check for the maximum record limit for Recent Tickets for a particular user and of ticket type.
 atg.svc.repository.beans.RecentTickets createRecentTickets()
          Creates a new transient RecentTickets repository bean.
 void deleteRecentTicket(java.lang.String pRecentTicketsId)
          Deleted the specified recent tickets from repository.
 atg.svc.repository.beans.RecentTickets edit(java.lang.String pRecentTicketsId)
          Gets an editable version of a recent tickets given the repository id of the recentTickets .
 atg.svc.repository.service.OptionService getOptionService()
           
 FrameworkProfileService getProfileService()
           
 atg.svc.repository.beans.RecentTickets getRecentTicketById(java.lang.String pRecentTicketsId)
          Finds a RecentTickets by it's repository id.
 java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTickets()
          Returns a list of recent tickets visible to the current user.
 java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTickets(java.lang.String pProfileId)
          Returns a list of recent tickets visible to the user.
 java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsByIdAndType(java.lang.String pProfileId, atg.svc.repository.beans.RecentTicketsType pType)
          Returns a list recent tickets of the specified type that are visible for the given user.
 java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsByIdAndType(java.lang.String pProfileId, java.lang.String pType)
          Returns a list recent tickets of the specified type that are visible for the given user.
 java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsByIdAndTypeAsc(java.lang.String pProfileId, atg.svc.repository.beans.RecentTicketsType pType)
          Returns a list recent tickets of the specified type that are visible for the given user.
 java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsByIdAndTypeAsc(java.lang.String pProfileId, java.lang.String pType)
          Returns a list recent tickets of the specified type that are visible for the given user.
 java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsByType(atg.svc.repository.beans.RecentTicketsType pType)
          Returns a list of recent tickets of type 'worked' or 'viewed' that are visible to the current user.
 java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsByType(java.lang.String pType)
          Returns a list of recent tickets of type 'worked' or 'viewed' that are visible to the current user.
 java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsByUserIdTypeAndTicket(java.lang.String pProfileId, java.lang.String pType, java.lang.String pTicketId)
          Returns a list recent tickets of the specified type that are visible for the given user.
static atg.svc.repository.homes.RecentTicketsHome getRecentTicketsHome()
          Provides access to the RecentTicketsHome instance
 java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsInAscOrder(java.lang.String pProfileId)
          Returns a list of recent tickets visible to the user.
 java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsViewed()
          Returns a list of recent tickets of type 'viewed' that are visible to the current user.
 java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsViewed(java.lang.String pProfileId)
          Returns a list of recent tickets of type 'viewed' that are visible specified user.
 java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsWorked()
          Returns a list of recent tickets of type 'worked' that are visible to the current user.
 java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsWorked(java.lang.String pProfileId)
          Returns a list of recent tickets of type 'worked' that are visible to the specified user.
 atg.repository.Repository getTicketingRepository()
           
 void saveRecentTickets(java.util.List<atg.svc.repository.beans.RecentTickets> pRecentTickets, java.lang.String profileId)
          Adds a list of recent tickets .
 void saveRecentTickets(atg.svc.repository.beans.RecentTickets pRecentTickets)
          Adds a recent tickets .
 void setOptionService(atg.svc.repository.service.OptionService pOptionService)
           
 void setProfileService(FrameworkProfileService pProfileService)
           
 void setTicketingRepository(atg.repository.Repository repository)
           
 
Methods inherited from class atg.svc.repository.service.BaseService
getRepositoryService, getToday, setRepositoryService
 
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

RecentTicketsService

public RecentTicketsService()
Method Detail

getRecentTicketsHome

public static atg.svc.repository.homes.RecentTicketsHome getRecentTicketsHome()
Provides access to the RecentTicketsHome instance


getOptionService

public atg.svc.repository.service.OptionService getOptionService()

setOptionService

public void setOptionService(atg.svc.repository.service.OptionService pOptionService)

getProfileService

public FrameworkProfileService getProfileService()

setProfileService

public void setProfileService(FrameworkProfileService pProfileService)

setTicketingRepository

public void setTicketingRepository(atg.repository.Repository repository)

getTicketingRepository

public atg.repository.Repository getTicketingRepository()

createRecentTickets

public atg.svc.repository.beans.RecentTickets createRecentTickets()
                                                           throws SvcException
Creates a new transient RecentTickets repository bean. Populates the user currently logged in user. After calling the appropriate setters, pass this object into the saveRecentTickets method to persist it to the db.

Returns:
transient RecentTickets r2j bean.
Throws:
SvcException

edit

public atg.svc.repository.beans.RecentTickets edit(java.lang.String pRecentTicketsId)
                                            throws ObjectNotFoundException
Gets an editable version of a recent tickets given the repository id of the recentTickets .

Parameters:
pRecentTicketsId - Id of the recent tickets
Returns:
A RecentTickets ReposImpl.
Throws:
ObjectNotFoundException

getRecentTicketById

public atg.svc.repository.beans.RecentTickets getRecentTicketById(java.lang.String pRecentTicketsId)
                                                           throws ObjectNotFoundException
Finds a RecentTickets by it's repository id.

Parameters:
pRecentTicketsId - The repository id.
Returns:
The RecentTickets ReposImpl
Throws:
ObjectNotFoundException - If the id is not found.

saveRecentTickets

public void saveRecentTickets(atg.svc.repository.beans.RecentTickets pRecentTickets)
                       throws ObjectNotFoundException,
                              SvcException
Adds a recent tickets . If the user already has saved the maximum number of recentTickets, removes oldest recentTickets.

Parameters:
pRecentTickets - ticket to save
Throws:
ObjectNotFoundException - If the save fails.
atg.svc.repository.service.exception.SvcException - If the save fails.
SvcException

saveRecentTickets

public void saveRecentTickets(java.util.List<atg.svc.repository.beans.RecentTickets> pRecentTickets,
                              java.lang.String profileId)
                       throws ObjectNotFoundException,
                              SvcException
Adds a list of recent tickets .

Parameters:
profileId - user's profile recentTickets should be added to.
Throws:
ObjectNotFoundException - If the save fails.
atg.svc.repository.service.exception.SvcException - If the save fails.
SvcException

checkMaximumRecordLimit

public void checkMaximumRecordLimit(atg.userprofiling.Profile pProfile)
                             throws ObjectNotFoundException,
                                    SvcException
This method check for the maximum record limit for Recent Tickets for a particular user. If the user already has saved the maximum number of recentTickets of either type then removes oldest recentTickets.

Parameters:
pProfile - user's profile recentTickets should be checked for
Throws:
ObjectNotFoundException
atg.svc.repository.service.exception.SvcException
SvcException

checkMaximumRecordLimit

public void checkMaximumRecordLimit(java.lang.String pProfileId,
                                    atg.svc.repository.beans.RecentTickets pRecentTickets)
                             throws ObjectNotFoundException,
                                    SvcException
This method check for the maximum record limit for Recent Tickets for a particular user and of ticket type. If the user already has saved the maximum number of recentTickets of a specified type then it removes oldest recentTickets of the specifed type

Parameters:
pProfileId - user's profile recentTickets should be checked for
pRecentTickets - pRecentTickets
Throws:
ObjectNotFoundException
atg.svc.repository.service.exception.SvcException
SvcException

checkMaximumRecordLimit

public void checkMaximumRecordLimit(java.lang.String pProfileId,
                                    java.util.List<atg.svc.repository.beans.RecentTickets> pRecentTickets)
                             throws ObjectNotFoundException,
                                    SvcException
This method check for the maximum record limit for Recent Tickets for a particular user. If the user already has saved the maximum number of recentTickets removes oldest recentTickets of the specified type.

Parameters:
pProfileId - user's profile recentTickets should be checked for
pRecentTickets - pRecentTickets
Throws:
ObjectNotFoundException
atg.svc.repository.service.exception.SvcException
SvcException

deleteRecentTicket

public void deleteRecentTicket(java.lang.String pRecentTicketsId)
                        throws ObjectNotFoundException,
                               PersistenceException
Deleted the specified recent tickets from repository.

Parameters:
pRecentTicketsId - - recentTickets id.
Throws:
ObjectNotFoundException
atg.svc.repository.service.exception.SvcException
PersistenceException

getRecentTickets

public java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTickets()
Returns a list of recent tickets visible to the current user. The list is ordered by recent Tickets id.

Returns:
A list of recent tickets visible to the user

getRecentTickets

public java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTickets(java.lang.String pProfileId)
Returns a list of recent tickets visible to the user. The list is ordered alphabetically by recentTickets id.

Parameters:
pProfileId - profile id of the user we're looking up.
Returns:
A list of recent tickets visible to the user

getRecentTicketsInAscOrder

public java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsInAscOrder(java.lang.String pProfileId)
Returns a list of recent tickets visible to the user. The list is in Ascending ordered by recentTickets id.

Parameters:
pProfileId - profile id of the user we're looking up.
Returns:
A list of recent tickets visible to the user

getRecentTicketsViewed

public java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsViewed()
Returns a list of recent tickets of type 'viewed' that are visible to the current user.

Returns:
A list of the user's recentTickets viewed

getRecentTicketsViewed

public java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsViewed(java.lang.String pProfileId)
Returns a list of recent tickets of type 'viewed' that are visible specified user.

Parameters:
pProfileId - profile id of the user we're looking up.
Returns:
A list of the user's recent tickets viewed

getRecentTicketsWorked

public java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsWorked()
Returns a list of recent tickets of type 'worked' that are visible to the current user.

Returns:
A list of the user's recent tickets viewed

getRecentTicketsWorked

public java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsWorked(java.lang.String pProfileId)
Returns a list of recent tickets of type 'worked' that are visible to the specified user.

Parameters:
pProfileId - profile id of the user we're looking up.
Returns:
A list of the user's recent tickets worked

getRecentTicketsByType

public java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsByType(atg.svc.repository.beans.RecentTicketsType pType)
Returns a list of recent tickets of type 'worked' or 'viewed' that are visible to the current user.

Parameters:
pType - - recentTickets type. 'worked' or 'viewed'
Returns:
A list of the user's recent tickets

getRecentTicketsByType

public java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsByType(java.lang.String pType)
Returns a list of recent tickets of type 'worked' or 'viewed' that are visible to the current user.

Parameters:
pType - - RecentTicketsType. 'worked' or 'viewed'
Returns:
A list of the user's recent tickets

getRecentTicketsByIdAndType

public java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsByIdAndType(java.lang.String pProfileId,
                                                                                                atg.svc.repository.beans.RecentTicketsType pType)
Returns a list recent tickets of the specified type that are visible for the given user.

Parameters:
pProfileId - profile id of the user we're looking up.
pType - "type 'worked' or 'viewed'
Returns:
A list of the user's recent tickets in descending order

getRecentTicketsByIdAndType

public java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsByIdAndType(java.lang.String pProfileId,
                                                                                                java.lang.String pType)
Returns a list recent tickets of the specified type that are visible for the given user.

Parameters:
pProfileId - profile id of the user we're looking up.
pType - type type 'worked' or 'viewed'
Returns:
A list of the user's recent tickets in descending order

getRecentTicketsByIdAndTypeAsc

public java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsByIdAndTypeAsc(java.lang.String pProfileId,
                                                                                                   atg.svc.repository.beans.RecentTicketsType pType)
Returns a list recent tickets of the specified type that are visible for the given user.

Parameters:
pProfileId - profile id of the user we're looking up.
pType - "type 'worked' or 'viewed'
Returns:
A list of the user's recent tickets in Ascending order

getRecentTicketsByIdAndTypeAsc

public java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsByIdAndTypeAsc(java.lang.String pProfileId,
                                                                                                   java.lang.String pType)
Returns a list recent tickets of the specified type that are visible for the given user.

Parameters:
pProfileId - profile id of the user we're looking up.
pType - type type 'worked' or 'viewed'
Returns:
A list of the user's recent tickets in Ascending order

getRecentTicketsByUserIdTypeAndTicket

public java.util.Collection<atg.svc.repository.beans.RecentTickets> getRecentTicketsByUserIdTypeAndTicket(java.lang.String pProfileId,
                                                                                                          java.lang.String pType,
                                                                                                          java.lang.String pTicketId)
Returns a list recent tickets of the specified type that are visible for the given user.

Parameters:
pProfileId - profile id of the user we're looking up.
pType - type type 'worked' or 'viewed'
pTicketId - TicketId
Returns:
A list of the user's recent tickets