public abstract class AbstractWorkspaceModule extends AbstractLogEnabled implements WorkspaceModule, Serviceable, Contextualizable, PluginAware
WorkspaceModule implementation| Modifier and Type | Field and Description |
|---|---|
protected Context |
_context
The avalon context
|
protected CurrentUserProvider |
_currentUserProvider
The current user provider.
|
protected I18nUtils |
_i18nUtils
The i18n utils.
|
protected ObservationManager |
_observationManager
Observer manager.
|
protected PageDAO |
_pageDAO
The page DAO
|
protected String |
_pluginName
The plugin name
|
protected ProjectManager |
_projectManager
Project manager
|
protected ProjectRightHelper |
_projectRightHelper
Project right helper
|
protected AmetysObjectResolver |
_resolver
Ametys resolver
|
protected RightManager |
_rightManager
The rights manager
|
protected ServiceExtensionPoint |
_serviceEP
The services handler
|
protected SkinsManager |
_skinsManager
The skins manager.
|
protected UserHelper |
_userHelper
The users manager
|
protected UserManager |
_userManager
User manager
|
| Constructor and Description |
|---|
AbstractWorkspaceModule() |
| Modifier and Type | Method and Description |
|---|---|
protected ModifiablePage |
_createModulePage(Sitemap sitemap,
String name,
I18nizableText pageTitle,
String skinTemplate)
Create a new page if not already exists
|
protected void |
_deletePages(Project project,
String pageName)
Delete all pages of the project sites matching the page name
|
protected <A extends AmetysObject> |
_getAmetysObject(ModifiableTraversableAmetysObject parent,
String name,
String type,
boolean create)
Utility method to get or create an ametys object
|
protected String |
_getDefaultXslt(String serviceId)
Get the default value of the XSLT parameter of the given service.
|
protected void |
_internalActivateModule(Project project)
Internal process when module is activated
|
protected void |
_internalDeactivateModule(Project project)
Internal process when module is deactivated
|
void |
activateModule(Project project)
Activate the module for the project, creating the module pages
|
void |
contextualize(Context context) |
void |
deactivateModule(Project project)
Delete all data related to the module in the project, and the module pages
|
protected abstract String |
getModulePageName()
Returns the module page's name
|
AmetysObjectIterable<Page> |
getModulePages(Project project,
String language)
Retrieves the pages of the module
|
protected String |
getModulePageTemplate()
Returns the template to use for module's page
|
protected abstract I18nizableText |
getModulePageTitle()
Returns the module page's title as i18n
|
protected abstract String |
getModuleTagName()
Returns the tag of apply to module page
|
protected abstract void |
initializeModulePage(ModifiablePage modulePage)
Initialize the module page
|
void |
initializeSitemap(Sitemap sitemap)
Initialize the sitemap for the module
|
void |
service(ServiceManager manager) |
void |
setPluginInfo(String pluginName,
String featureName,
String id)
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level. |
getLogger, setLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAllowedEventTypes, getId, getModuleName, getModuleRoot, getModuleTitleprotected ProjectManager _projectManager
protected ProjectRightHelper _projectRightHelper
protected UserManager _userManager
protected AmetysObjectResolver _resolver
protected RightManager _rightManager
protected ObservationManager _observationManager
protected CurrentUserProvider _currentUserProvider
protected UserHelper _userHelper
protected I18nUtils _i18nUtils
protected SkinsManager _skinsManager
protected String _pluginName
protected ServiceExtensionPoint _serviceEP
public AbstractWorkspaceModule()
public void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionpublic void contextualize(Context context) throws ContextException
contextualize in interface ContextualizableContextExceptionpublic void setPluginInfo(String pluginName, String featureName, String id)
PluginAwaresetPluginInfo in interface PluginAwarepluginName - Unique identifier for the plugin hosting the extensionfeatureName - Unique feature identifier (unique for a given pluginName)id - Unique identifier of this componentpublic void deactivateModule(Project project)
WorkspaceModuledeactivateModule in interface WorkspaceModuleproject - The projectpublic void activateModule(Project project)
WorkspaceModuleactivateModule in interface WorkspaceModuleproject - The projectpublic void initializeSitemap(Sitemap sitemap)
WorkspaceModuleinitializeSitemap in interface WorkspaceModulesitemap - The sitemappublic AmetysObjectIterable<Page> getModulePages(Project project, String language)
WorkspaceModulegetModulePages in interface WorkspaceModuleproject - The projectlanguage - the sitemap language or null for all sitemap languages.protected ModifiablePage _createModulePage(Sitemap sitemap, String name, I18nizableText pageTitle, String skinTemplate)
sitemap - 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 pagenull if page already existsprotected void _deletePages(Project project, String pageName)
project - The projectpageName - The page nameprotected String _getDefaultXslt(String serviceId)
serviceId - the service ID.protected abstract String getModuleTagName()
protected abstract String getModulePageName()
protected abstract I18nizableText getModulePageTitle()
protected String getModulePageTemplate()
protected abstract void initializeModulePage(ModifiablePage modulePage)
modulePage - The module pageprotected void _internalDeactivateModule(Project project)
project - The projectprotected void _internalActivateModule(Project project)
project - The projectprotected <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 occurs