Package org.ametys.odf.enumeration
Class EnumeratedAttributeValuesGenerator
- 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.odf.enumeration.EnumeratedAttributeValuesGenerator
-
- All Implemented Interfaces:
Poolable,Recyclable,Disposable,Component,LogEnabled,Serviceable,Generator,SitemapModelComponent,XMLProducer
public class EnumeratedAttributeValuesGenerator extends ServiceableGenerator
Generate the values of an enumerated attribute of the program content type.
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentTypeExtensionPoint_cTypeEPThe content type extension point.protected OdfReferenceTableHelper_odfRefTableHelperThe ODf enumeration helperprotected AmetysObjectResolver_resolverThe Ametys resolverprotected static StringATTRIBUTE_PATH_PARAMETER_NAMEThe name of the parameter containing the path of the enumerated attribute-
Fields 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
Constructors Constructor Description EnumeratedAttributeValuesGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ElementDefinition_getElementDefinition(ContentType cType, String attributePath)Get the element definition from its path.protected void_saxContents(ContentAttributeDefinition attributeDefinition)SAX contents of the type defined by the attribute definitionvoidgenerate()voidservice(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 Detail
-
ATTRIBUTE_PATH_PARAMETER_NAME
protected static final String ATTRIBUTE_PATH_PARAMETER_NAME
The name of the parameter containing the path of the enumerated attribute- See Also:
- Constant Field Values
-
_cTypeEP
protected ContentTypeExtensionPoint _cTypeEP
The content type extension point.
-
_odfRefTableHelper
protected OdfReferenceTableHelper _odfRefTableHelper
The ODf enumeration helper
-
_resolver
protected AmetysObjectResolver _resolver
The Ametys resolver
-
-
Constructor Detail
-
EnumeratedAttributeValuesGenerator
public EnumeratedAttributeValuesGenerator()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classServiceableGenerator- Throws:
ServiceException
-
generate
public void generate() throws IOException, SAXException, ProcessingException
-
_getElementDefinition
protected ElementDefinition _getElementDefinition(ContentType cType, String attributePath)
Get the element definition from its path.- Parameters:
cType- the content type.attributePath- the attribute path.- Returns:
- the element definition or null if not found.
-
_saxContents
protected void _saxContents(ContentAttributeDefinition attributeDefinition) throws SAXException
SAX contents of the type defined by the attribute definition- Parameters:
attributeDefinition- The attribute definition- Throws:
SAXException- if an error occurred while saxing
-
-