atg.svc.repository.service
Class ProfileService

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.ProfileService
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 ProfileService
extends SharedService

Business methods for KnowledgeSession objects. A Session 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
 
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
ProfileService()
           
 
Method Summary
 void clearProfile()
          Clears all Service-related profile attributes including problems, knowledge sessions and all favorite queries.
 void clearProfile(java.lang.String pProfile)
          Clears all Service-related profile attributes including problems, knowledge sessions and all favorite queries.
 atg.userprofiling.ProfileTools getExternalProfileTools()
          Returns the externalProfileTools.
 atg.repository.RepositoryItem getExternalUserById(java.lang.String pUserId)
          Gets an external user of the given type with the given id.
 FavoriteQueryService getFavoriteQueryService()
           
 java.util.Collection getFavorites()
          Returns the Collection of the Favorites of the currently logged in users.
 java.util.Collection getFavorites(java.lang.String pProfile)
          Returns the Collection of the Favorites of specified users.
 FavoritesService getFavoritesService()
           
 java.util.List getLastVisitQueries()
          Returns the N most recent searches performed during the last visit.
 java.util.List getLastVisitQueries(atg.userprofiling.Profile pProfile)
          Returns the N most recent searches performed during the last visit.
 java.util.List getLastVisitViewedAnswers()
          Returns the N most recent answers viewed by the currently logged in user during the last session.
 java.util.List getLastVisitViewedAnswers(atg.userprofiling.Profile pProfile)
          Returns the N most recent answers viewed by the user during the last visit.
 int getMaxRecentSessions()
           
 atg.svc.repository.beans.KnowledgeQuery getMostRecentQuery()
          Returns the most recent qurery performed.
 java.lang.String getOrganizationNameById(java.lang.String pOrgId)
          Gets the name of an organization item from the current user's profile repository given the id.
 java.lang.String getOrganizationViewName()
           
 atg.userprofiling.ProfileTools getProfileTools()
          Gets the ProfileTools component.
 QueryService getQueryService()
           
 java.util.List getRecentQueries()
          Returns the N most recent seraches performed by the currently logged in user in SelfService.
 java.util.List getRecentQueries(atg.userprofiling.Profile pProfile)
          Returns the N most recent searches performed by the user.
 java.util.List getRecentQueries(atg.userprofiling.Profile pProfile, java.lang.String pOptionName)
          Returns the N most recent searches performed by the user.
 java.util.List getRecentQueriesForAgent()
          Returns the N most recent seraches performed by the currently logged in user in Agent WorkSpace.
 java.util.Collection getRecentTickets()
          Returns the Collection of the Recent Tickets of the currently logged in users.
 java.util.Collection getRecentTickets(java.lang.String pProfile)
          Returns the Collection of the Recent Tickets of specified users.
 java.util.Collection getRecentTickets(java.lang.String pProfile, atg.svc.repository.beans.RecentTicketsType pRecentTicketsType)
          Returns the Collection of the Recent Tickets of specified users.
 java.util.Collection getRecentTickets(java.lang.String pProfile, java.lang.String pRecentTicketsType)
          Returns the Collection of the Recent Tickets of specified users.
 RecentTicketsService getRecentTicketsService()
           
 java.util.Collection getRecentTicketsViewed()
          Returns the Collection of the Recent Tickets -viewed the currently logged in users.
 java.util.Collection getRecentTicketsWorked()
          Returns the Collection of the Recent Tickets - Worked the currently logged in users.
 java.util.List getRecentViewedAnswers()
          Returns the N most recent answers viewed by the currently logged in user using SelfService option.
 java.util.List getRecentViewedAnswers(atg.userprofiling.Profile pProfile)
          Returns the N most recent answers viewed by the user.
 java.util.List getRecentViewedAnswers(atg.userprofiling.Profile pProfile, java.lang.String pOptionName)
          Returns the N most recent answers viewed by the user.
 java.util.List getRecentViewedAnswersForAgent()
          Returns the N most recent answers viewed by the currently logged in user using Agent option.
 java.util.Collection getRecommendedReading()
          Returns the Collection of the RecommendedReading of the currently logged in users.
 RecommendedReadingService getRecommendedReadingService()
           
 SessionService getSessionService()
           
 atg.repository.RepositoryItem getUserById(java.lang.String pUserId)
          Gets a user of the given type with the given id.
 UserOptionsService getUserOptionsService()
           
 void setExternalProfileTools(atg.userprofiling.ProfileTools pExternalProfileTools)
          Sets the externalProfileTools.
 void setFavoriteQueryService(FavoriteQueryService pFavoriteQueryService)
           
 void setFavoritesService(FavoritesService pFavoritesService)
           
 void setMaxRecentSessions(int pMaxRecentSessions)
           
 void setOrganizationViewName(java.lang.String pOrganizationViewName)
           
 void setProfileTools(atg.userprofiling.ProfileTools pProfileTools)
          Sets the ProfileTools component.
 void setQueryService(QueryService pQueryService)
           
 void setRecentTicketsService(RecentTicketsService pRecentTicketsService)
           
 void setRecommendedReadingService(RecommendedReadingService pRecommendedReadingService)
           
 void setSessionService(SessionService pSessionService)
           
 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

