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
Modifier and TypeFieldDescriptionstatic final String
Constant for active status of entry.static final String
Constant for id of an entry.static final String
The IP address of the person who answered the form.static final String
Constant for the date and time of submission attribute.static final String
The id of the user who answered the form.static final String
Constant for entry attribute prefix.Fields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, COMMENTS_SUFFIX, STATUS_SUFFIX
-
Constructor Summary
ConstructorDescriptionFormEntry
(javax.jcr.Node node, String parentPath, FormEntryFactory factory) Creates anFormEntry
. -
Method Summary
Modifier and TypeMethodDescriptionlong
Retrieves the current step id of the Ametys objectReturns theDataHolder
of thisAmetysObject
.Retrieves the id.getForm()
Get formgetIP()
Retrieves the ip.Retrieves the submitDate.getUser()
Get the identity of the user answering the formlong
Retrieves the workflow id associated with the Ametys object.isActive()
Get active status of the entryvoid
Set active status of the entryvoid
setCurrentStepId
(long stepId) Set the current step id of the Ametys objectvoid
setEntryId
(Long id) Set the id.void
Set the ip.void
setSubmitDate
(ZonedDateTime submitDate) Set the submitDate.void
setUser
(UserIdentity user) Set the identity of the user answering the formvoid
setWorkflowId
(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, saveChanges
Methods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX
Methods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNode
Methods inherited from interface org.ametys.cms.data.ametysobject.ModelAwareDataAwareAmetysObject
getSystemPropertyExtensionPoint, indexData, indexData
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelAwareDataAwareAmetysObject
dataToJSON, dataToJSONForEdition, dataToMap, dataToSAX, dataToSAXForEdition, getComments, getDataNames, getDefinition, getExternalValue, getLocalValue, getModel, getStatus, getValue, getValue, hasComments, hasDefinition, hasExternalValue, hasExternalValueOrEmpty, hasLocalValue, hasLocalValueOrEmpty, hasValue, hasValueOrEmpty
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
commentsToSAX, dataToJSON, dataToJSON, dataToJSON, dataToMap, dataToMap, dataToMap, dataToSAX, dataToSAX, dataToSAX, getDataNames, getType, getValue, hasValue, hasValueOrEmpty, isMultiple
Methods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChanges
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModifiableDataHolder
getRepositoryData
Methods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolder
Methods inherited from interface org.ametys.cms.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getComposite, getComposite, getExternalComposite, getExternalComposite, getExternalRepeater, getExternalRepeater, getLocalComposite, getLocalComposite, getLocalRepeater, getLocalRepeater, getParentDataHolder, getRepeater, getRepeater, getRootDataHolder
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getRepositoryData, removeExternalizableMetadataIfExists, removeExternalValue, removeLocalValue, removeValue, setComments, setExternalValue, setLocalValue, setStatus, setValue, synchronizeValues, synchronizeValues, synchronizeValues, synchronizeValues
Methods 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:
-
-
Constructor Details
-
FormEntry
Creates anFormEntry
.- Parameters:
node
- the node backing thisAmetysObject
parentPath
- 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
-
getWorkflowId
Description copied from interface:WorkflowAwareAmetysObject
Retrieves the workflow id associated with the Ametys object.- Specified by:
getWorkflowId
in interfaceWorkflowAwareAmetysObject
- Returns:
- the workflow id.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setWorkflowId
Description copied from interface:WorkflowAwareAmetysObject
Set 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:
setWorkflowId
in interfaceWorkflowAwareAmetysObject
- Parameters:
workflowId
- the workflow id of the object.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getCurrentStepId
Description copied from interface:WorkflowAwareAmetysObject
Retrieves the current step id of the Ametys object- Specified by:
getCurrentStepId
in interfaceWorkflowAwareAmetysObject
- Returns:
- the current step id
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setCurrentStepId
Description copied from interface:WorkflowAwareAmetysObject
Set the current step id of the Ametys object- Specified by:
setCurrentStepId
in interfaceWorkflowAwareAmetysObject
- Parameters:
stepId
- the step id to set- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDataHolder
Description copied from interface:DataAwareAmetysObject
Returns theDataHolder
of thisAmetysObject
.- Specified by:
getDataHolder
in interfaceDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModelAwareDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModelAwareDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModifiableModelAwareDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModifiableModelAwareDataAwareAmetysObject
- Returns:
- the
DataHolder
of thisAmetysObject
-