|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.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.svc.repository.service.BaseService |
---|
mBeanHomes, mBeanHomesName, mRepositoryHomes, mRepositoryHomesName |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
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)
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)
Creates and saves a new webEscalationActivity repository item and adds the activity to the ticket. |
KnowledgeQueryPredicate |
createPredicateFromSearchContext(KnowledgeQueryPredicate pSearchPredicate)
Copy an atg.svc.search.KnowledgeQueryPredicateImpl to a RJRepositoryBean so we can save the search query. |
ViewedAnswer |
createViewedAnswer()
Creates a ViewedAnswer object with the view date populated. |
void |
doSaveAnswer(java.lang.String pKnowledgeSessionId,
java.lang.String pTicketId,
java.lang.String pProfileId,
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 KnowledgeSession |
editSession(java.lang.String pSessionId)
|
void |
endCurrentKnowledgeSession()
Ends the knowledge session without starting a new one. |
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()
|
KnowledgeSession |
getMostRecentSession()
Returns the latest knowledge session for the current user or null if no sessions found. |
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()
|
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 |
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(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 |
---|
getBeanHomes, getRepositoryHomes |
Methods inherited from class atg.svc.repository.service.BaseService |
---|
getBaseBeanHomes, getBaseRepositoryHomes, getBeanHomesName, getRepositoryHomesName, getRepositoryService, getToday, setBeanHomesName, setRepositoryHomesName, setRepositoryService |
Methods inherited from class atg.nucleus.GenericService |
---|
addLogListener, createAdminServlet, getAbsoluteName, getAdminServlet, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingWarning, setServiceInfo, startService, stopService |
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 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 ViewedAnswerService getViewedAnswerService()
public void setViewedAnswerService(ViewedAnswerService pViewedAnswerService)
public ProfileService getProfileService()
public void setProfileService(ProfileService pProfileService)
public TicketingManager getTicketingManager()
public void setTicketingManager(TicketingManager pTicketingManager)
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 javax.transaction.TransactionManager getTransactionManager()
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
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 KnowledgeSession findSessionByPrimaryKey(java.lang.String pSessionId) throws ObjectNotFoundException
pSessionId
- The repository id.
ObjectNotFoundException
- If the id is not found.protected 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, TransactionException, javax.ejb.CreateException, java.lang.Exception
PersistenceException
ObjectNotFoundException
javax.ejb.CreateException
TransactionException
java.lang.Exception
public ViewedAnswer createViewedAnswer() 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 KnowledgeSession getMostRecentSession()
#getMostRecentSession(Profile)
public 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) throws 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)
TicketingException
public atg.repository.RepositoryItem addWebEscalationActivity(java.lang.String pTicketId, java.lang.String pKnowledgeSessionId) throws 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)
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 KnowledgeQueryPredicate createPredicateFromSearchContext(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, java.lang.String pProfileId, 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 |