atg.svc.repository.service
Class RecommendedReadingService

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.RecommendedReadingService
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 RecommendedReadingService
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
RecommendedReadingService()
           
 
Method Summary
 void checkMaximumRecordLimit(java.lang.String pProfileId)
          This method check for the maximum record limit for recommend reading for a particular user.
 atg.svc.repository.beans.RecommendedReading createRecommendedReading()
          Creates a new transient RecommendedReading repository bean.
 void deleteRecommendedReading(java.lang.String pRecommendedReadingId)
          Deleted the specified recommended reading from repository.
 atg.svc.repository.beans.RecommendedReading edit(java.lang.String pRecommendedReadingId)
          Gets an editable version of a recommended reading given the repository id of the recommendedReading .
 int getMaxDisplayedTitleLength()
          Gets the maximum length to display the title.
 ProfileService getProfileService()
           
 java.util.Collection getRecommendedReading()
          Returns a list of recommended reading visible to the current user.
 atg.svc.repository.beans.RecommendedReading getRecommendedReadingById(java.lang.String pRecommendedReadingId)
          Finds a RecommendedReading by it's repository id.
 java.util.Collection getRecommendedReadingByIdAndType(java.lang.String pProfileId, atg.svc.repository.beans.RecommendedReadingType pType)
          Returns a list recommended reading of the specified type that are visible for the given user.
 java.util.Collection getRecommendedReadingByIdAndType(java.lang.String pProfileId, java.lang.String pType)
          Returns a list recommended reading of the specified type that are visible for the given user.
 java.util.Collection getRecommendedReadingByType(atg.svc.repository.beans.RecommendedReadingType pType)
          Returns a list of recommended reading of type 'PDFDocument' or 'document' or 'solution' that are visible to the current user.
 java.util.Collection getRecommendedReadingByType(java.lang.String pType)
          Returns a list of recommended reading of type 'PDFDocument' or 'document' or 'solution' that are visible to the current user.
 java.util.Collection getRecommendedReadingDocument()
          Returns a list of recommended reading of type 'document' that are visible to the current user.
 java.util.Collection getRecommendedReadingDocument(java.lang.String pProfileId)
          Returns a list of recommended reading of type 'document' that are visible to the specified user.
 java.util.Collection getRecommendedReadingPDFDocument()
          Returns a list of recommended reading of type 'PDFDocument' that are visible to the current user.
 java.util.Collection getRecommendedReadingPDFDocument(java.lang.String pProfileId)
          Returns a list of recommended reading of type 'PDFDocument' that are visible to the specifed user.
 java.util.Collection getRecommendedReadingsBySolutionId(java.lang.String pSolutionId)
          Gets the collection of recommended readings by their solution id.
 java.util.Collection getRecommendedReadingSolution()
          Returns a list of recommended reading of type 'solution' that are visible to the current user.
 java.util.Collection getRecommendedReadingSolution(java.lang.String pProfileId)
          Returns a list of recommended reading of type 'solution' that are visible specified user.
 SolutionService getSolutionService()
           
 UserOptionsService getUserOptionsService()
           
 void saveRecommendedReading(atg.svc.repository.beans.RecommendedReading pRecommendedReading)
          Adds a recommended reading .
 void setMaxDisplayedTitleLength(int pMaxDisplayedTitleLength)
          Sets the maximum length to display the title.
 void setProfileService(ProfileService pProfileService)
           
 void setSolutionService(SolutionService pSolutionService)
           
 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

RecommendedReadingService

public RecommendedReadingService()
Method Detail

getUserOptionsService

public UserOptionsService getUserOptionsService()

setUserOptionsService

public void setUserOptionsService(UserOptionsService pUserOptionsService)

getProfileService

public ProfileService getProfileService()

setProfileService

public void setProfileService(ProfileService pProfileService)

getSolutionService

public SolutionService getSolutionService()

setSolutionService

public void setSolutionService(SolutionService pSolutionService)

getMaxDisplayedTitleLength

public int getMaxDisplayedTitleLength()
Gets the maximum length to display the title.

Returns:
The maximum length to display the title.

setMaxDisplayedTitleLength

public void setMaxDisplayedTitleLength(int pMaxDisplayedTitleLength)
Sets the maximum length to display the title.

Parameters:
pMaxDisplayedTitleLength - The maximum length to display the title.

createRecommendedReading

public atg.svc.repository.beans.RecommendedReading createRecommendedReading()
                                                                     throws javax.ejb.CreateException
Creates a new transient RecommendedReading repository bean. Pouplates the user currently logged in user. After calling the appropriate setters, pass this object into the saveRecommendedReading method to persist it to the db.

Returns:
transient RecommendedReading r2j bean.
Throws:
javax.ejb.CreateException

edit

public atg.svc.repository.beans.RecommendedReading edit(java.lang.String pRecommendedReadingId)
                                                 throws ObjectNotFoundException
Gets an editable version of a recommended reading given the repository id of the recommendedReading .

Parameters:
pRecommendedReadingId - Id of the recommended reading
Returns:
A RecommendedReading ReposImpl.
Throws:
ObjectNotFoundException

getRecommendedReadingById

