public class SurveyPage extends org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject<SurveyPageFactory> implements org.ametys.plugins.repository.CopiableAmetysObject
AmetysObject for storing survey| Constructor and Description |
|---|
SurveyPage(javax.jcr.Node node,
java.lang.String parentPath,
SurveyPageFactory factory)
Creates a
SurveyPage. |
| Modifier and Type | Method and Description |
|---|---|
SurveyPage |
copyTo(org.ametys.plugins.repository.ModifiableTraversableAmetysObject parent,
java.lang.String name) |
SurveyPage |
copyTo(org.ametys.plugins.repository.ModifiableTraversableAmetysObject parent,
java.lang.String name,
java.util.List<java.lang.String> restrictTo) |
void |
deleteRule()
Delete the rule
|
java.lang.String |
getDescription()
Retrieves the description.
|
org.ametys.plugins.repository.metadata.BinaryMetadata |
getExternalPicture()
Get the picture as a binary metadata.
|
java.lang.String |
getLabel()
Retrieves the survey name.
|
java.lang.String |
getPictureAlternative()
Get the picture alternative.
|
java.lang.String |
getPictureType()
Get the picture type.
|
SurveyQuestion |
getQuestion(java.lang.String name)
Get a question.
|
org.ametys.plugins.repository.AmetysObjectIterable<SurveyQuestion> |
getQuestions()
Get the page's questions.
|
java.lang.String |
getResourcePictureId()
Get the picture resource ID.
|
SurveyRule |
getRule()
Get rule
|
Survey |
getSurvey()
Get the Survey to which this page belongs.
|
java.lang.String |
getTitle()
Retrieves the title.
|
boolean |
hasQuestion(java.lang.String name)
Determines if question exists
|
boolean |
hasRule()
Determines if the page has a rule
|
protected void |
removePictureMetas()
Remove all picture metas (picture ID and picture binary).
|
void |
setDescription(java.lang.String description)
Set the description.
|
void |
setExternalPicture(java.lang.String mimeType,
java.lang.String filename,
java.io.InputStream stream)
Set the picture from an external file.
|
void |
setLabel(java.lang.String name)
Set the survey name.
|
void |
setNoPicture()
Removes any picture currently assigned.
|
void |
setPictureAlternative(java.lang.String alternative)
Set the picture alternative.
|
void |
setPictureType(java.lang.String type)
Set the picture type.
|
void |
setResourcePicture(java.lang.String resourceId)
Set the picture from an explorer resource.
|
void |
setRule(SurveyRule.RuleType ruleType,
java.lang.String page)
Set the rule for branching
|
void |
setTitle(java.lang.String title)
Set the title.
|
createChild, getChild, getChildren, hasChild_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChangesequals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitequals, getId, getName, getParent, getParentPath, getPath, hashCodegetMetadataHolderpublic SurveyPage(javax.jcr.Node node,
java.lang.String parentPath,
SurveyPageFactory factory)
SurveyPage.node - the node backing this AmetysObject.parentPath - the parent path in the Ametys hierarchy.factory - the SurveyFactory which creates the AmetysObject.public java.lang.String getTitle()
throws org.ametys.plugins.repository.AmetysRepositoryException
org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.public void setTitle(java.lang.String title)
throws org.ametys.plugins.repository.AmetysRepositoryException
title - the title.org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.public java.lang.String getLabel()
throws org.ametys.plugins.repository.AmetysRepositoryException
org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.public void setLabel(java.lang.String name)
throws org.ametys.plugins.repository.AmetysRepositoryException
name - the survey name.org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.public java.lang.String getDescription()
throws org.ametys.plugins.repository.AmetysRepositoryException
org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.public void setDescription(java.lang.String description)
throws org.ametys.plugins.repository.AmetysRepositoryException
description - the description.org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.public void setRule(SurveyRule.RuleType ruleType, java.lang.String page) throws org.ametys.plugins.repository.AmetysRepositoryException
ruleType - the rule typepage - the page to jump or skip. Can be null.org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.public void deleteRule()
throws org.ametys.plugins.repository.AmetysRepositoryException
org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.public boolean hasRule()
throws org.ametys.plugins.repository.AmetysRepositoryException
org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.public SurveyRule getRule() throws org.ametys.plugins.repository.AmetysRepositoryException
org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.public Survey getSurvey() throws org.ametys.plugins.repository.AmetysRepositoryException
org.ametys.plugins.repository.AmetysRepositoryExceptionpublic boolean hasQuestion(java.lang.String name)
throws org.ametys.plugins.repository.AmetysRepositoryException
name - The question nametrue true if the question existsorg.ametys.plugins.repository.AmetysRepositoryExceptionpublic SurveyQuestion getQuestion(java.lang.String name) throws org.ametys.plugins.repository.AmetysRepositoryException
name - the question name.org.ametys.plugins.repository.AmetysRepositoryExceptionpublic org.ametys.plugins.repository.AmetysObjectIterable<SurveyQuestion> getQuestions() throws org.ametys.plugins.repository.AmetysRepositoryException
org.ametys.plugins.repository.AmetysRepositoryExceptionpublic org.ametys.plugins.repository.metadata.BinaryMetadata getExternalPicture()
throws org.ametys.plugins.repository.AmetysRepositoryException
org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.public void setExternalPicture(java.lang.String mimeType,
java.lang.String filename,
java.io.InputStream stream)
throws org.ametys.plugins.repository.AmetysRepositoryException
mimeType - the file MIME type.filename - the file name.stream - an input stream on the file bytes.org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.public java.lang.String getResourcePictureId()
throws org.ametys.plugins.repository.AmetysRepositoryException
org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.public void setResourcePicture(java.lang.String resourceId)
throws org.ametys.plugins.repository.AmetysRepositoryException
resourceId - the resource ID.org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.public void setNoPicture()
throws org.ametys.plugins.repository.AmetysRepositoryException
org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.public java.lang.String getPictureType()
throws org.ametys.plugins.repository.AmetysRepositoryException
org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.public void setPictureType(java.lang.String type)
throws org.ametys.plugins.repository.AmetysRepositoryException
type - the picture type to set.org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.public java.lang.String getPictureAlternative()
throws org.ametys.plugins.repository.AmetysRepositoryException
org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.public void setPictureAlternative(java.lang.String alternative)
throws org.ametys.plugins.repository.AmetysRepositoryException
alternative - the picture alternative to set.org.ametys.plugins.repository.AmetysRepositoryException - if an error occurs.protected void removePictureMetas()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryException - if an error occurs.public SurveyPage copyTo(org.ametys.plugins.repository.ModifiableTraversableAmetysObject parent, java.lang.String name) throws org.ametys.plugins.repository.AmetysRepositoryException
copyTo in interface org.ametys.plugins.repository.CopiableAmetysObjectorg.ametys.plugins.repository.AmetysRepositoryExceptionpublic SurveyPage copyTo(org.ametys.plugins.repository.ModifiableTraversableAmetysObject parent, java.lang.String name, java.util.List<java.lang.String> restrictTo) throws org.ametys.plugins.repository.AmetysRepositoryException
copyTo in interface org.ametys.plugins.repository.CopiableAmetysObjectorg.ametys.plugins.repository.AmetysRepositoryExceptionCopyright © 2010 Anyware Services. All Rights Reserved.