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
Modifier and TypeFieldDescriptionprotected AmetysObjectResolver
The Ametys object resolverprotected SiteManager
The site managerprotected SurveyDAO
The DAO for surveysFields 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
generate()
protected ModifiableTraversableAmetysObject
getSurveyRootNode
(String siteName, String lang) Get the root node for surveysprotected void
saxBranches
(SurveyPage page) SAX branch logicvoid
service
(ServiceManager serviceManager) protected void
toSAX
(SurveyPage page, boolean saxChildren, boolean saxBranches) SAX a survey pageprotected void
SAX a surveyprotected void
toSAX
(SurveyQuestion question) SAX a survey questionprotected void
SAX the picture of the element of a surveyMethods 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 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:
service
in interfaceServiceable
- Overrides:
service
in 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
-