Package org.ametys.plugins.survey.dao
Class PageDAO
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.survey.dao.AbstractDAO
org.ametys.plugins.survey.dao.PageDAO
- All Implemented Interfaces:
 LogEnabled,Component,Contextualizable,Serviceable
DAO for manipulating survey pages.
- 
Field Summary
FieldsFields inherited from class org.ametys.plugins.survey.dao.AbstractDAO
_cocoonContext, _context, _currentUserProvider, _jsonUtils, _observationManager, _resolver, _siteManager, _uploadManager - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionAdds a a new rule to a page.Copies and pastes a survey page.createPage(Map<String, Object> values) Creates a survey page.deletePage(String id) Deletes a survey page.deleteRule(String id) Deletes a rule to a pageEdits a survey page.getBranches(String id) Gets the branches for a survey page.Gets properties of a survey pagegetPage(SurveyPage page) Gets properties of a survey pageGets the rule for a survey page.booleanisLastPage(String id) Determines if a page is the last of survey's pages.voidservice(ServiceManager serviceManager) Methods inherited from class org.ametys.plugins.survey.dao.AbstractDAO
_getCurrentUser, contextualize, getPictureInfo, getSurveyRootNode, setPicture, updateReferencesAfterCopy, updateReferencesAfterCopy, updateReferencesAfterCopyMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger 
- 
Field Details
- 
ROLE
The Avalon role 
 - 
 - 
Constructor Details
- 
PageDAO
public PageDAO() 
 - 
 - 
Method Details
- 
service
- Specified by:
 servicein interfaceServiceable- Overrides:
 servicein classAbstractDAO- Throws:
 ServiceException
 - 
getPage
Gets properties of a survey page- Parameters:
 id- The id of the survey page- Returns:
 - The properties
 
 - 
getPage
Gets properties of a survey page- Parameters:
 page- The survey page- Returns:
 - The properties
 
 - 
isLastPage
Determines if a page is the last of survey's pages.- Parameters:
 id- The page id- Returns:
 - True if the page is the last one.
 
 - 
createPage
Creates a survey page.- Parameters:
 values- The survey page's values- Returns:
 - The id of the created survey page
 - Throws:
 Exception- if an exception occurs during the page creation process
 - 
editPage
Edits a survey page.- Parameters:
 values- The survey page's values- Returns:
 - The id of the edited survey page and the id of its survey parent
 
 - 
copyPage
Copies and pastes a survey page.- Parameters:
 surveyId- The id of the survey, target of the copypageId- The id of the page to copy- Returns:
 - The id of the created page
 
 - 
deletePage
Deletes a survey page.- Parameters:
 id- The id of the survey page to delete- Returns:
 - The id of the deleted survey page and the id of its survey parent
 
 - 
addRule
Adds a a new rule to a page.- Parameters:
 id- The id of the pagerule- The rule typepage- The page to jump or skip- Returns:
 - An empty map
 
 - 
deleteRule
Deletes a rule to a page- Parameters:
 id- The id of the page- Returns:
 - An empty map
 
 - 
getRule
Gets the rule for a survey page.- Parameters:
 id- The id of the survey page.- Returns:
 - The rule, or null
 
 - 
getBranches
Gets the branches for a survey page.- Parameters:
 id- The id of the survey page.- Returns:
 - The branches
 
 
 -