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
FieldsModifier and TypeFieldDescriptionprotected CurrentUserProviderThe current user providerstatic final StringConstant for root tagstatic final StringConstant for item's error message tagstatic final StringConstant for item's error type tagstatic final StringConstant for item tagstatic final StringConstant for item's footer tagstatic final StringConstant for item's summary tagstatic final StringConstant for item's title tagstatic final StringConstant for long value tagstatic final StringConstant for short value tagstatic final StringConstant for tooltip tagFields inherited from class org.apache.cocoon.generation.ServiceableGenerator
managerFields inherited from class org.apache.cocoon.generation.AbstractGenerator
objectModel, parameters, resolver, sourceFields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerate()protected StringGet the current languageprotected UserIdentityGet the current connected userprotected intGet the number of requested max itemsprotected voidSAX the errorprotected voidCreate an item node.protected voidCreate an item node when the title is aDateprotected abstract voidCreate a long value node.protected abstract voidCreate a short value node.protected abstract voidCreate a tooltip node.voidservice(ServiceManager serviceManager) Methods inherited from class org.apache.cocoon.generation.ServiceableGenerator
disposeMethods inherited from class org.apache.cocoon.generation.AbstractGenerator
recycle, setupMethods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandlerMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
servicein interfaceServiceable- Overrides:
servicein classServiceableGenerator- Throws:
ServiceException
-
generate
-
getCurrentUser
Get the current connected user- Returns:
- A user identity or
nullif 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
-