Class EditionFOWorkspaceModule
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workspaces.AbstractWorkspaceModule
org.ametys.plugins.workspaces.editionfo.EditionFOWorkspaceModule
- All Implemented Interfaces:
Comparable<WorkspaceModule>
,WorkspaceModule
,LogEnabled
,PluginAware
,Contextualizable
,Serviceable
Manager for the Edition FO
-
Field Summary
Modifier and TypeFieldDescriptionprotected WorkflowProvider
The workflow providerstatic final String
Avalon ROLEFields inherited from class org.ametys.plugins.workspaces.AbstractWorkspaceModule
_context, _currentUserProvider, _i18nUtils, _modulesEP, _observationManager, _pageDAO, _pluginName, _projectManager, _projectRightHelper, _resolver, _rightManager, _serviceEP, _skinsManager, _userHelper, _userManager
Fields inherited from interface org.ametys.plugins.workspaces.project.modules.WorkspaceModule
ORDER_ALERTS, ORDER_CALENDAR, ORDER_DOCUMENTS, ORDER_MEMBERS, ORDER_NEWS, ORDER_TASKS, ORDER_THREADS, ORDER_WALLCONTENT, ORDER_WIKI
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
_initializeNewPage
(ModifiablePage wikiPage, Site site, String sitemapName, String title, Page parentPage) Initialize the new wiki pageprotected void
_initializeWikiDefaultZone
(ModifiablePage wikiPage, Site site, String sitemapName, String title) Initialize the default zone for the wiki pagecreateNewWikiContent
(Site site, String sitemapName, String title) Create a new content for a wiki page of the wiki modulecreatePage
(Map<String, Object> data) Create a new wiki pagedeletePage
(String pageId) Delete a page in the edition FO moduleGet the set of allowed event type for the modulegetId()
Get the module IdGet the module titleGet the module nameprotected String
Returns the module page's nameprotected String
Returns the template to use for module's pageprotected I18nizableText
Returns the module page's title as i18nRetrieves the rights for the current user in the projectgetModuleRoot
(Project project, boolean create) Get the module root node for the given projectGet the module titleint
getOrder()
Get the module orderprotected void
Initialize the module pagevoid
service
(ServiceManager manager) Methods inherited from class org.ametys.plugins.workspaces.AbstractWorkspaceModule
_createModulePage, _deleteEvents, _deletePages, _getAmetysObject, _getDefaultXslt, _getModulePages, _internalActivateModule, _internalDeactivateModule, _internalDeleteData, _setPagesVisibility, activateModule, contextualize, deactivateModule, deleteData, getModuleUrl, initializeSitemap, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.plugins.workspaces.project.modules.WorkspaceModule
compareTo
-
Field Details
-
EDITIONFO_MODULE_ID
Avalon ROLE -
_workflowProvider
The workflow provider
-
-
Constructor Details
-
EditionFOWorkspaceModule
public EditionFOWorkspaceModule()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractWorkspaceModule
- Throws:
ServiceException
-
getId
Description copied from interface:WorkspaceModule
Get the module Id- Returns:
- The module ID
-
getModuleName
Description copied from interface:WorkspaceModule
Get the module name- Returns:
- the module name
-
getOrder
Description copied from interface:WorkspaceModule
Get the module order- Returns:
- the priority in menus
-
getModulePageName
Description copied from class:AbstractWorkspaceModule
Returns the module page's name- Specified by:
getModulePageName
in classAbstractWorkspaceModule
- Returns:
- The module page's name
-
getModuleTitle
Description copied from interface:WorkspaceModule
Get the module title- Returns:
- The title
-
getModuleDescription
Description copied from interface:WorkspaceModule
Get the module title- Returns:
- The title
-
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
-
getModulePageTemplate
Description copied from class:AbstractWorkspaceModule
Returns the template to use for module's page- Overrides:
getModulePageTemplate
in classAbstractWorkspaceModule
- Returns:
- The template
-
initializeModulePage
Description copied from class:AbstractWorkspaceModule
Initialize the module page- Specified by:
initializeModulePage
in classAbstractWorkspaceModule
- Parameters:
page
- The module page
-
_initializeWikiDefaultZone
protected void _initializeWikiDefaultZone(ModifiablePage wikiPage, Site site, String sitemapName, String title) Initialize the default zone for the wiki page- Parameters:
wikiPage
- The wiki pagesite
- The sitesitemapName
- The sitemap nametitle
- The content title
-
getModuleRights
Retrieves the rights for the current user in the project- Returns:
- The project
-
createNewWikiContent
public ModifiableWorkflowAwareContent createNewWikiContent(Site site, String sitemapName, String title) throws com.opensymphony.workflow.WorkflowException Create a new content for a wiki page of the wiki module- Parameters:
site
- The sitesitemapName
- the name of the sitemaptitle
- The content title- Returns:
- The content
- Throws:
com.opensymphony.workflow.WorkflowException
- if an error occurred
-
createPage
public Map<String,Object> createPage(Map<String, Object> data) throws com.opensymphony.workflow.WorkflowException, IllegalAccessExceptionCreate a new wiki page- Parameters:
data
- The data- Returns:
- The url
- Throws:
com.opensymphony.workflow.WorkflowException
- If an error occurredIllegalAccessException
- If a user with insufficient rights try to create a page
-
_initializeNewPage
protected void _initializeNewPage(ModifiablePage wikiPage, Site site, String sitemapName, String title, Page parentPage) Initialize the new wiki page- Parameters:
wikiPage
- The pagesite
- The sitesitemapName
- The sitemap nametitle
- The page titleparentPage
- The parent page
-
getModuleRoot
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
-
deletePage
Delete a page in the edition FO module- Parameters:
pageId
- The page to delete- Returns:
- The result
- Throws:
IllegalAccessException
- If a user with insufficient rights try to delete a page
-
getAllowedEventTypes
Description copied from interface:WorkspaceModule
Get the set of allowed event type for the module- Returns:
- The set of allowed event types
-