Package org.nuxeo.ecm.platform.actions
Class ActionService
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.ecm.platform.actions.ActionService
- All Implemented Interfaces:
Serializable,ActionManager,Adaptable,Component,Extensible,TimestampedService
- Author:
- Bogdan Stefanescu
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ComponentNameprotected final io.dropwizard.metrics5.MetricRegistrystatic final Stringstatic final StringFields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(ComponentContext context) Activates the component.voidbooleancheckFilter(String filterId, ActionContext context) Returns false if given filter evaluation is supposed to deny access when checking for this filter.booleancheckFilters(List<String> filterIds, ActionContext context) Returns false if given filters evaluation is supposed to deny access when checking for this filter.protected booleancheckFilters(Action action, List<String> filterIds, ActionContext context) booleancheckFilters(Action action, ActionContext context) voiddeactivate(ComponentContext context) Deactivates the component.getAction(String actionId, ActionContext context, boolean hideUnavailableAction) Returns action with given id, evaluating its filters in given context, and returning null if filters evaluation denies access or if action is not found.getActions(String category, ActionContext context) Gets actions for a category (filters are evaluated).getActions(String category, ActionContext context, boolean hideUnavailableActions) Gets actions for a category (filters are evaluated).getAllActions(String category) Gets all actions in a category (filters are NOT evaluated).getFilters(String actionId) booleanisEnabled(String actionId, ActionContext context) booleanisEnabled(Action action, ActionContext context) booleanisRegistered(String actionId) protected booleanprotected booleanregister(String xp, Descriptor descriptor) voidremove()Cleanup method.removeAction(String actionId) voidstart(ComponentContext context) Start the component.Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
addRuntimeMessage, addRuntimeMessage, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, stop, unregister, unregisterContribution, unregisterExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
XP_ACTIONS
- Since:
- 2025.0
- See Also:
-
XP_FILTERS
- Since:
- 2025.0
- See Also:
-
ID
-
metrics
protected final io.dropwizard.metrics5.MetricRegistry metrics
-
-
Constructor Details
-
ActionService
public ActionService()
-
-
Method Details
-
activate
Description copied from interface:ComponentActivates the component.This method is called by the runtime when a component is activated.
- Specified by:
activatein interfaceComponent- Overrides:
activatein classDefaultComponent- Parameters:
context- the runtime context
-
deactivate
Description copied from interface:ComponentDeactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivatein interfaceComponent- Overrides:
deactivatein classDefaultComponent- Parameters:
context- the runtime context
-
start
Description copied from interface:ComponentStart the component. This method is called after all the components were resolved and activated- Specified by:
startin interfaceComponent- Overrides:
startin classDefaultComponent
-
checkFilters
- Specified by:
checkFiltersin interfaceActionManager
-
getActions
Description copied from interface:ActionManagerGets actions for a category (filters are evaluated).Only actions available in the given context are returned
- Specified by:
getActionsin interfaceActionManager
-
getAllActions
Description copied from interface:ActionManagerGets all actions in a category (filters are NOT evaluated).- Specified by:
getAllActionsin interfaceActionManager
-
getActions
public List<Action> getActions(String category, ActionContext context, boolean hideUnavailableActions) Description copied from interface:ActionManagerGets actions for a category (filters are evaluated).If hideUnavailableActions, all actions of the category are returned but actions are flagged with an available flag depending on filters evaluation.
- Specified by:
getActionsin interfaceActionManager
-
isTimeTracerLogEnabled
protected boolean isTimeTracerLogEnabled() -
getAction
Description copied from interface:ActionManagerReturns action with given id, evaluating its filters in given context, and returning null if filters evaluation denies access or if action is not found.If hideUnavailableActions is false, the action is always returned but it is flagged with an available flag depending on filters evaluation.
- Specified by:
getActionin interfaceActionManager
-
getAction
- Specified by:
getActionin interfaceActionManager
-
isRegistered
- Specified by:
isRegisteredin interfaceActionManager
-
isEnabled
- Specified by:
isEnabledin interfaceActionManager
-
isEnabled
-
getFilters
- Specified by:
getFiltersin interfaceActionManager
-
getFilter
- Specified by:
getFilterin interfaceActionManager
-
checkFilter
Description copied from interface:ActionManagerReturns false if given filter evaluation is supposed to deny access when checking for this filter.- Specified by:
checkFilterin interfaceActionManager
-
checkFilters
Description copied from interface:ActionManagerReturns false if given filters evaluation is supposed to deny access when checking for this filter.- Specified by:
checkFiltersin interfaceActionManager
-
checkFilters
-
addAction
- Specified by:
addActionin interfaceActionManager
-
register
- Overrides:
registerin classDefaultComponent
-
removeAction
- Specified by:
removeActionin interfaceActionManager
-
remove
public void remove()Description copied from interface:ActionManagerCleanup method.- Specified by:
removein interfaceActionManager
-