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
Fields Modifier and Type Field Description protected Context_contextThe avalon context.protected Logger_loggerThe loggerprotected String_pluginNameThe plugin name.protected QueryDao_queryDaoThe Query DAO.static StringROLEThe Avalon role.-
Fields inherited from class org.ametys.cms.transformation.AbstractEnhancementHandler
_contentHandler, _inUnmodifiableContent, _lexicalHandler, PROCESSING_INSTRUCTION_UNMODIFIABLE
-
-
Constructor Summary
Constructors Constructor Description DataInclusionEnhancementHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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)protected Map<String,String>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, startPrefixMapping
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Constructor Detail
-
DataInclusionEnhancementHandler
public DataInclusionEnhancementHandler()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
setPluginInfo
public void setPluginInfo(String pluginName, String featureName, String id)
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
public void enableLogging(Logger logger)
- 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
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classAbstractEnhancementHandler- Throws:
SAXException
-
_saxResult
protected void _saxResult(Query query, QueryResult result) throws SAXException
Sax a query result.- Parameters:
query- the query.result- the result to generate.- Throws:
SAXException- if an error occurs while saxing
-
_saxSingleResult
protected void _saxSingleResult(Query query, QueryResult result) throws SAXException
Sax a single query result.- Parameters:
query- the queryresult- the query's result- Throws:
SAXException- if an error occurs while saxing
-
getParameters
protected Map<String,String> getParameters(Query query, Attributes atts)
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.
-
-