Class AbstractInternalDynamicInformationGenerator
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.linkdirectory.dynamic.AbstractInternalDynamicInformationGenerator
- All Implemented Interfaces:
Poolable
,Recyclable
,Disposable
,Component
,LogEnabled
,Serviceable
,Generator
,SitemapModelComponent
,XMLProducer
- Direct Known Subclasses:
AbstractMessagingConnectorDynamicInformationGenerator
,CancelledLessonsDynamicInformationGenerator
,FormAdminDashboardDynamicInformationGenerator
,TicketsDynamicInformationGenerator
Abstract generator for saxing dynamic information.
-
Field Summary
Modifier and TypeFieldDescriptionprotected CurrentUserProvider
The current user providerstatic final String
Constant for root tagstatic final String
Constant for item's error message tagstatic final String
Constant for item's error type tagstatic final String
Constant for item tagstatic final String
Constant for item's footer tagstatic final String
Constant for item's summary tagstatic final String
Constant for item's title tagstatic final String
Constant for long value tagstatic final String
Constant for short value tagstatic final String
Constant for tooltip tagFields 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 TypeMethodDescriptionvoid
generate()
protected String
Get the current languageprotected UserIdentity
Get the current connected userprotected int
Get the number of requested max itemsprotected void
SAX the errorprotected void
Create an item node.protected void
Create an item node when the title is aDate
protected abstract void
Create a long value node.protected abstract void
Create a short value node.protected abstract void
Create a tooltip node.void
service
(ServiceManager serviceManager) 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
-
DYNAMIC_INFORMATION
Constant for root tag- See Also:
-
SHORT_VALUE
Constant for short value tag- See Also:
-
LONG_VALUE
Constant for long value tag- See Also:
-
TOOLTIP
Constant for tooltip tag- See Also:
-
ITEM
Constant for item tag- See Also:
-
ITEM_TITLE
Constant for item's title tag- See Also:
-
ITEM_SUMMARY
Constant for item's summary tag- See Also:
-
ITEM_FOOTER
Constant for item's footer tag- See Also:
-
ERROR
Constant for item's error message tag- See Also:
-
ERROR_ATTRIBUTE_TYPE
Constant for item's error type tag- See Also:
-
_currentUserProvider
The current user provider
-
-
Constructor Details
-
AbstractInternalDynamicInformationGenerator
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableGenerator
- Throws:
ServiceException
-
generate
-
getCurrentUser
Get the current connected user- Returns:
- A user identity or
null
if there is no connected user
-
getCurrentLanguage
Get the current language- Returns:
- the current language
-
getMaxItems
Get the number of requested max items- Returns:
- the number of max items. -1 if there is no limitations
-
saxError
SAX the error- Parameters:
e
- The thrown exception- Throws:
SAXException
- If a SAXException error occurs
-
saxShortValue
Create a short value node.- Throws:
SAXException
- If a SAXException error occursDynamicInformationException
- if an error occurs while computing the dynamic information
-
saxLongValue
Create a long value node.- Throws:
SAXException
- If a error occurs while saxingDynamicInformationException
- if an error occurs while computing the dynamic information
-
saxTooltips
Create a tooltip node.- Throws:
SAXException
- If a error occurs while saxingDynamicInformationException
- if an error occurs while computing the dynamic information
-
saxItem
protected void saxItem(String title, String summary, String footer) throws SAXException, DynamicInformationException Create an item node.- Parameters:
title
- The title of item.summary
- The summary of item.footer
- The footer of item.- Throws:
SAXException
- If a error occurs while saxingDynamicInformationException
- if an error occurs while computing the dynamic information
-
saxItem
protected void saxItem(Date title, String summary, String footer) throws SAXException, DynamicInformationException Create an item node when the title is aDate
- Parameters:
title
- The title of item as Date.summary
- The summary of item.footer
- The footer of item.- Throws:
SAXException
- If a error occurs while saxingDynamicInformationException
- if an error occurs while computing the dynamic information
-