ProfileService

public ProfileService()
Method Detail

getUserOptionsService

public UserOptionsService getUserOptionsService()

setUserOptionsService

public void setUserOptionsService(UserOptionsService pUserOptionsService)

getSessionService

public SessionService getSessionService()

setSessionService

public void setSessionService(SessionService pSessionService)

getFavoriteQueryService

public FavoriteQueryService getFavoriteQueryService()

setFavoriteQueryService

public void setFavoriteQueryService(FavoriteQueryService pFavoriteQueryService)

getQueryService

public QueryService getQueryService()

setQueryService

public void setQueryService(QueryService pQueryService)

getMaxRecentSessions

public int getMaxRecentSessions()

setMaxRecentSessions

public void setMaxRecentSessions(int pMaxRecentSessions)

getFavoritesService

public FavoritesService getFavoritesService()

setFavoritesService

public void setFavoritesService(FavoritesService pFavoritesService)

getRecommendedReadingService

public RecommendedReadingService getRecommendedReadingService()

setRecommendedReadingService

public void setRecommendedReadingService(RecommendedReadingService pRecommendedReadingService)

getRecentTicketsService

public RecentTicketsService getRecentTicketsService()

setRecentTicketsService

public void setRecentTicketsService(RecentTicketsService pRecentTicketsService)

getOrganizationViewName

public java.lang.String getOrganizationViewName()

setOrganizationViewName

public void setOrganizationViewName(java.lang.String pOrganizationViewName)

getFavorites

public java.util.Collection getFavorites()
Returns the Collection of the Favorites of the currently logged in users.

Returns:
Collection

getFavorites

public java.util.Collection getFavorites(java.lang.String pProfile)
Returns the Collection of the Favorites of specified users.

Parameters:
pProfile - user profile to retrieve favorites
Returns:
Collection

getRecommendedReading

public java.util.Collection getRecommendedReading()
Returns the Collection of the RecommendedReading of the currently logged in users.

Returns:
Collection
See Also:
#getRecommendedReading(String)

getRecentTickets

public java.util.Collection getRecentTickets()
Returns the Collection of the Recent Tickets of the currently logged in users.

Returns:
Collection

getRecentTickets

public java.util.Collection getRecentTickets(java.lang.String pProfile)
Returns the Collection of the Recent Tickets of specified users.

Parameters:
pProfile - user profile to retrieve Recent Tickets
Returns:
Collection

getRecentTickets

public java.util.Collection getRecentTickets(java.lang.String pProfile,
                                             atg.svc.repository.beans.RecentTicketsType pRecentTicketsType)
Returns the Collection of the Recent Tickets of specified users.

Parameters:
pProfile - user profile to retrieve Recent Tickets
pRecentTicketsType - - "viewed" or "worked"
Returns:
Collection

getRecentTickets

public java.util.Collection getRecentTickets(java.lang.String pProfile,
                                             java.lang.String pRecentTicketsType)
Returns the Collection of the Recent Tickets of specified users.

Parameters:
pProfile - user profile to retrieve Recent Tickets
pRecentTicketsType - - "viewed" or "worked"
Returns:
Collection

getRecentTicketsViewed

public java.util.Collection getRecentTicketsViewed()
Returns the Collection of the Recent Tickets -viewed the currently logged in users.

Returns:
Collection

getRecentTicketsWorked

public java.util.Collection getRecentTicketsWorked()
Returns the Collection of the Recent Tickets - Worked the currently logged in users.

Returns:
Collection

getProfileTools

public atg.userprofiling.ProfileTools getProfileTools()
Gets the ProfileTools component.

Returns:
The ProfileTools component.

setProfileTools

public void setProfileTools(atg.userprofiling.ProfileTools pProfileTools)
Sets the ProfileTools component.

Parameters:
pProfileTools - The ProfileTools component.

getExternalProfileTools

public atg.userprofiling.ProfileTools getExternalProfileTools()
Returns the externalProfileTools.

Returns:
externalProfileTools

setExternalProfileTools

public void setExternalProfileTools(atg.userprofiling.ProfileTools pExternalProfileTools)
Sets the externalProfileTools.

Parameters:
pExternalProfileTools -

getMostRecentQuery

public atg.svc.repository.beans.KnowledgeQuery getMostRecentQuery()
Returns the most recent qurery performed.

Returns:
KnowledgeQuery or null if no previous queries have been performed.

getRecentQueriesForAgent

public java.util.List getRecentQueriesForAgent()
Returns the N most recent seraches performed by the currently logged in user in Agent WorkSpace.

Returns:
List of KnowledgeQuery objects ordered from most recent to least recent.
See Also:
getRecentQueries(Profile)

getRecentQueries

public java.util.List getRecentQueries()
Returns the N most recent seraches performed by the currently logged in user in SelfService.

Returns:
List of KnowledgeQuery objects ordered from most recent to least recent.
See Also:
getRecentQueries(Profile)

getRecentQueries

