Class NewsWorkspaceModule
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.workspaces.AbstractWorkspaceModule
-
- org.ametys.plugins.workspaces.news.NewsWorkspaceModule
-
- All Implemented Interfaces:
Comparable<WorkspaceModule>
,WorkspaceModule
,LogEnabled
,PluginAware
,Contextualizable
,Serviceable
public class NewsWorkspaceModule extends AbstractWorkspaceModule
Workspaces module for news
-
-
Field Summary
Fields Modifier and Type Field Description static String
NEWS_MODULE_ID
The id of calendar modulestatic String
NEWS_PAGE_TEMPLATE
Name of news's templatestatic String
NEWS_SERVICE_ID
The id of news serviceprotected static String
SEARCH_SEARCH_CONTENT_VIEW
Search service content viewprotected static String[]
SEARCH_SERVICE_CONTENT_TYPES
Search service content typesprotected static String[]
SEARCH_SERVICE_CONTEXTS
Search service contextsprotected static String[]
SEARCH_SERVICE_RETURNABLES
Search service returnablesprotected static String[]
SEARCH_SERVICE_SORTS
Search service sortsprotected static String
SEARCH_SERVICE_XSLT
Search service xslt-
Fields 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_ABOUT, ORDER_ALERTS, ORDER_CALENDAR, ORDER_DOCUMENTS, ORDER_MEMBERS, ORDER_MINISITE, ORDER_NEWS, ORDER_TASKS, ORDER_THREADS, ORDER_WALLCONTENT
-
-
Constructor Summary
Constructors Constructor Description NewsWorkspaceModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ModifiablePage
_createModulePage(Project project, Sitemap sitemap, String name, I18nizableText pageTitle, String skinTemplate)
Create a new page if not already existsSet<String>
getAllowedEventTypes()
Get the set of allowed event type for the moduleString
getId()
Get the module IdI18nizableText
getModuleDescription()
Get the module titleString
getModuleName()
Get the module nameprotected String
getModulePageName()
Returns the module page's nameprotected String
getModulePageTemplate()
Returns the template to use for module's page.protected I18nizableText
getModulePageTitle()
Returns the module page's title as i18nModifiableResourceCollection
getModuleRoot(Project project, boolean create)
Get the module root node for the given projectI18nizableText
getModuleTitle()
Get the module titleint
getOrder()
Get the module orderprotected void
initializeModulePage(ModifiablePage modulePage)
Initialize the module page-
Methods inherited from class org.ametys.plugins.workspaces.AbstractWorkspaceModule
_deleteEvents, _deletePages, _getAmetysObject, _getDefaultXslt, _getModulePages, _internalActivateModule, _internalDeactivateModule, _internalDeleteData, _setPagesVisibility, activateModule, contextualize, deactivateModule, deleteData, getModuleUrl, initializeSitemap, service, 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, isUnactivatedByDefault
-
-
-
-
Field Detail
-
NEWS_MODULE_ID
public static final String NEWS_MODULE_ID
The id of calendar module
-
NEWS_SERVICE_ID
public static final String NEWS_SERVICE_ID
The id of news service- See Also:
- Constant Field Values
-
NEWS_PAGE_TEMPLATE
public static final String NEWS_PAGE_TEMPLATE
Name of news's template- See Also:
- Constant Field Values
-
SEARCH_SERVICE_CONTENT_TYPES
protected static final String[] SEARCH_SERVICE_CONTENT_TYPES
Search service content types
-
SEARCH_SERVICE_RETURNABLES
protected static final String[] SEARCH_SERVICE_RETURNABLES
Search service returnables
-
SEARCH_SERVICE_SORTS
protected static final String[] SEARCH_SERVICE_SORTS
Search service sorts
-
SEARCH_SERVICE_CONTEXTS
protected static final String[] SEARCH_SERVICE_CONTEXTS
Search service contexts
-
SEARCH_SEARCH_CONTENT_VIEW
protected static final String SEARCH_SEARCH_CONTENT_VIEW
Search service content view- See Also:
- Constant Field Values
-
SEARCH_SERVICE_XSLT
protected static final String SEARCH_SERVICE_XSLT
Search service xslt- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NewsWorkspaceModule
public NewsWorkspaceModule()
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:WorkspaceModule
Get the module Id- Returns:
- The module ID
-
getOrder
public int getOrder()
Description copied from interface:WorkspaceModule
Get the module order- Returns:
- the priority in menus
-
getModuleName
public String getModuleName()
Description copied from interface:WorkspaceModule
Get the module name- Returns:
- the module name
-
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
-
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
-
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
-
getModuleDescription
public I18nizableText getModuleDescription()
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
-
_createModulePage
protected ModifiablePage _createModulePage(Project project, Sitemap sitemap, String name, I18nizableText pageTitle, String skinTemplate)
Description copied from class:AbstractWorkspaceModule
Create a new page if not already exists- Overrides:
_createModulePage
in classAbstractWorkspaceModule
- Parameters:
project
- The module projectsitemap
- The sitemap where the page will be createdname
- The page's namepageTitle
- The page's title as i18nizable textskinTemplate
- The template from the skin to apply on the page- Returns:
- the created page or
null
if page already exists
-
initializeModulePage
protected void initializeModulePage(ModifiablePage modulePage)
Description copied from class:AbstractWorkspaceModule
Initialize the module page- Specified by:
initializeModulePage
in classAbstractWorkspaceModule
- Parameters:
modulePage
- The module page
-
getModulePageTemplate
protected String getModulePageTemplate()
Description copied from class:AbstractWorkspaceModule
Returns the template to use for module's page. Can be null if the page should be a node page- Overrides:
getModulePageTemplate
in classAbstractWorkspaceModule
- Returns:
- The template
-
-