Class ThreadWorkspaceModule
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.workspaces.AbstractWorkspaceModule
-
- org.ametys.plugins.workspaces.threads.ThreadWorkspaceModule
-
- All Implemented Interfaces:
WorkspaceModule,LogEnabled,PluginAware,Contextualizable,Serviceable
public class ThreadWorkspaceModule extends AbstractWorkspaceModule
ThreadDAO to interact with projects aware threads
-
-
Field Summary
Fields Modifier and Type Field Description private static String__MODULE_TITLE_KEYModule i18n title keyprivate static String__THREAD_MODULE_TAGTag on the main page holding the thread moduleprivate static String__WORKSPACES_THREADS_NODE_NAMEWorkspaces threads node namestatic StringTHREAD_MODULE_IDThe id of thread module-
Fields inherited from class org.ametys.plugins.workspaces.AbstractWorkspaceModule
_context, _currentUserProvider, _i18nUtils, _observationManager, _pageDAO, _pluginName, _projectManager, _projectRightHelper, _resolver, _rightManager, _serviceEP, _skinsManager, _userHelper, _userManager
-
-
Constructor Summary
Constructors Constructor Description ThreadWorkspaceModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>getAllowedEventTypes()Get the set of allowed event type for the moduleStringgetId()Get the module IdStringgetModuleName()Get the module nameprotected StringgetModulePageName()Returns the module page's nameprotected I18nizableTextgetModulePageTitle()Returns the module page's title as i18nModifiableResourceCollectiongetModuleRoot(Project project, boolean create)Get the module root node for the given projectprotected StringgetModuleTagName()Returns the tag of apply to module pageI18nizableTextgetModuleTitle()Get the module titleMap<String,Object>getThreadModuleRights()Retrieve the current user rights on the thread moduleStringgetThreadUri(Project project, String threadId, String language)Get the URI of a thread in project'siteprotected voidinitializeModulePage(ModifiablePage forumPage)Initialize the module page-
Methods inherited from class org.ametys.plugins.workspaces.AbstractWorkspaceModule
_createModulePage, _deletePages, _getAmetysObject, _getDefaultXslt, _internalActivateModule, _internalDeactivateModule, activateModule, contextualize, deactivateModule, getModulePages, getModulePageTemplate, getModuleUrl, initializeSitemap, service, setPluginInfo
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
THREAD_MODULE_ID
public static final String THREAD_MODULE_ID
The id of thread module
-
__THREAD_MODULE_TAG
private static final String __THREAD_MODULE_TAG
Tag on the main page holding the thread module- See Also:
- Constant Field Values
-
__WORKSPACES_THREADS_NODE_NAME
private static final String __WORKSPACES_THREADS_NODE_NAME
Workspaces threads node name- See Also:
- Constant Field Values
-
__MODULE_TITLE_KEY
private static final String __MODULE_TITLE_KEY
Module i18n title key- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ThreadWorkspaceModule
public ThreadWorkspaceModule()
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:WorkspaceModuleGet the module Id- Returns:
- The module ID
-
getModuleName
public String getModuleName()
Description copied from interface:WorkspaceModuleGet the module name- Returns:
- the module name
-
getModulePageName
protected String getModulePageName()
Description copied from class:AbstractWorkspaceModuleReturns the module page's name- Specified by:
getModulePageNamein classAbstractWorkspaceModule- Returns:
- The module page's name
-
getModuleTitle
public I18nizableText getModuleTitle()
Description copied from interface:WorkspaceModuleGet the module title- Returns:
- The title
-
getModulePageTitle
protected I18nizableText getModulePageTitle()
Description copied from class:AbstractWorkspaceModuleReturns the module page's title as i18n- Specified by:
getModulePageTitlein classAbstractWorkspaceModule- Returns:
- The module page's title
-
getModuleTagName
protected String getModuleTagName()
Description copied from class:AbstractWorkspaceModuleReturns the tag of apply to module page- Specified by:
getModuleTagNamein classAbstractWorkspaceModule- Returns:
- The tag for module page
-
initializeModulePage
protected void initializeModulePage(ModifiablePage forumPage)
Description copied from class:AbstractWorkspaceModuleInitialize the module page- Specified by:
initializeModulePagein classAbstractWorkspaceModule- Parameters:
forumPage- The module page
-
getThreadUri
public String getThreadUri(Project project, String threadId, String language)
Get the URI of a thread in project'site- Parameters:
project- The projectthreadId- The id of threadlanguage- The sitemap language- Returns:
- The thread uri
-
getThreadModuleRights
public Map<String,Object> getThreadModuleRights()
Retrieve the current user rights on the thread module- Returns:
- The map of rights
-
getModuleRoot
public ModifiableResourceCollection getModuleRoot(Project project, boolean create)
Description copied from interface:WorkspaceModuleGet the module root node for the given project- Parameters:
project- The project containing the modulecreate- True to create the node if it does not exists- Returns:
- The root node, or null if it does not exists and was not created
-
getAllowedEventTypes
public Set<String> getAllowedEventTypes()
Description copied from interface:WorkspaceModuleGet the set of allowed event type for the module- Returns:
- The set of allowed event types
-
-