Class AbstractMailNotifierGenerator
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.generation.AbstractGenerator
org.apache.cocoon.generation.ServiceableGenerator
org.ametys.plugins.workspaces.project.generators.AbstractMailNotifierGenerator
- All Implemented Interfaces:
Poolable
,Recyclable
,Disposable
,Component
,LogEnabled
,Serviceable
,Generator
,SitemapModelComponent
,XMLProducer
- Direct Known Subclasses:
CalendarEventMailNotifierGenerator
,MemberMailNotifierGenerator
,NewsMailNotifierGenerator
,ResourceMailNotifierGenerator
,TaskMailNotifierGenerator
,ThreadMailNotifierGenerator
Abstract generator for mail notification
-
Field Summary
Modifier and TypeFieldDescriptionprotected WorkspaceModuleExtensionPoint
The workspace module managers EPprotected ProjectManager
The project managerprotected RenderingContextHandler
The rendering context handlerstatic final String
The name of the root elementprotected UserHelper
The user Helperprotected UserManager
The user ManagerFields inherited from class org.apache.cocoon.generation.ServiceableGenerator
manager
Fields inherited from class org.apache.cocoon.generation.AbstractGenerator
objectModel, parameters, resolver, source
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
Get the URL of module to insert in email bodyprotected void
_saxProjectUserIdentity
(UserIdentity issuerIdentity, Project project, String tagname) Sax the user and project information relative to the user such as managervoid
generate()
protected String
getEventIdAsI18nKey
(String eventId) Transform the event Id in the I18n key formatprotected Page
getModulePage
(Project project) Get the module's pageprotected String
getProjectManagersNames
(Project project) Get the list of names of the project managersprotected String
getProjectUrl
(Project project) Get the absolute url of projectprotected abstract void
SAX the itemsprotected void
saxProject
(Project project) Sax the project basic informationsvoid
service
(ServiceManager smanager) Methods inherited from class org.apache.cocoon.generation.ServiceableGenerator
dispose
Methods inherited from class org.apache.cocoon.generation.AbstractGenerator
recycle, setup
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
-
Field Details
-
_ROOT_ELEMENT
The name of the root element- See Also:
-
_moduleManagerEP
The workspace module managers EP -
_projectManager
The project manager -
_renderingContextHandler
The rendering context handler -
_userHelper
The user Helper -
_userManager
The user Manager
-
-
Constructor Details
-
AbstractMailNotifierGenerator
public AbstractMailNotifierGenerator()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableGenerator
- Throws:
ServiceException
-
generate
-
_saxProjectUserIdentity
protected void _saxProjectUserIdentity(UserIdentity issuerIdentity, Project project, String tagname) throws SAXException Sax the user and project information relative to the user such as manager- Parameters:
issuerIdentity
- the identity of the userproject
- the project concernedtagname
- the name of the element- Throws:
SAXException
- if an error occurred while saxing
-
saxProject
Sax the project basic informations- Parameters:
project
- the project to SAX- Throws:
SAXException
- if an error occurred while saxing
-
getProjectManagersNames
Get the list of names of the project managers- Parameters:
project
- The project- Returns:
- The list of names, as a single string, comma separated
-
saxItems
SAX the items- Parameters:
event
- the eventproject
- the project- Throws:
SAXException
- if an error occurred while saxing
-
_getModuleId
Get the URL of module to insert in email body- Returns:
- The full URL
-
getModulePage
Get the module's page- Parameters:
project
- The project- Returns:
- The page or
null
if not found
-
getProjectUrl
Get the absolute url of project- Parameters:
project
- The project- Returns:
- the project's url
-
getEventIdAsI18nKey
Transform the event Id in the I18n key format- Parameters:
eventId
- the event Id- Returns:
- the Id as an I18n key
-