Class FormEntry
java.lang.Object
org.ametys.plugins.repository.AbstractAmetysObject
org.ametys.plugins.repository.jcr.SimpleAmetysObject<FormEntryFactory>
org.ametys.plugins.forms.repository.FormEntry
- All Implemented Interfaces:
ModelAwareDataAwareAmetysObject,ModifiableModelAwareDataAwareAmetysObject,IndexableDataHolder,ModifiableIndexableDataHolder,AmetysObject,DataAwareAmetysObject,ModelAwareDataAwareAmetysObject,ModifiableModelAwareDataAwareAmetysObject,DataHolder,ModelAwareDataHolder,ModifiableDataHolder,ModifiableModelAwareDataHolder,JCRAmetysObject,MetadataAwareAmetysObject,ModifiableMetadataAwareAmetysObject,ModifiableAmetysObject,RemovableAmetysObject,WorkflowAwareAmetysObject
public class FormEntry
extends SimpleAmetysObject<FormEntryFactory>
implements ModifiableModelAwareDataAwareAmetysObject, WorkflowAwareAmetysObject
Class representing a form entry, backed by a JCR node.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstant for active status of entry.static final StringConstant for anonymization date of an entrystatic final StringConstant for id of an entry.static final StringThe IP address of the person who answered the form.static final StringConstant for the date and time of submission attribute.static final StringThe id of the user who answered the form.static final StringConstant for entry attribute prefix.Fields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, STATUS_SUFFIX -
Constructor Summary
ConstructorsConstructorDescriptionFormEntry(javax.jcr.Node node, String parentPath, FormEntryFactory factory) Creates anFormEntry. -
Method Summary
Modifier and TypeMethodDescriptionvoidEdit answers to confidential questions with generic valuelongRetrieves the current step id of the Ametys objectReturns theDataHolderof thisAmetysObject.Retrieves the id.getForm()Get formgetIP()Retrieves the ip.Retrieves the submitDate.getUser()Get the identity of the user answering the formlongRetrieves the workflow id associated with the Ametys object.isActive()Get active status of the entryvoidSet active status of the entryvoidsetCurrentStepId(long stepId) Set the current step id of the Ametys objectvoidsetEntryId(Long id) Set the id.voidSet the ip.voidsetSubmitDate(ZonedDateTime submitDate) Set the submitDate.voidsetUser(UserIdentity user) Set the identity of the user answering the formvoidsetWorkflowId(long workflowId) Set the workflow id of this Ametys object.
This method will throw Exception if the workflow id was already set on this Ametys object.Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChangesMethods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCodeMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAXMethods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNodeMethods inherited from interface org.ametys.cms.data.ametysobject.ModelAwareDataAwareAmetysObject
getSystemPropertyExtensionPoint, indexData, indexDataMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelAwareDataAwareAmetysObject
dataToJSON, dataToJSONForEdition, dataToMap, dataToSAX, dataToSAXForEdition, getDataNames, getDefinition, getDifferences, getDifferences, getDifferences, getDifferences, getExternalValue, getLocalValue, getModel, getStatus, getValue, getValue, hasDefinition, hasDifferences, hasDifferences, hasDifferences, hasDifferences, hasExternalValue, hasExternalValueOrEmpty, hasLocalValue, hasLocalValueOrEmpty, hasValue, hasValueOrEmptyMethods inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
dataToJSON, dataToJSON, dataToJSON, dataToMap, dataToMap, dataToMap, dataToSAX, dataToSAX, dataToSAX, getDataNames, getType, getValue, hasValue, hasValueOrEmpty, isMultipleMethods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChangesMethods inherited from interface org.ametys.plugins.repository.data.holder.ModifiableDataHolder
getRepositoryDataMethods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolderMethods inherited from interface org.ametys.cms.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getComposite, getComposite, getExternalComposite, getExternalComposite, getExternalRepeater, getExternalRepeater, getLocalComposite, getLocalComposite, getLocalRepeater, getLocalRepeater, getParentDataHolder, getRepeater, getRepeater, getRootDataHolderMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getRepositoryData, removeExternalizableMetadataIfExists, removeExternalValue, removeLocalValue, removeValue, setExternalValue, setLocalValue, setStatus, setValue, synchronizeValues, synchronizeValues, synchronizeValues, synchronizeValuesMethods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
remove
-
Field Details
-
SYSTEM_ATTRIBUTE_PREFIX
Constant for entry attribute prefix.- See Also:
-
ATTRIBUTE_ID
Constant for id of an entry.- See Also:
-
ATTRIBUTE_SUBMIT_DATE
Constant for the date and time of submission attribute.- See Also:
-
ATTRIBUTE_IP
The IP address of the person who answered the form.- See Also:
-
ATTRIBUTE_USER
The id of the user who answered the form.- See Also:
-
ATTRIBUTE_ACTIVE
Constant for active status of entry. Default is true- See Also:
-
ATTRIBUTE_ANONYMIZATION_DATE
Constant for anonymization date of an entry- See Also:
-
-
Constructor Details
-
FormEntry
Creates anFormEntry.- Parameters:
node- the node backing thisAmetysObjectparentPath- the parentPath in the Ametys hierarchyfactory- the DefaultAmetysObjectFactory which created the AmetysObject
-
-
Method Details
-
getForm
Get form- Returns:
- the form
-
getEntryId
Retrieves the id.- Returns:
- the id.
-
setEntryId
Set the id.- Parameters:
id- the id.
-
getIP
Retrieves the ip.- Returns:
- the ip.
-
setIP
Set the ip.- Parameters:
ip- the ip.
-
getSubmitDate
Retrieves the submitDate.- Returns:
- the submitDate.
-
setSubmitDate
Set the submitDate.- Parameters:
submitDate- the submitDate.
-
setUser
Set the identity of the user answering the form- Parameters:
user- the user identity
-
isActive
Get active status of the entry- Returns:
- the active status
-
setActive
Set active status of the entry- Parameters:
isActive- the active status
-
getUser
Get the identity of the user answering the form- Returns:
- the user identity
-
anonymize
Edit answers to confidential questions with generic value -
getWorkflowId
Description copied from interface:WorkflowAwareAmetysObjectRetrieves the workflow id associated with the Ametys object.- Specified by:
getWorkflowIdin interfaceWorkflowAwareAmetysObject- Returns:
- the workflow id.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setWorkflowId
Description copied from interface:WorkflowAwareAmetysObjectSet the workflow id of this Ametys object.
This method will throw Exception if the workflow id was already set on this Ametys object.- Specified by:
setWorkflowIdin interfaceWorkflowAwareAmetysObject- Parameters:
workflowId- the workflow id of the object.- Throws:
AmetysRepositoryException- if an error occurs.
-
getCurrentStepId
Description copied from interface:WorkflowAwareAmetysObjectRetrieves the current step id of the Ametys object- Specified by:
getCurrentStepIdin interfaceWorkflowAwareAmetysObject- Returns:
- the current step id
- Throws:
AmetysRepositoryException- if an error occurs.
-
setCurrentStepId
Description copied from interface:WorkflowAwareAmetysObjectSet the current step id of the Ametys object- Specified by:
setCurrentStepIdin interfaceWorkflowAwareAmetysObject- Parameters:
stepId- the step id to set- Throws:
AmetysRepositoryException- if an error occurs.
-
getDataHolder
Description copied from interface:DataAwareAmetysObjectReturns theDataHolderof thisAmetysObject.- Specified by:
getDataHolderin interfaceDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModelAwareDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModelAwareDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModifiableModelAwareDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModifiableModelAwareDataAwareAmetysObject- Returns:
- the
DataHolderof thisAmetysObject
-