public java.util.List getRecentQueries(atg.userprofiling.Profile pProfile)
Returns the N most recent searches performed by the user. Number of searches is configured for SelfService in site option 'UserRecentHistoryMax'. The recent searches can span multiple knowledge sessions

Parameters:
pProfile - user profile to retrieve recent searches for
Returns:
List of KnowledgeQuery objects ordered from most recent to least recent.

getRecentQueries

public java.util.List getRecentQueries(atg.userprofiling.Profile pProfile,
                                       java.lang.String pOptionName)
Returns the N most recent searches performed by the user. Number of searches is configured in site option 'UserRecentHistoryMax'. The recent searches can span multiple knowledge sessions

Parameters:
pProfile - user profile to retrieve recent searches for
pOptionName - name of the option to limit query
Returns:
List of KnowledgeQuery objects ordered from most recent to least recent.

getLastVisitQueries

public java.util.List getLastVisitQueries()
Returns the N most recent searches performed during the last visit.

See Also:
getLastVisitQueries(Profile)

getLastVisitQueries

public java.util.List getLastVisitQueries(atg.userprofiling.Profile pProfile)
Returns the N most recent searches performed during the last visit. Number of searches to return is configured in site option 'UserResultsHistoryMax'

Parameters:
pProfile - user profile to retrieve recent searches for
Returns:
List of KnowledgeQuery objects ordered from most recent to least recent.

getRecentViewedAnswersForAgent

public java.util.List getRecentViewedAnswersForAgent()
Returns the N most recent answers viewed by the currently logged in user using Agent option.

See Also:
#getRecentViewedAnswersForAgent(Profile)

getRecentViewedAnswers

public java.util.List getRecentViewedAnswers()
Returns the N most recent answers viewed by the currently logged in user using SelfService option.

See Also:
getRecentViewedAnswers(Profile)

getRecentViewedAnswers

public java.util.List getRecentViewedAnswers(atg.userprofiling.Profile pProfile)
Returns the N most recent answers viewed by the user. Number of answers viewed is configured in site option 'UserRecentAnswersMax'. The recent answers viewed can span multiple knowledge sessions This method uses the SelfService option for max recent viewed answers

Parameters:
pProfile - user profile to retrieve recent searches for
Returns:
List of ViewedAnswer objects ordered from most recent to least recent.

getRecentViewedAnswers

public java.util.List getRecentViewedAnswers(atg.userprofiling.Profile pProfile,
                                             java.lang.String pOptionName)
Returns the N most recent answers viewed by the user. Number of answers viewed is configured in site option 'UserRecentAnswersMax'. The recent answers viewed can span multiple knowledge sessions

Parameters:
pProfile - user profile to retrieve recent searches for
pOptionName - name of the option to limit query
Returns:
List of ViewedAnswer objects ordered from most recent to least recent.

getLastVisitViewedAnswers

public java.util.List getLastVisitViewedAnswers()
Returns the N most recent answers viewed by the currently logged in user during the last session.

See Also:
getLastVisitViewedAnswers(Profile)

getLastVisitViewedAnswers

public java.util.List getLastVisitViewedAnswers(atg.userprofiling.Profile pProfile)
Returns the N most recent answers viewed by the user during the last visit. The number of answers viewed is configured in site option 'UserResultsAnswersMax'. The recent answers viewed can span multiple knowledge sessions

Parameters:
pProfile - user profile to retrieve recent searches for
Returns:
List of ViewedAnswer objects ordered from most recent to least recent.

clearProfile

public void clearProfile()
                  throws ObjectNotFoundException,
                         PersistenceException
Clears all Service-related profile attributes including problems, knowledge sessions and all favorite queries. Used by SystemTests to clear changes after each unit test.

Throws:
ObjectNotFoundException
PersistenceException

clearProfile

public void clearProfile(java.lang.String pProfile)
                  throws ObjectNotFoundException,
                         PersistenceException
Clears all Service-related profile attributes including problems, knowledge sessions and all favorite queries. Used by SystemTests to clear changes after each unit test.

Throws:
ObjectNotFoundException
PersistenceException

getOrganizationNameById

public java.lang.String getOrganizationNameById(java.lang.String pOrgId)
                                         throws ObjectNotFoundException
Gets the name of an organization item from the current user's profile repository given the id.

Parameters:
pOrgId - The repository id of the organization.
Returns:
The name of the organization.
Throws:
ObjectNotFoundException - If the item cannot be found in the repository.

getUserById

public atg.repository.RepositoryItem getUserById(java.lang.String pUserId)
                                          throws ObjectNotFoundException
Gets a user of the given type with the given id.

Parameters:
pUserId - The repository id of the user
Returns:
The user repository item
Throws:
ObjectNotFoundException - If no user is found with the given type and id

getExternalUserById

public atg.repository.RepositoryItem getExternalUserById(java.lang.String pUserId)
                                                  throws ObjectNotFoundException
Gets an external user of the given type with the given id.

Parameters:
pUserId - The repository id of the user
Returns:
The user repository item
Throws:
ObjectNotFoundException - If no user is found with the given type and id