Class TasksWorkspaceModule
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.workspaces.AbstractWorkspaceModule
-
- org.ametys.plugins.workspaces.tasks.TasksWorkspaceModule
-
- All Implemented Interfaces:
WorkspaceModule
,LogEnabled
,PluginAware
,Contextualizable
,Serviceable
public class TasksWorkspaceModule extends AbstractWorkspaceModule
Tasks manager for workspaces
-
-
Field Summary
Fields Modifier and Type Field Description private static String
__MODULE_TITLE_KEY
Module i18n title keyprivate static String
__WORKSPACES_TASKS_DEFAULT_NODE_NAME
Workspaces default tasks list node nameprivate static String
__WORKSPACES_TASKS_NODE_NAME
Workspaces tasks list node namestatic String
TASK_MODULE_ID
The id of task modulestatic String
TASK_MODULE_TAG
Tag on the main page holding the task 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 TasksWorkspaceModule()
-
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 moduleString
getId()
Get the module IdString
getModuleName()
Get the module nameprotected String
getModulePageName()
Returns the module page's nameprotected I18nizableText
getModulePageTitle()
Returns the module page's title as i18nModifiableResourceCollection
getModuleRoot(Project project, boolean create)
Get the module root node for the given projectprotected String
getModuleTagName()
Returns the tag of apply to module pageI18nizableText
getModuleTitle()
Get the module titleMap<String,Object>
getTasksModuleRights()
Retrieves the rights for the current user in the projectDefaultTraversableAmetysObject
getTasksRoot(Project project, boolean create)
Get the root for tasksMap<String,Object>
getTasksServiceRights(List<String> projectNames)
Retrieves the rights for the current user in the projects listString
getTaskUri(Project project, String taskId, String language)
Get the URI of a task in project'siteprotected void
initializeModulePage(ModifiablePage taskPage)
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
-
TASK_MODULE_ID
public static final String TASK_MODULE_ID
The id of task module
-
TASK_MODULE_TAG
public static final String TASK_MODULE_TAG
Tag on the main page holding the task module- See Also:
- Constant Field Values
-
__WORKSPACES_TASKS_NODE_NAME
private static final String __WORKSPACES_TASKS_NODE_NAME
Workspaces tasks list node name- See Also:
- Constant Field Values
-
__WORKSPACES_TASKS_DEFAULT_NODE_NAME
private static final String __WORKSPACES_TASKS_DEFAULT_NODE_NAME
Workspaces default tasks list 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
-
TasksWorkspaceModule
public TasksWorkspaceModule()
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:WorkspaceModule
Get the module Id- Returns:
- The module ID
-
getModuleName
public String getModuleName()
Description copied from interface:WorkspaceModule
Get the module name- Returns:
- the module name
-
getModulePageName
protected String getModulePageName()
Description copied from class:AbstractWorkspaceModule
Returns the module page's name- Specified by:
getModulePageName
in classAbstractWorkspaceModule
- Returns:
- The module page's name
-
getModuleTitle
public I18nizableText getModuleTitle()
Description copied from interface:WorkspaceModule
Get the module title- Returns:
- The title
-
getModulePageTitle
protected I18nizableText getModulePageTitle()
Description copied from class:AbstractWorkspaceModule
Returns the module page's title as i18n- Specified by:
getModulePageTitle
in classAbstractWorkspaceModule
- Returns:
- The module page's title
-
getModuleTagName
protected String getModuleTagName()
Description copied from class:AbstractWorkspaceModule
Returns the tag of apply to module page- Specified by:
getModuleTagName
in classAbstractWorkspaceModule
- Returns:
- The tag for module page
-
initializeModulePage
protected void initializeModulePage(ModifiablePage taskPage)
Description copied from class:AbstractWorkspaceModule
Initialize the module page- Specified by:
initializeModulePage
in classAbstractWorkspaceModule
- Parameters:
taskPage
- The module page
-
getTasksModuleRights
public Map<String,Object> getTasksModuleRights()
Retrieves the rights for the current user in the project- Returns:
- The project
-
getTasksServiceRights
public Map<String,Object> getTasksServiceRights(List<String> projectNames)
Retrieves the rights for the current user in the projects list- Parameters:
projectNames
- The name of projects to checks rights from- Returns:
- The rights data
-
getTaskUri
public String getTaskUri(Project project, String taskId, String language)
Get the URI of a task in project'site- Parameters:
project
- The projecttaskId
- The id of the tasklanguage
- The sitemap language- Returns:
- The thread uri
-
getModuleRoot
public ModifiableResourceCollection getModuleRoot(Project project, boolean create)
Description copied from interface:WorkspaceModule
Get 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
-
getTasksRoot
public DefaultTraversableAmetysObject getTasksRoot(Project project, boolean create)
Get the root for tasks- Parameters:
project
- The projectcreate
- true to create root if not exists- Returns:
- The root for tasks
-
getAllowedEventTypes
public Set<String> getAllowedEventTypes()
Description copied from interface:WorkspaceModule
Get the set of allowed event type for the module- Returns:
- The set of allowed event types
-
-