|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.svc.repository.service.BaseService
atg.svc.repository.service.SharedService
atg.svc.repository.service.SessionService
public class SessionService
Business methods for atg.svc.repository.beans.shared.KnowledgeSession
objects.
A KnowledgeSession is a problem solving session and it captures a history of the
following events; search, browse, view answer
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
CURRENT_KNOWLEDGE_SESSION_KEY
|
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 | |
---|---|
SessionService()
|
Method Summary | |
---|---|
atg.repository.RepositoryItem |
addResearchSessionActivity(java.lang.String pTicketId,
java.lang.String pKnowledgeSessionId,
atg.userprofiling.Profile pProfile)
Creates and saves a new researchSessionActivity repository item and adds the activity to the ticket. |
atg.repository.RepositoryItem |
addWebEscalationActivity(java.lang.String pTicketId,
java.lang.String pKnowledgeSessionId,
atg.userprofiling.Profile pProfile)
Creates and saves a new webEscalationActivity repository item and adds the activity to the ticket. |
atg.svc.repository.beans.KnowledgeSession |
createKnowledgeSession()
Generally you should use newKnowledgeSession instead. |
atg.svc.repository.beans.KnowledgeQueryPredicate |
createPredicateFromSearchContext(atg.svc.repository.beans.KnowledgeQueryPredicate pSearchPredicate)
Copy an atg.svc.search.KnowledgeQueryPredicateImpl to a RJRepositoryBean so we can save the search query. |
ViewedAnswer |
createViewedAnswer()
Creates a ViewedAnswer Repoistory object with the view date populated. |
ViewedAnswer |
createViewedAnswerBean()
Creates a ViewedAnswer Bean object with the view date populated. |
void |
doSaveAnswer(java.lang.String pKnowledgeSessionId,
java.lang.String pTicketId,
atg.userprofiling.Profile pProfile,
ViewedAnswer pAnswer)
Adds a viewed answer to the current knowledge session and saves both the answer and the session. |
void |
doStartService()
Start up the service... |
void |
doStopService()
|
protected atg.svc.repository.beans.KnowledgeSession |
editSession(java.lang.String pSessionId)
|
void |
endCurrentKnowledgeSession()
Ends the knowledge session without starting a new one. |
atg.svc.repository.beans.KnowledgeSession |
findSessionByPrimaryKey(java.lang.String pSessionId)
Finds a problem session by it's repository id. |
java.lang.String |
getApplicationName()
|
java.lang.String |
getCurrentKnowledgeSessionId()
Returns the KnowledgeSession id associated with the current window. |
atg.svc.agent.events.EventTools |
getEventTools()
|
atg.svc.repository.beans.KnowledgeSession |
getMostRecentSession()
Returns the latest knowledge session for the current user or null if no sessions found. |
atg.svc.repository.beans.KnowledgeSession |
getMostRecentSession(java.lang.String pProfileId)
Returns the most recent knowledge session (including possibly the current session) for the specified user |
java.util.List |
getPagedSessions(int pStartingIndex,
int pNumItems)
Returns a page of knowledge sessions conducted by the current user. |
java.util.List |
getPagedSessions(java.lang.String pProfileId,
int pStartingIndex,
int pNumItems)
Returns a page of knowledge sessions conducted by the specified user. |
ProfileService |
getProfileService()
|
java.lang.String |
getResearchSessionActivityHeading()
|
java.util.List |
getSessions()
Returns a list of all sessions conducted by the current user |
java.util.List |
getSessions(java.lang.String pProfileId)
Returns a list of all sessions conducted by the specified user |
SolutionScoringService |
getSolutionScoringService()
|
StateHolderService |
getStateHolderService()
|
atg.svc.ticketing.TicketHolder |
getTicketHolder()
|
java.lang.String |
getTicketHolderNucleusPath()
|
atg.ticketing.TicketingManager |
getTicketingManager()
|
javax.transaction.TransactionManager |
getTransactionManager()
|
UserOptionsService |
getUserOptionsService()
|
ViewedAnswerService |
getViewedAnswerService()
|
boolean |
hasCurrentKnowledgeSession()
Returns true if the current window has a KnowledgeSession associated with it. |
protected void |
internalProcessUpdate(KnowledgeSessionUpdate pUpdate)
Actually update the knoweldge session. |
boolean |
isAgentModule()
|
boolean |
isQueueInSeparateThread()
Whether to queue in a separate thread. |
java.lang.String |
newKnowledgeSession()
Starts a new knowledge session. |
KnowledgeSessionUpdate |
nextQueuedKnowledgeSessionUpdate()
Return the next queued item changed. |
void |
resumeKnowledgeSession(java.lang.String pKnowledgeSessionId)
Resumes an existing knowledge session. |
void |
resumeKnowledgeSession(java.lang.String pKnowledgeSessionId,
boolean pEndCurrentSession)
Resumes an existing knowledge session. |
void |
saveAnswer(ViewedAnswer pAnswer)
Adds a viewed answer to the current knowledge session and saves both the answer and the session. |
void |
saveBrowseQuery(atg.svc.search.KnowledgeQueryContext pContext)
Creates a new browse query, adds the query to the problem session and saves both the query and the session. |
void |
saveSearchQuery(atg.svc.search.KnowledgeQueryContext pContext)
Creates a new query, adds the query to the problem session and saves both the query and the session. |
void |
setAgentModule(boolean pAgentModule)
|
void |
setApplicationName(java.lang.String pApplicationName)
|
void |
setEventTools(atg.svc.agent.events.EventTools pEventTools)
|
void |
setProfileService(ProfileService pProfileService)
|
void |
setQueueInSeparateThread(boolean pQueueInSeparateThread)
Whether to queue incrementing the view/use/hotuse count in a separate thread. |
void |
setResearchSessionActivityHeading(java.lang.String pResearchSessionActivityHeading)
|
void |
setSolutionScoringService(SolutionScoringService pSolutionScoringService)
|
void |
setStateHolderService(StateHolderService pStateHolderService)
|
void |
setTicketHolderNucleusPath(java.lang.String pTicketHolderNucleusPath)
|
void |
setTicketingManager(atg.ticketing.TicketingManager pTicketingManager)
|
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
|
void |
setUserOptionsService(UserOptionsService pUserOptionsService)
|
void |
setViewedAnswerService(ViewedAnswerService pViewedAnswerService)
|
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, 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 |
---|
public static final java.lang.String CLASS_VERSION
public static java.lang.String CURRENT_KNOWLEDGE_SESSION_KEY
Constructor Detail |
---|
public SessionService()
Method Detail |
---|
public javax.transaction.TransactionManager getTransactionManager()
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
public SolutionScoringService getSolutionScoringService()
public void setSolutionScoringService(SolutionScoringService pSolutionScoringService)
public UserOptionsService getUserOptionsService()
public void setUserOptionsService(UserOptionsService pUserOptionsService)
public atg.svc.agent.events.EventTools getEventTools()
public void setEventTools(atg.svc.agent.events.EventTools pEventTools)
public StateHolderService getStateHolderService()
public void setStateHolderService(StateHolderService pStateHolderService)
public ProfileService getProfileService()
public void setProfileService(ProfileService pProfileService)
public atg.ticketing.TicketingManager getTicketingManager()
public void setTicketingManager(atg.ticketing.TicketingManager pTicketingManager)
public ViewedAnswerService getViewedAnswerService()
public void setViewedAnswerService(ViewedAnswerService pViewedAnswerService)
public java.lang.String getApplicationName()
public void setApplicationName(java.lang.String pApplicationName)
public java.lang.String getResearchSessionActivityHeading()
public void setResearchSessionActivityHeading(java.lang.String pResearchSessionActivityHeading)
public boolean isAgentModule()
public void setAgentModule(boolean pAgentModule)
public java.lang.String getTicketHolderNucleusPath()
public void setTicketHolderNucleusPath(java.lang.String pTicketHolderNucleusPath)
public atg.svc.ticketing.TicketHolder getTicketHolder()
public void setQueueInSeparateThread(boolean pQueueInSeparateThread)
public boolean isQueueInSeparateThread()
public KnowledgeSessionUpdate nextQueuedKnowledgeSessionUpdate()
public void doStartService() throws atg.nucleus.ServiceException
doStartService
in class atg.nucleus.GenericService
atg.nucleus.ServiceException
public void doStopService() throws atg.nucleus.ServiceException
doStopService
in class atg.nucleus.GenericService
atg.nucleus.ServiceException
public atg.svc.repository.beans.KnowledgeSession findSessionByPrimaryKey(java.lang.String pSessionId) throws ObjectNotFoundException
pSessionId
- The repository id.
ObjectNotFoundException
- If the id is not found.protected atg.svc.repository.beans.KnowledgeSession editSession(java.lang.String pSessionId) throws ObjectNotFoundException
ObjectNotFoundException
public boolean hasCurrentKnowledgeSession() throws java.lang.Exception
java.lang.Exception
public java.lang.String getCurrentKnowledgeSessionId() throws javax.ejb.CreateException, ObjectNotFoundException, PersistenceException
javax.ejb.CreateException
ObjectNotFoundException
PersistenceException
public void endCurrentKnowledgeSession() throws ObjectNotFoundException, PersistenceException, java.lang.Exception
ObjectNotFoundException
- If the save fails.
PersistenceException
- If the save fails.
java.lang.Exception
public java.lang.String newKnowledgeSession() throws ObjectNotFoundException, PersistenceException, javax.ejb.CreateException
PersistenceException
ObjectNotFoundException
javax.ejb.CreateException
TransactionException
public void resumeKnowledgeSession(java.lang.String pKnowledgeSessionId) throws ObjectNotFoundException
pKnowledgeSessionId
- id for the knowledge session we want to resume.
ObjectNotFoundException
public void resumeKnowledgeSession(java.lang.String pKnowledgeSessionId, boolean pEndCurrentSession) throws ObjectNotFoundException
pKnowledgeSessionId
- id for the knowledge session we want to resume.pEndCurrentSession
- - if we know that the current knowledge session was created in this transaction, we should skip calling endSession since the knowledge session will have been rolled back.
ObjectNotFoundException
public atg.svc.repository.beans.KnowledgeSession createKnowledgeSession() throws javax.ejb.CreateException
javax.ejb.CreateException
public ViewedAnswer createViewedAnswer() throws javax.ejb.CreateException
javax.ejb.CreateException
- If the create fails.public ViewedAnswer createViewedAnswerBean() throws javax.ejb.CreateException
javax.ejb.CreateException
- If the create fails.public void saveAnswer(ViewedAnswer pAnswer) throws ObjectNotFoundException, PersistenceException, TransactionException, javax.ejb.CreateException, java.lang.Exception
pAnswer
-
ObjectNotFoundException
- If the answer or session isn't found.
PersistenceException
- If the save fails.
javax.ejb.CreateException
TransactionException
java.lang.Exception
createAnswer()
,
ViewedAnswer
public java.util.List getSessions()
getSessions(String)
public java.util.List getSessions(java.lang.String pProfileId)
pProfileId
- profile id of the user to retrieve sessions for.
public java.util.List getPagedSessions(int pStartingIndex, int pNumItems)
pStartingIndex
- - index of the first session to include (ordinal is zero based)pNumItems
- - maximum number of sessions to return in this page.#getSessions(String,int,int)
public java.util.List getPagedSessions(java.lang.String pProfileId, int pStartingIndex, int pNumItems)
pProfileId
- profile id of the user to retrieve sessions for.pStartingIndex
- - index of the first session to include (ordinal is zero based)pNumItems
- - maximum number of sessions to return in this page.
public atg.svc.repository.beans.KnowledgeSession getMostRecentSession()
#getMostRecentSession(Profile)
public atg.svc.repository.beans.KnowledgeSession getMostRecentSession(java.lang.String pProfileId)
pProfileId
- profile id of user to retrieve sessions for.
public atg.repository.RepositoryItem addResearchSessionActivity(java.lang.String pTicketId, java.lang.String pKnowledgeSessionId, atg.userprofiling.Profile pProfile) throws atg.ticketing.TicketingException
pTicketId
- - Ticket to add the research activity to.pKnowledgeSessionId
- - The id of the KnowledgeSession associated with this research session (a.k.a. knowledge session)pProfile
- - Specifies the user profile who performed the activity.
atg.ticketing.TicketingException
public atg.repository.RepositoryItem addWebEscalationActivity(java.lang.String pTicketId, java.lang.String pKnowledgeSessionId, atg.userprofiling.Profile pProfile) throws atg.ticketing.TicketingException, ObjectNotFoundException, PersistenceException
pTicketId
- - Ticket to add the research activity to.pKnowledgeSessionId
- - The id of the KnowledgeSession associated with this research session (a.k.a. knowledge session)pProfile
- - Specifies the user profile who performed the activity.
atg.ticketing.TicketingException
PersistenceException
ObjectNotFoundException
public void saveBrowseQuery(atg.svc.search.KnowledgeQueryContext pContext) throws java.lang.Exception
pContext
- The browse query context to create the browse KnowledgeQuery from.
ObjectNotFoundException
- If the query or session isn't found.
PersistenceException
- If the save fails.
TransactionException
java.lang.Exception
createQuery()
,
atg.svc.repository.beans.Query
,
atg.svc.repository.beans.QueryPredicate
public void saveSearchQuery(atg.svc.search.KnowledgeQueryContext pContext) throws javax.ejb.CreateException, ObjectNotFoundException, PersistenceException, TransactionException, java.lang.Exception
pSearchTextValues
- Input search text - empty or null list if this is a browsepContext
- The search query context to create the search KnowledgeQuery from.
ObjectNotFoundException
- If the query or session isn't found.
PersistenceException
- If the save fails.
TransactionException
javax.ejb.CreateException
java.lang.Exception
createQuery()
,
atg.svc.repository.beans.Query
,
atg.svc.repository.beans.QueryPredicate
public atg.svc.repository.beans.KnowledgeQueryPredicate createPredicateFromSearchContext(atg.svc.repository.beans.KnowledgeQueryPredicate pSearchPredicate) throws javax.ejb.CreateException
pSearchPredicate
- A KnowledgeQueryPredicateImpl that implements the KnowledgeQueryPredicate interface.
javax.ejb.CreateException
protected void internalProcessUpdate(KnowledgeSessionUpdate pUpdate)
public void doSaveAnswer(java.lang.String pKnowledgeSessionId, java.lang.String pTicketId, atg.userprofiling.Profile pProfile, ViewedAnswer pAnswer) throws java.lang.Exception
pAnswer
-
ObjectNotFoundException
- If the answer or session isn't found.
PersistenceException
- If the save fails.
javax.ejb.CreateException
TransactionException
java.lang.Exception
createAnswer()
,
ViewedAnswer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |