Package org.ametys.plugins.forms.dao
Class FormEntryDAO
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.forms.dao.FormEntryDAO
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
Form entry DAO.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CurrentUserProvider
The current user provider.protected LimitedEntriesHelper
The handling limited entries helperprotected ObservationManager
Observer manager.protected ParametersManager
The parameters managerprotected AmetysObjectResolver
Ametys object resolver.protected RightManager
The rights managerstatic final String
The right id to delete form entriesstatic final String
Name for entries root jcr nodestatic final String
The right id to consult form entriesstatic final String
The Avalon role name. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
_isSortable
(FormEntry entry, FormQuestion question) true
if the column link to the question is sortableclearEntries
(String id) Delete all entries of a formcreateEntry
(Form form) Creates aFormEntry
.deleteEntry
(String id) Deletes aFormEntry
.getColumns
(String formId) Get the columns information of a formGets properties of a form entrygetFormEntryProperties
(FormEntry entry) Gets properties of a form entryvoid
service
(ServiceManager serviceManager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The Avalon role name. -
ENTRIES_ROOT
Name for entries root jcr node- See Also:
-
HANDLE_FORMS_ENTRIES_RIGHT_ID
The right id to consult form entries- See Also:
-
DELETE_FORMS_ENTRIES_RIGHT_ID
The right id to delete form entries- See Also:
-
_resolver
Ametys object resolver. -
_parametersManager
The parameters manager -
_observationManager
Observer manager. -
_currentUserProvider
The current user provider. -
_handleLimitedEntriesHelper
The handling limited entries helper -
_rightManager
The rights manager
-
-
Constructor Details
-
FormEntryDAO
public FormEntryDAO()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getFormEntryProperties
Gets properties of a form entry- Parameters:
id
- The id of the form entry- Returns:
- The properties
-
getFormEntryProperties
Gets properties of a form entry- Parameters:
entry
- The form entry- Returns:
- The properties
-
createEntry
Creates aFormEntry
.- Parameters:
form
- The parent form- Returns:
- return the form entry
-
getColumns
public Map<String,Object> getColumns(String formId) throws ProcessingException, IllegalArgumentException Get the columns information of a form- Parameters:
formId
- the identifier of form- Returns:
- The columns
- Throws:
IllegalArgumentException
- If an error occurredProcessingException
- If an error occurred
-
_isSortable
true
if the column link to the question is sortable- Parameters:
entry
- the entry for the modelquestion
- the question- Returns:
true
if the column link to the question is sortable
-
deleteEntry
Deletes aFormEntry
.- Parameters:
id
- The id of the form entry to delete- Returns:
- The entry data
-
clearEntries
Delete all entries of a form- Parameters:
id
- The id of the form- Returns:
- the deleted entries data
-