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:
WorkspaceModule
,LogEnabled
,PluginAware
,Contextualizable
,Serviceable
public class EditionFOWorkspaceModule extends AbstractWorkspaceModule
Manager for the Edition FO
-
-
Field Summary
Fields Modifier and Type Field Description private static String
__MODULE_TITLE_KEY
Module i18n title keyprivate static String
__RIGHT_CREATE_PAGE
private static String
__RIGHT_DELETE_PAGE
static String
__WIKI_MODULE_TAG
Tag on the main page holding the wiki moduleprivate static String
__WORKSPACES_EDITIONFO_NODE_NAME
Workspaces tasks list node nameprivate ExplorerResourcesDAO
_explorerResourcesDAO
private SiteManager
_siteManager
protected WorkflowProvider
_workflowProvider
The workflow providerstatic String
EDITIONFO_CONTENT_TYPE
ContentType for the editionFO contentsstatic String
EDITIONFO_MODULE_ID
Avalon ROLE-
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 EditionFOWorkspaceModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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 pageprotected void
_initializeWikiLeftZone(ModifiablePage wikiPage, Page wikiRootPage)
Initialize the left zone for the wiki pageModifiableWorkflowAwareContent
createNewWikiContent(Site site, String sitemapName, String title)
Create a new content for a wiki page of the wiki moduleMap<String,Object>
createPage(Map<String,Object> data)
Create a new wiki pageMap<String,Object>
deletePage(String pageId)
Delete a page in the edition FO moduleSet<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 String
getModulePageTemplate()
Returns the template to use for module's pageprotected I18nizableText
getModulePageTitle()
Returns the module page's title as i18nMap<String,Object>
getModuleRights()
Retrieves the rights for the current user in the projectModifiableResourceCollection
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 page)
Initialize the module pagevoid
service(ServiceManager manager)
-
Methods inherited from class org.ametys.plugins.workspaces.AbstractWorkspaceModule
_createModulePage, _deletePages, _getAmetysObject, _getDefaultXslt, _internalActivateModule, _internalDeactivateModule, activateModule, contextualize, deactivateModule, getModulePages, getModuleUrl, initializeSitemap, setPluginInfo
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
EDITIONFO_MODULE_ID
public static final String EDITIONFO_MODULE_ID
Avalon ROLE
-
EDITIONFO_CONTENT_TYPE
public static final String EDITIONFO_CONTENT_TYPE
ContentType for the editionFO contents- See Also:
- Constant Field Values
-
__WIKI_MODULE_TAG
public static final String __WIKI_MODULE_TAG
Tag on the main page holding the wiki module- See Also:
- Constant Field Values
-
__WORKSPACES_EDITIONFO_NODE_NAME
private static final String __WORKSPACES_EDITIONFO_NODE_NAME
Workspaces tasks list node name- See Also:
- Constant Field Values
-
__RIGHT_CREATE_PAGE
private static final String __RIGHT_CREATE_PAGE
- See Also:
- Constant Field Values
-
__RIGHT_DELETE_PAGE
private static final String __RIGHT_DELETE_PAGE
- See Also:
- Constant Field Values
-
__MODULE_TITLE_KEY
private static final String __MODULE_TITLE_KEY
Module i18n title key- See Also:
- Constant Field Values
-
_workflowProvider
protected WorkflowProvider _workflowProvider
The workflow provider
-
_siteManager
private SiteManager _siteManager
-
_explorerResourcesDAO
private ExplorerResourcesDAO _explorerResourcesDAO
-
-
Constructor Detail
-
EditionFOWorkspaceModule
public EditionFOWorkspaceModule()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractWorkspaceModule
- Throws:
ServiceException
-
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
-
getModulePageTemplate
protected String getModulePageTemplate()
Description copied from class:AbstractWorkspaceModule
Returns the template to use for module's page- Overrides:
getModulePageTemplate
in classAbstractWorkspaceModule
- Returns:
- The template
-
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 page)
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
-
_initializeWikiLeftZone
protected void _initializeWikiLeftZone(ModifiablePage wikiPage, Page wikiRootPage)
Initialize the left zone for the wiki page- Parameters:
wikiPage
- The wiki pagewikiRootPage
- The wiki root page
-
getModuleRights
public Map<String,Object> 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, IllegalAccessException
Create 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
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
-
deletePage
public Map<String,Object> deletePage(String pageId) throws IllegalAccessException
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
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
-
-