public class WorkspaceThreadDAO extends ThreadDAO implements PluginAware, Contextualizable
Modifier and Type | Field and Description |
---|---|
private Context |
_context |
private HTMLTransformer |
_htmlTransformer |
private WorkspaceModuleExtensionPoint |
_moduleEP |
private String |
_pluginName |
private ProjectManager |
_projectManager |
private SourceResolver |
_sourceResolver |
static String |
ROLE
Avalon Role
|
__RIGHTS_POST_ADD, __RIGHTS_POST_DELETE, __RIGHTS_POST_EDIT, __RIGHTS_THREAD_ADD, __RIGHTS_THREAD_DELETE, __RIGHTS_THREAD_EDIT, _currentUserProvider, _explorerResourcesDAO, _observationManager, _resolver, _rightManager, _userHelper, _userManager
Constructor and Description |
---|
WorkspaceThreadDAO() |
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
addThread(String name,
String description)
Add a thread
|
void |
contextualize(Context context) |
protected String |
getPostContent(JCRPost post)
Get the content of a post as a String
|
protected String |
getPostContentForEditing(JCRPost post)
Get the content of a post to edit as a String
|
Map<String,Object> |
getThreadsList(boolean includeChildren)
Get the list of threads of a project
|
void |
service(ServiceManager manager) |
void |
setPluginInfo(String pluginName,
String featureName,
String id)
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level. |
protected void |
setPostContent(JCRPost post,
String content)
Update the content of a post
|
_formatAuthor, _getPostDataFullInfo, _getUserRights, addPost, addThread, canDelete, canEdit, convertPostToString, deletePost, deleteThread, editPost, editThread, getPostData, getPostDataById, getPostsData, getPostsDataByIds, getThreadData, getThreadData, markAsRead, renameThread
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private HTMLTransformer _htmlTransformer
private SourceResolver _sourceResolver
private String _pluginName
private ProjectManager _projectManager
private WorkspaceModuleExtensionPoint _moduleEP
public WorkspaceThreadDAO()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class ThreadDAO
ServiceException
public void setPluginInfo(String pluginName, String featureName, String id)
PluginAware
setPluginInfo
in interface PluginAware
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this componentpublic void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public Map<String,Object> getThreadsList(boolean includeChildren)
includeChildren
- True to also include threads messagespublic Map<String,Object> addThread(String name, String description) throws IllegalAccessException, AmetysRepositoryException
name
- The desired name for the threaddescription
- The thread descriptionIllegalAccessException
- If the user has no sufficient rightsAmetysRepositoryException
- If a repository error occurredprotected void setPostContent(JCRPost post, String content)
ThreadDAO
setPostContent
in class ThreadDAO
post
- The post to updatecontent
- The content as stringprotected String getPostContent(JCRPost post) throws AmetysRepositoryException
ThreadDAO
getPostContent
in class ThreadDAO
post
- the postAmetysRepositoryException
- if failed to parse contentprotected String getPostContentForEditing(JCRPost post) throws AmetysRepositoryException
ThreadDAO
getPostContentForEditing
in class ThreadDAO
post
- the postAmetysRepositoryException
- if failed to parse content