public atg.svc.repository.beans.RecommendedReading getRecommendedReadingById(java.lang.String pRecommendedReadingId)
                                                                      throws ObjectNotFoundException
Finds a RecommendedReading by it's repository id.

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

saveRecommendedReading

public void saveRecommendedReading(atg.svc.repository.beans.RecommendedReading pRecommendedReading)
                            throws javax.ejb.CreateException,
                                   ObjectNotFoundException,
                                   PersistenceException,
                                   TransactionException,
                                   javax.ejb.FinderException
Adds a recommended reading . If the user already has saved the maximum number of recommendedReading, removes oldest recommendedReading.

Parameters:
pRecommendedReading - user's profile recommendedReading 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(java.lang.String pProfileId)
                             throws javax.ejb.CreateException,
                                    ObjectNotFoundException,
                                    PersistenceException,
                                    TransactionException,
                                    javax.ejb.FinderException
This method check for the maximum record limit for recommend reading for a particular user. If the user already has saved the maximum number of recommendedReading removes oldest recommendedReading.

Parameters:
pProfileId - user's profile recommendedReading should be checked for
Throws:
ObjectNotFoundException
PersistenceException
javax.ejb.CreateException
TransactionException
javax.ejb.FinderException

deleteRecommendedReading

public void deleteRecommendedReading(java.lang.String pRecommendedReadingId)
                              throws ObjectNotFoundException,
                                     PersistenceException
Deleted the specified recommended reading from repository.

Parameters:
pRecommendedReadingId - - recommendedReading id.
Throws:
ObjectNotFoundException
PersistenceException

getRecommendedReading

public java.util.Collection getRecommendedReading()
Returns a list of recommended reading visible to the current user. The list is ordered alphabetically by recommendedReading name.

Returns:
A list of RecommendedReading visible to the current user

getRecommendedReadingSolution

public java.util.Collection getRecommendedReadingSolution()
Returns a list of recommended reading of type 'solution' that are visible to the current user.

Returns:
A list of the user's recommendedReading solutions

getRecommendedReadingSolution

public java.util.Collection getRecommendedReadingSolution(java.lang.String pProfileId)
Returns a list of recommended reading of type 'solution' that are visible specified user.

Parameters:
pProfileId - profile id of the user we're looking up.
Returns:
A list of the user's recommended reading solutions

getRecommendedReadingDocument

public java.util.Collection getRecommendedReadingDocument()
Returns a list of recommended reading of type 'document' that are visible to the current user.

Returns:
A list of the user's recommended reading documents

getRecommendedReadingDocument

public java.util.Collection getRecommendedReadingDocument(java.lang.String pProfileId)
Returns a list of recommended reading of type 'document' 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 recommended reading documents

getRecommendedReadingPDFDocument

public java.util.Collection getRecommendedReadingPDFDocument()
Returns a list of recommended reading of type 'PDFDocument' that are visible to the current user.

Returns:
A list of the user's recommended reading PDF Documents

getRecommendedReadingPDFDocument

public java.util.Collection getRecommendedReadingPDFDocument(java.lang.String pProfileId)
Returns a list of recommended reading of type 'PDFDocument' that are visible to the specifed user.

Parameters:
pProfileId - profile id of the user we're looking up.
Returns:
A list of the user's recommended reading PDF Documents

getRecommendedReadingByType

public java.util.Collection getRecommendedReadingByType(atg.svc.repository.beans.RecommendedReadingType pType)
Returns a list of recommended reading of type 'PDFDocument' or 'document' or 'solution' that are visible to the current user.

Parameters:
pType - - recommendedReading type.'PDFDocument' or 'document' or 'solution'
Returns:
A list of the user's recommended reading

getRecommendedReadingByType

public java.util.Collection getRecommendedReadingByType(java.lang.String pType)
Returns a list of recommended reading of type 'PDFDocument' or 'document' or 'solution' that are visible to the current user.

Parameters:
pType - - RecommendedReadingType.'PDFDocument' or 'document' or 'solution'
Returns:
A list of the user's recommended reading

getRecommendedReadingByIdAndType

public java.util.Collection getRecommendedReadingByIdAndType(java.lang.String pProfileId,
                                                             atg.svc.repository.beans.RecommendedReadingType pType)
Returns a list recommended reading of the specified type that are visible for the given user.

Parameters:
pProfileId - profile id of the user we're looking up.
pType - "solution" or "document" or 'PDFDocument'
Returns:
A list of the user's recommended reading

getRecommendedReadingByIdAndType

public java.util.Collection getRecommendedReadingByIdAndType(java.lang.String pProfileId,
                                                             java.lang.String pType)
Returns a list recommended reading of the specified type that are visible for the given user.

Parameters:
pProfileId - profile id of the user we're looking up.
pType - type "solution" or "document" or 'PDFDocument'
Returns:
A list of the user's recommended reading

getRecommendedReadingsBySolutionId

public java.util.Collection getRecommendedReadingsBySolutionId(java.lang.String pSolutionId)
                                                        throws javax.ejb.FinderException
Gets the collection of recommended readings by their solution id.

Parameters:
pSolutionId - The id of the solution.
Returns:
A Collection of RecommendedReading objects.
Throws:
javax.ejb.FinderException - If the finder fails.