Class DocumentWorkspaceModule
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.workspaces.AbstractWorkspaceModule
-
- org.ametys.plugins.workspaces.documents.DocumentWorkspaceModule
-
- All Implemented Interfaces:
WorkspaceModule
,LogEnabled
,PluginAware
,Contextualizable
,Serviceable
public class DocumentWorkspaceModule extends AbstractWorkspaceModule
Helper component for managing documents
-
-
Field Summary
Fields Modifier and Type Field Description private static String
__DOCUMENT_MODULE_TAG
Tag on the main page holding the document moduleprivate static String
__MODULE_TITLE_KEY
Module i18n title keystatic String
DODUMENT_MODULE_ID
The id of document modulestatic String
WORKSPACES_DOCUMENTS_NODE_NAME
Workspaces documents node name-
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 DocumentWorkspaceModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contextualize(Context context)
Set<String>
getAllowedEventTypes()
Get the set of allowed event type for the moduleString
getFolderUri(Project project, String collectionId, String language)
Get the URI of a folder in project'siteString
getId()
Get the module IdMap<String,Object>
getModuleBaseRights()
Retrieves the set of general rights used in the document module for the current userString
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 titleprotected void
initializeModulePage(ModifiablePage documentPage)
Initialize the module page-
Methods inherited from class org.ametys.plugins.workspaces.AbstractWorkspaceModule
_createModulePage, _deletePages, _getAmetysObject, _getDefaultXslt, _internalActivateModule, _internalDeactivateModule, activateModule, deactivateModule, getModulePages, getModulePageTemplate, getModuleUrl, initializeSitemap, service, setPluginInfo
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
DODUMENT_MODULE_ID
public static final String DODUMENT_MODULE_ID
The id of document module
-
WORKSPACES_DOCUMENTS_NODE_NAME
public static final String WORKSPACES_DOCUMENTS_NODE_NAME
Workspaces documents node name- See Also:
- Constant Field Values
-
__DOCUMENT_MODULE_TAG
private static final String __DOCUMENT_MODULE_TAG
Tag on the main page holding the document module- 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
-
DocumentWorkspaceModule
public DocumentWorkspaceModule()
-
-
Method Detail
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Overrides:
contextualize
in classAbstractWorkspaceModule
- Throws:
ContextException
-
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
-
getModuleTitle
public I18nizableText getModuleTitle()
Description copied from interface:WorkspaceModule
Get the module title- Returns:
- The title
-
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
-
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 documentPage)
Description copied from class:AbstractWorkspaceModule
Initialize the module page- Specified by:
initializeModulePage
in classAbstractWorkspaceModule
- Parameters:
documentPage
- The module page
-
getFolderUri
public String getFolderUri(Project project, String collectionId, String language)
Get the URI of a folder in project'site- Parameters:
project
- The projectcollectionId
- The id of collectionlanguage
- The sitemap language- Returns:
- The thread uri
-
getModuleBaseRights
public Map<String,Object> getModuleBaseRights()
Retrieves the set of general rights used in the document module for the current user- Returns:
- The map of right data. Keys are the rights id, and values indicates whether the current user has the right or not.
-
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
-
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
-
-