Class AbstractWorkspaceThreadDAO
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workspaces.AbstractWorkspaceDAO
org.ametys.plugins.workspaces.forum.AbstractWorkspaceThreadDAO
- All Implemented Interfaces:
 LogEnabled,Component,Contextualizable,Serviceable
- Direct Known Subclasses:
 WorkspaceThreadCommentDAO,WorkspaceThreadDAO,WorkspaceThreadUserPreferencesDAO
Abstract class for forum module DAO's
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ThreadJSONHelperThe project tags DAOprotected WorkspaceThreadUserPreferencesDAOThe workspace thread user preferences DAOFields inherited from class org.ametys.plugins.workspaces.AbstractWorkspaceDAO
_context, _currentUserProvider, _observationManager, _projectManager, _projectTagsDAO, _resolver, _richTextTransformer, _rightManager, _userManager, _workflowHelper, _workflowProvider, _workspaceHelper, _workspaceModuleEP - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected void_checkUserRights(AmetysObject objectToCheck, String superRightId, Thread thread, String authorRightId) Check user rights : the user can either have a global right on the root, or a specific right on the root while being the author of the threadprotected ModifiableResourceCollectionGet the module root of threadprotected ModifiableResourceCollection_getModuleRoot(String projectName) Get the module root of threadprotected JCRThread_getThreadByID(String threadId) Get a thread by idprotected ModifiableTraversableAmetysObject_getThreadRoot(String projectName) Get the thread rootvoidservice(ServiceManager manager) Methods inherited from class org.ametys.plugins.workspaces.AbstractWorkspaceDAO
_checkUserReadingRights, _checkUserRights, _getProject, _getProjectName, _getSitemapLanguage, _getSiteName, _handleTags, _hasAfterSubComments, _setAttachments, answerComment, contextualize, createComment, deleteComment, editComment, likeOrUnlikeCommentMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger 
- 
Field Details
- 
_threadJSONHelper
The project tags DAO - 
_workspaceThreadUserPrefDAO
The workspace thread user preferences DAO 
 - 
 - 
Constructor Details
- 
AbstractWorkspaceThreadDAO
public AbstractWorkspaceThreadDAO() 
 - 
 - 
Method Details
- 
service
- Specified by:
 servicein interfaceServiceable- Overrides:
 servicein classAbstractWorkspaceDAO- Throws:
 ServiceException
 - 
_getThreadRoot
Get the thread root- Parameters:
 projectName- the project name- Returns:
 - the thread root
 
 - 
_getThreadByID
Get a thread by id- Parameters:
 threadId- the thread ID- Returns:
 - the thread, or an IllegalClassException if the object is not a Thread
 
 - 
_getModuleRoot
Get the module root of thread- Returns:
 - the module root
 
 - 
_getModuleRoot
Get the module root of thread- Parameters:
 projectName- the project name- Returns:
 - the module root
 
 - 
_checkUserRights
protected void _checkUserRights(AmetysObject objectToCheck, String superRightId, Thread thread, String authorRightId) throws IllegalAccessException Check user rights : the user can either have a global right on the root, or a specific right on the root while being the author of the thread- Parameters:
 objectToCheck- the object to checksuperRightId- the right idthread- the threadauthorRightId- the right to check as we check if the current user is the author of thread- Throws:
 IllegalAccessException- if a right error occurred
 
 -