public class EditionFOWorkspaceModule extends AbstractWorkspaceModule
Modifier and Type | Field and Description |
---|---|
private static String |
__MODULE_TITLE_KEY
Module i18n title key
|
private static String |
__RIGHT_CREATE_PAGE |
private static String |
__RIGHT_DELETE_PAGE |
static String |
__WIKI_MODULE_TAG
Tag on the main page holding the wiki module
|
private static String |
__WORKSPACES_EDITIONFO_NODE_NAME
Workspaces tasks list node name
|
private ExplorerResourcesDAO |
_explorerResourcesDAO |
private SiteManager |
_siteManager |
protected WorkflowProvider |
_workflowProvider
The workflow provider
|
static String |
EDITIONFO_CONTENT_TYPE
ContentType for the editionFO contents
|
static String |
EDITIONFO_MODULE_ID
Avalon ROLE
|
_context, _currentUserProvider, _i18nUtils, _observationManager, _pageDAO, _pluginName, _projectManager, _projectRightHelper, _resolver, _rightManager, _serviceEP, _skinsManager, _userHelper, _userManager
Constructor and Description |
---|
EditionFOWorkspaceModule() |
Modifier and Type | Method and Description |
---|---|
protected <A extends AmetysObject> |
_getAmetysObject(ModifiableTraversableAmetysObject parent,
String name,
String type,
boolean create)
Utility method to get or create an ametys object
|
protected void |
_initializeNewPage(ModifiablePage wikiPage,
Site site,
String sitemapName,
String title,
Page parentPage)
Initialize the new wiki page
|
protected void |
_initializeWikiDefaultZone(ModifiablePage wikiPage,
Site site,
String sitemapName,
String title)
Initialize the default zone for the wiki page
|
protected void |
_initializeWikiLeftZone(ModifiablePage wikiPage,
Page wikiRootPage)
Initialize the left zone for the wiki page
|
ModifiableWorkflowAwareContent |
createNewWikiContent(Site site,
String sitemapName,
String title)
Create a new content for a wiki page of the wiki module
|
Map<String,Object> |
createPage(Map<String,Object> data)
Create a new wiki page
|
Map<String,Object> |
deletePage(String pageId)
Delete a page in the edition FO module
|
Set<String> |
getAllowedEventTypes()
Get the set of allowed event type for the module
|
String |
getId()
Get the module Id
|
protected String |
getModulePageName()
Returns the module page's name
|
protected String |
getModulePageTemplate()
Returns the template to use for module's page
|
protected I18nizableText |
getModulePageTitle()
Returns the module page's title as i18n
|
Map<String,Object> |
getModuleRights()
Retrieves the rights for the current user in the project
|
ModifiableResourceCollection |
getModuleRoot(Project project,
boolean create)
Get the module root node for the given project
|
protected String |
getModuleTagName()
Returns the tag of apply to module page
|
I18nizableText |
getModuleTitle()
Get the module title
|
protected void |
initializeModulePage(ModifiablePage page)
Initialize the module page
|
void |
service(ServiceManager manager) |
_createModulePage, _deletePages, _getDefaultXslt, _internalActivateModule, _internalDeactivateModule, activateModule, contextualize, deactivateModule, getModulePages, initializeSitemap, setPluginInfo
getLogger, setLogger
public static final String EDITIONFO_MODULE_ID
public static final String EDITIONFO_CONTENT_TYPE
public static final String __WIKI_MODULE_TAG
private static final String __WORKSPACES_EDITIONFO_NODE_NAME
private static final String __RIGHT_CREATE_PAGE
private static final String __RIGHT_DELETE_PAGE
private static final String __MODULE_TITLE_KEY
protected WorkflowProvider _workflowProvider
private SiteManager _siteManager
private ExplorerResourcesDAO _explorerResourcesDAO
public EditionFOWorkspaceModule()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class AbstractWorkspaceModule
ServiceException
public String getId()
WorkspaceModule
protected String getModulePageName()
AbstractWorkspaceModule
getModulePageName
in class AbstractWorkspaceModule
public I18nizableText getModuleTitle()
WorkspaceModule
protected I18nizableText getModulePageTitle()
AbstractWorkspaceModule
getModulePageTitle
in class AbstractWorkspaceModule
protected String getModulePageTemplate()
AbstractWorkspaceModule
getModulePageTemplate
in class AbstractWorkspaceModule
protected String getModuleTagName()
AbstractWorkspaceModule
getModuleTagName
in class AbstractWorkspaceModule
protected void initializeModulePage(ModifiablePage page)
AbstractWorkspaceModule
initializeModulePage
in class AbstractWorkspaceModule
page
- The module pageprotected void _initializeWikiDefaultZone(ModifiablePage wikiPage, Site site, String sitemapName, String title)
wikiPage
- The wiki pagesite
- The sitesitemapName
- The sitemap nametitle
- The content titleprotected void _initializeWikiLeftZone(ModifiablePage wikiPage, Page wikiRootPage)
wikiPage
- The wiki pagewikiRootPage
- The wiki root pagepublic Map<String,Object> getModuleRights()
public ModifiableWorkflowAwareContent createNewWikiContent(Site site, String sitemapName, String title) throws com.opensymphony.workflow.WorkflowException
site
- The sitesitemapName
- the name of the sitemaptitle
- The content titlecom.opensymphony.workflow.WorkflowException
- if an error occurredpublic Map<String,Object> createPage(Map<String,Object> data) throws com.opensymphony.workflow.WorkflowException, IllegalAccessException
data
- The datacom.opensymphony.workflow.WorkflowException
- If an error occurredIllegalAccessException
- If a user with insufficient rights try to create a pageprotected void _initializeNewPage(ModifiablePage wikiPage, Site site, String sitemapName, String title, Page parentPage)
wikiPage
- The pagesite
- The sitesitemapName
- The sitemap nametitle
- The page titleparentPage
- The parent pagepublic ModifiableResourceCollection getModuleRoot(Project project, boolean create)
WorkspaceModule
project
- The project containing the modulecreate
- True to create the node if it does not existsprotected <A extends AmetysObject> A _getAmetysObject(ModifiableTraversableAmetysObject parent, String name, String type, boolean create) throws AmetysRepositoryException
A
- A sub class of AmetysObjectparent
- The parent objectname
- The ametys object nametype
- The ametys object typecreate
- True to create the object if it does not existAmetysRepositoryException
- if an repository error occurspublic Map<String,Object> deletePage(String pageId) throws IllegalAccessException
pageId
- The page to deleteIllegalAccessException
- If a user with insufficient rights try to delete a pagepublic Set<String> getAllowedEventTypes()
WorkspaceModule