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.SharedService
                  extended by atg.svc.repository.service.RecentTicketsService
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 RecentTicketsService
extends SharedService


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 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 .
 ProfileService getProfileService()
           
 atg.svc.repository.beans.RecentTickets getRecentTicketById(java.lang.String pRecentTicketsId)
          Finds a RecentTickets by it's repository id.
 java.util.Collection getRecentTickets()
          Returns a list of recent tickets visible to the current user.
 java.util.Collection getRecentTickets(java.lang.String pProfileId)
          Returns a list of recent tickets visible to the user.
 java.util.Collection 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 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 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 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 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 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 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.
 java.util.Collection getRecentTicketsInAscOrder(java.lang.String pProfileId)
          Returns a list of recent tickets visible to the user.
 java.util.Collection getRecentTicketsViewed()
          Returns a list of recent tickets of type 'viewed' that are visible to the current user.
 java.util.Collection getRecentTicketsViewed(java.lang.String pProfileId)
          Returns a list of recent tickets of type 'viewed' that are visible specified user.
 java.util.Collection getRecentTicketsWorked()
          Returns a list of recent tickets of type 'worked' that are visible to the current user.
 java.util.Collection getRecentTicketsWorked(java.lang.String pProfileId)
          Returns a list of recent tickets of type 'worked' that are visible to the specified user.
 UserOptionsService getUserOptionsService()
           
 void saveRecentTickets(java.util.List pRecentTickets, java.lang.String profileId)
          Adds a list of recent ticketss .
 void saveRecentTickets(atg.svc.repository.beans.RecentTickets pRecentTickets)
          Adds a recent tickets .
 void setProfileService(ProfileService pProfileService)
           
 void setUserOptionsService(UserOptionsService pUserOptionsService)
           
 
Methods inherited from class atg.svc.repository.service.SharedService
getServiceSharedBeanHomes, getServiceSharedBeanHomesName, getServiceSharedRepositoryHomes, getServiceSharedRepositoryHomesName, setServiceSharedBeanHomesName, setServiceSharedRepositoryHomesName
 
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, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, 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

getUserOptionsService

public UserOptionsService getUserOptionsService()

setUserOptionsService

public void setUserOptionsService(UserOptionsService pUserOptionsService)

getProfileService

public ProfileService getProfileService()

setProfileService

public void setProfileService(ProfileService pProfileService)

createRecentTickets

public atg.svc.repository.beans.RecentTickets createRecentTickets()
                                                           throws javax.ejb.CreateException
Creates a new transient RecentTickets repository bean. Pouplates 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:
javax.ejb.CreateException

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 javax.ejb.CreateException,
                              ObjectNotFoundException,
                              PersistenceException,
                              TransactionException,
                              javax.ejb.FinderException
Adds a recent tickets . If the user already has saved the maximum number of recentTickets, removes oldest recentTickets.

Parameters:
pRecentTickets - ticket to save
Throws:
javax.ejb.CreateException - If the create fails.
ObjectNotFoundException - If the save fails.
PersistenceException - If the save fails.
TransactionException
javax.ejb.FinderException

saveRecentTickets

public void saveRecentTickets(java.util.List pRecentTickets,
                              java.lang.String profileId)
                       throws javax.ejb.CreateException,
                              ObjectNotFoundException,
                              PersistenceException,
                              TransactionException,
                              javax.ejb.FinderException
Adds a list of recent ticketss .

Parameters:
profileId - user's profile recentTickets should be added to.
Throws:
javax.ejb.CreateException - If the create fails.
ObjectNotFoundException - If the save fails.
PersistenceException - If the save fails.
TransactionException
javax.ejb.FinderException

checkMaximumRecordLimit

public void checkMaximumRecordLimit(atg.userprofiling.Profile pProfile)
                             throws javax.ejb.CreateException,
                                    ObjectNotFoundException,
                                    PersistenceException,
                                    TransactionException,
                                    javax.ejb.FinderException
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
PersistenceException
javax.ejb.CreateException
TransactionException
javax.ejb.FinderException

checkMaximumRecordLimit

public void checkMaximumRecordLimit(java.lang.String pProfileId,
                                    atg.svc.repository.beans.RecentTickets pRecentTickets)
                             throws javax.ejb.CreateException,
                                    ObjectNotFoundException,
                                    PersistenceException,
                                    TransactionException,
                                    javax.ejb.FinderException
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
PersistenceException
javax.ejb.CreateException
TransactionException
javax.ejb.FinderException

checkMaximumRecordLimit

public void checkMaximumRecordLimit(java.lang.String pProfileId,
                                    java.util.List pRecentTickets)
                             throws javax.ejb.CreateException,
                                    ObjectNotFoundException,
                                    PersistenceException,
                                    TransactionException,
                                    javax.ejb.FinderException
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
PersistenceException
javax.ejb.CreateException
TransactionException
javax.ejb.FinderException

deleteRecentTicket

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

Parameters:
pRecentTicketsId - - recentTickets id.
Throws:
ObjectNotFoundException
PersistenceException

getRecentTickets

public java.util.Collection 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 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 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 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 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 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 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 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 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 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 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 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 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 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