Package org.ametys.plugins.forms.helper
Class FormAdminDashboardHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.forms.helper.FormAdminDashboardHelper
- All Implemented Interfaces:
LogEnabled,Component,Serviceable
The helper to handle admin dashboard
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FormDAOThe form DAOprotected FormEntryDAOThe form entry DAOprotected RightManagerThe right managerprotected WorkflowHelperThe workflow helper componentprotected WorkflowProviderThe workflow providerstatic final StringAvalon ROLE. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean_hasAtLeastOneEntryToDoAction(Form form, UserIdentity user) trueif the form has an entry that the user can do actionList<com.opensymphony.workflow.loader.ActionDescriptor> getAvailableActions(FormEntry entry, List<String> types) Get available actions for current user filter by its typegetFormToAdmin(String siteName, UserIdentity currentUser) The list of form to admin for current userbooleanhasAvailableActions(FormEntry entry) trueif the entry has available actions for current uservoidservice(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
Avalon ROLE. -
_workflowProvider
The workflow provider -
_formDAO
The form DAO -
_rightManager
The right manager -
_formEntryDAO
The form entry DAO -
_workflowHelper
The workflow helper component
-
-
Constructor Details
-
FormAdminDashboardHelper
public FormAdminDashboardHelper()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getFormToAdmin
The list of form to admin for current user- Parameters:
siteName- the sitenamecurrentUser- the current user- Returns:
- the list of form to admin for current user
-
_hasAtLeastOneEntryToDoAction
trueif the form has an entry that the user can do action- Parameters:
form- the formuser- the user- Returns:
trueif the form has an entry that the user can do action
-
hasAvailableActions
trueif the entry has available actions for current user- Parameters:
entry- the entry- Returns:
trueif the entry has available actions for current user
-
getAvailableActions
public List<com.opensymphony.workflow.loader.ActionDescriptor> getAvailableActions(FormEntry entry, List<String> types) Get available actions for current user filter by its type- Parameters:
entry- the entrytypes- the types of actions. Empty to get all available actions- Returns:
- the available actions for current user
-