- All Implemented Interfaces:
ACLAmetysObject
, AmetysObject
, CopiableAmetysObject
, DataAwareAmetysObject
, ModelLessDataAwareAmetysObject
, ModifiableModelLessDataAwareAmetysObject
, DataHolder
, ModelLessDataHolder
, ModifiableDataHolder
, ModifiableModelLessDataHolder
, JCRAmetysObject
, JCRTraversableAmetysObject
, MetadataAwareAmetysObject
, ModifiableMetadataAwareAmetysObject
, ModifiableACLAmetysObject
, ModifiableAmetysObject
, ModifiableTraversableAmetysObject
, RemovableAmetysObject
, TraversableAmetysObject
-
-
Constructor Summary
Constructors
-
Method Summary
Copy the current
AmetysObject
to the given object if it is not in the restriction list.
void
Retrieves the description.
Retrieves the survey name.
Get the page's questions.
Get the Survey to which this page belongs.
boolean
Determines if question exists
boolean
Determines if the page has a rule
void
void
void
Set the rule for branching
void
Methods inherited from class org.ametys.plugins.survey.repository.AbstractSurveyElement
copyPictureTo, getDataHolder, getExternalPicture, getPictureAlternative, getPictureType, getResourcePictureId, removePictureMetas, setExternalPicture, setNoPicture, setPictureAlternative, setPictureType, setResourcePicture
Methods inherited from class org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, createChild, disallowInheritance, getChild, getChildren, getProfilesForAnonymousAndAnyConnectedUser, getProfilesForGroups, getProfilesForUsers, hasChild, isInheritanceDisallowed, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers
Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChanges
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelLessDataAwareAmetysObject
dataToJSON, dataToSAX, getModelItemTypeExtensionPoint, getType, getValue, getValue, getValueOfType, getValueOfType, hasDifferences, hasValue, hasValue, hasValueOrEmpty, isMultiple, isMultiple
-
Constructor Details
-
SurveyPage
- Parameters:
node
- the node backing this AmetysObject
.
parentPath
- the parent path in the Ametys hierarchy.
factory
- the SurveyFactory
which creates the AmetysObject.
-
Method Details
-
-
-
-
-
-
setDescription
Set the description.
- Parameters:
description
- the description.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setRule
Set the rule for branching
- Parameters:
ruleType
- the rule type
page
- the page to jump or skip. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
-
hasRule
Determines if the page has a rule
- Returns:
- true if the page has a rule
- Throws:
AmetysRepositoryException
- if an error occurs.
-
-
getSurvey
Get the Survey to which this page belongs.
- Returns:
- the Survey to which this page belongs.
- Throws:
AmetysRepositoryException
- if an error occurs when retrieving the survey of a page
-
hasQuestion
Determines if question exists
- Parameters:
name
- The question name
- Returns:
- <code>true</code> true if the question exists
- Throws:
AmetysRepositoryException
- if an error occurs when looking for a survey question
-
getQuestion
Get a question.
- Parameters:
name
- the question name.
- Returns:
- the question.
- Throws:
AmetysRepositoryException
- if an error occurs when retrieving a question of a survey
-
getQuestions
Get the page's questions.
- Returns:
- the page's questions.
- Throws:
AmetysRepositoryException
- if an error occurs when retrieving all the questions of a survey
-
copyTo
Copy the current
AmetysObject
to the given object. Be careful, this method save changes.
- Parameters:
parent
- The parent of the new object. Can not be null.
name
- Name of the new object. Can be null. If null, the new name will be get from the copied object
- Returns:
- the created object
- Throws:
AmetysRepositoryException
- if an error occurs.
-
copyTo
Copy the current
AmetysObject
to the given object if it is not in the restriction list. Be careful, this method save changes.
- Parameters:
parent
- The parent of the new object. Can not be null.
name
- Name of the new object. Can be null. If null, the new name will be get from the copied object
restrictTo
- A restrict list of CopiableAmetysObject
authorized to be copied
- Returns:
- the created object
- Throws:
AmetysRepositoryException
- if an error occurs.