Class DataInclusionEnhancementHandler
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.cms.transformation.AbstractEnhancementHandler
org.ametys.plugins.externaldata.transformation.DataInclusionEnhancementHandler
- All Implemented Interfaces:
PluginAware,Component,Contextualizable,LogEnabled,Serviceable,ContentHandler,LexicalHandler
public class DataInclusionEnhancementHandler
extends AbstractEnhancementHandler
implements Component, Serviceable, Contextualizable, PluginAware
DataInclusion enhancement handler : transform a query tag into its results.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContextThe avalon context.protected LoggerThe loggerprotected StringThe plugin name.protected QueryDaoThe Query DAO.static final StringThe Avalon role.Fields inherited from class org.ametys.cms.transformation.AbstractEnhancementHandler
_contentHandler, _inUnmodifiableContent, _lexicalHandler, PROCESSING_INSTRUCTION_UNMODIFIABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void_saxResult(Query query, QueryResult result) Sax a query result.protected void_saxSingleResult(Query query, QueryResult result) Sax a single query result.voidcontextualize(Context context) voidenableLogging(Logger logger) voidendElement(String uri, String localName, String qName) getParameters(Query query, Attributes atts) Get the query parameter values from the query node attributes.voidservice(ServiceManager serviceManager) voidsetPluginInfo(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.voidstartElement(String uri, String localName, String qName, Attributes atts) Methods inherited from class org.ametys.cms.transformation.AbstractEnhancementHandler
characters, comment, endCDATA, endDocument, endDTD, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, saxError, setContentHandler, setDocumentLocator, setLexicalHandler, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startPrefixMappingMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
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.xml.sax.ContentHandler
declaration
-
Field Details
-
ROLE
The Avalon role. -
_queryDao
The Query DAO. -
_context
The avalon context. -
_pluginName
The plugin name. -
_logger
The logger
-
-
Constructor Details
-
DataInclusionEnhancementHandler
public DataInclusionEnhancementHandler()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
setPluginInfo
Description copied from interface:PluginAwareSets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfoin interfacePluginAware- Parameters:
pluginName- Unique identifier for the plugin hosting the extensionfeatureName- Unique feature identifier (unique for a given pluginName)id- Unique identifier of this component
-
enableLogging
- Specified by:
enableLoggingin interfaceLogEnabled- Overrides:
enableLoggingin classAbstractLogEnabled
-
startElement
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classAbstractEnhancementHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classAbstractEnhancementHandler- Throws:
SAXException
-
_saxResult
Sax a query result.- Parameters:
query- the query.result- the result to generate.- Throws:
SAXException- if an error occurs while saxing
-
_saxSingleResult
Sax a single query result.- Parameters:
query- the queryresult- the query's result- Throws:
SAXException- if an error occurs while saxing
-
getParameters
Get the query parameter values from the query node attributes.- Parameters:
query- the query.atts- the query node attributes.- Returns:
- the parameters as a Map of parameter name -> value.
-