- All Implemented Interfaces:
ACLAmetysObject
, AmetysObject
, CopiableAmetysObject
, DataAwareAmetysObject
, ModelLessDataAwareAmetysObject
, ModifiableModelLessDataAwareAmetysObject
, DataHolder
, ModelLessDataHolder
, ModifiableDataHolder
, ModifiableModelLessDataHolder
, JCRAmetysObject
, JCRTraversableAmetysObject
, MetadataAwareAmetysObject
, ModifiableMetadataAwareAmetysObject
, ModifiableACLAmetysObject
, ModifiableAmetysObject
, ModifiableTraversableAmetysObject
, RemovableAmetysObject
, TraversableAmetysObject
, SiteAwareAmetysObject
-
-
Constructor Summary
Constructors
-
Method Summary
Copy the current
AmetysObject
to the given object if it is not in the restriction list.
Returns a unique question name in the survey
Retrieves the description.
Retrieves the ending message.
Retrieves the survey label.
Get a question by its name.
Get the survey questions.
Retrieves the redirection.
Get the date of the last re-initialization of the survey
Returns this object's site.
Returns this object's site name.
Get the date of validation
boolean
Determines if the survey is validated.
void
Re-initialize the survey.
void
void
void
void
void
void
void
void
void
Set the date of validation
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, hasValue, hasValue, hasValueOrEmpty, isMultiple, isMultiple
-
Constructor Details
-
Survey
- 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.
-
getEndingMessage
Retrieves the ending message.
- Returns:
- the ending message.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setEndingMessage
Set the ending message.
- Parameters:
message
- the ending message.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
isValidated
Determines if the survey is validated.
- Returns:
- true if the survey is validated.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setValidated
Valid or invalid survey
- Parameters:
validated
- true to validate the survey
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setValidationDate
Set the date of validation
- Parameters:
date
- The date of validation
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getValidationDate
Get the date of validation
- Returns:
- the date of validation
- Throws:
AmetysRepositoryException
- if an error occurs.
-
-
-
-
-
getRedirection
Retrieves the redirection.
- Returns:
- the page id of redirection or null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setRedirection
Set the redirection.
- Parameters:
pageId
- the page id. Can be null to delete redirection
- Throws:
AmetysRepositoryException
- if an error occurs.
-
reinit
Re-initialize the survey. Just set the date of the last re-initialization of the survey.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getReinitDate
Get the date of the last re-initialization of the survey
- Returns:
- the re-initialization date
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getPages
Get the survey pages.
- Returns:
- the survey pages.
- Throws:
AmetysRepositoryException
- if an error occurs when retrieving the pages of the survey
-
getQuestion
Get a question by its name.
- Parameters:
name
- the question name.
- Returns:
- the question.
- Throws:
AmetysRepositoryException
- if an error occurs when retrieving a question of a survey
-
getQuestions
Get the survey questions.
- Returns:
- the survey questions.
- Throws:
AmetysRepositoryException
- if an error occurs when retrieving all the questions of a survey
-
-
-
getLanguage
Get the survey language.
- Returns:
- the survey language.
-
findUniqueQuestionName
Returns a unique question name in the survey
- Parameters:
originalName
- The original name
- Returns:
- a unique question name
-
copyTo
Copy the current
AmetysObject
to the given object. Be careful, this method save changes.
- Specified by:
copyTo
in interface CopiableAmetysObject
- 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.
- Specified by:
copyTo
in interface CopiableAmetysObject
- 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.