Class SurveysGenerator
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.survey.generators.SurveysGenerator
- All Implemented Interfaces:
Poolable,Recyclable,Disposable,Component,LogEnabled,Serviceable,Generator,SitemapModelComponent,XMLProducer
- Direct Known Subclasses:
SurveyGenerator
SAX surveys
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AmetysObjectResolverThe Ametys object resolverprotected SiteManagerThe site managerprotected SurveyDAOThe DAO for surveysFields 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 ModifiableTraversableAmetysObjectgetSurveyRootNode(String siteName, String lang) Get the root node for surveysprotected voidsaxBranches(SurveyPage page) SAX branch logicvoidservice(ServiceManager serviceManager) protected voidtoSAX(SurveyPage page, boolean saxChildren, boolean saxBranches) SAX a survey pageprotected voidSAX a surveyprotected voidtoSAX(SurveyQuestion question) SAX a survey questionprotected voidSAX the picture of the element of a surveyMethods 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
-
_resolver
The Ametys object resolver -
_siteManager
The site manager -
_surveyDAO
The DAO for surveys
-
-
Constructor Details
-
SurveysGenerator
public SurveysGenerator()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classServiceableGenerator- Throws:
ServiceException
-
generate
-
toSAX
SAX a survey- Parameters:
survey- the survey to SAXsaxChildren- true to SAX children- Throws:
SAXException- if error occurs while SAXing
-
toSAX
SAX a survey page- Parameters:
page- the page to SAXsaxChildren- true to SAX childrensaxBranches- true to SAX branch logic- Throws:
SAXException- if error occurs while SAXing
-
saxBranches
SAX branch logic- Parameters:
page- the page- Throws:
SAXException- if error occurs while SAXing
-
toSAX
SAX a survey question- Parameters:
question- the question to SAX- Throws:
SAXException- if error occurs while SAXing
-
toSAXPicture
SAX the picture of the element of a survey- Parameters:
elmt- The survey element- Throws:
SAXException- If an error occurred
-
getSurveyRootNode
protected ModifiableTraversableAmetysObject getSurveyRootNode(String siteName, String lang) throws javax.jcr.RepositoryException Get the root node for surveys- Parameters:
siteName- the site namelang- the language- Returns:
- the root node
- Throws:
javax.jcr.RepositoryException- if an error occurs when retrieving the survey's root node
-