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
Modifier and TypeFieldDescriptionstatic final ComponentName
protected final io.dropwizard.metrics5.MetricRegistry
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(ComponentContext context) Activates the component.void
boolean
checkFilter
(String filterId, ActionContext context) Returns false if given filter evaluation is supposed to deny access when checking for this filter.boolean
checkFilters
(List<String> filterIds, ActionContext context) Returns false if given filters evaluation is supposed to deny access when checking for this filter.protected boolean
checkFilters
(Action action, List<String> filterIds, ActionContext context) boolean
checkFilters
(Action action, ActionContext context) void
deactivate
(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.protected final ActionRegistry
Return the action registrygetActions
(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).protected final ActionFilterRegistry
Return the action filter registrygetFilters
(String actionId) boolean
isEnabled
(String actionId, ActionContext context) boolean
isEnabled
(Action action, ActionContext context) boolean
isRegistered
(String actionId) protected boolean
void
registerContribution
(Object contribution, String extensionPoint, ComponentInstance contributor) protected void
Deprecated.seems not used in Nuxeo - should be removed - and anyway the merge is not donevoid
remove()
Cleanup method.removeAction
(String actionId) void
start
(ComponentContext context) Start the component.void
unregisterContribution
(Object contribution, String extensionPoint, ComponentInstance contributor) void
Deprecated.seems not used in Nuxeo - should be removed - and anyway the merge is not doneMethods inherited from class org.nuxeo.runtime.model.DefaultComponent
addRuntimeMessage, addRuntimeMessage, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, stop, unregister, unregisterExtension
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
ID
-
metrics
protected final io.dropwizard.metrics5.MetricRegistry metrics
-
-
Constructor Details
-
ActionService
public ActionService()
-
-
Method Details
-
activate
Description copied from interface:Component
Activates the component.This method is called by the runtime when a component is activated.
- Specified by:
activate
in interfaceComponent
- Overrides:
activate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
deactivate
Description copied from interface:Component
Deactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivate
in interfaceComponent
- Overrides:
deactivate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
start
Description copied from interface:Component
Start the component. This method is called after all the components were resolved and activated- Specified by:
start
in interfaceComponent
- Overrides:
start
in classDefaultComponent
-
getActionRegistry
Return the action registry -
getFilterRegistry
Return the action filter registry -
checkFilters
- Specified by:
checkFilters
in interfaceActionManager
-
getActions
Description copied from interface:ActionManager
Gets actions for a category (filters are evaluated).Only actions available in the given context are returned
- Specified by:
getActions
in interfaceActionManager
-
getAllActions
Description copied from interface:ActionManager
Gets all actions in a category (filters are NOT evaluated).- Specified by:
getAllActions
in interfaceActionManager
-
getActions
public List<Action> getActions(String category, ActionContext context, boolean hideUnavailableActions) Description copied from interface:ActionManager
Gets 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:
getActions
in interfaceActionManager
-
isTimeTracerLogEnabled
protected boolean isTimeTracerLogEnabled() -
getAction
Description copied from interface:ActionManager
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.If hideUnavailableActions is false, the action is always returned but it is flagged with an available flag depending on filters evaluation.
- Specified by:
getAction
in interfaceActionManager
-
getAction
- Specified by:
getAction
in interfaceActionManager
-
isRegistered
- Specified by:
isRegistered
in interfaceActionManager
-
isEnabled
- Specified by:
isEnabled
in interfaceActionManager
-
isEnabled
-
getFilters
- Specified by:
getFilters
in interfaceActionManager
-
getFilter
- Specified by:
getFilter
in interfaceActionManager
- See Also:
-
checkFilter
Description copied from interface:ActionManager
Returns false if given filter evaluation is supposed to deny access when checking for this filter.- Specified by:
checkFilter
in interfaceActionManager
-
checkFilters
Description copied from interface:ActionManager
Returns false if given filters evaluation is supposed to deny access when checking for this filter.- Specified by:
checkFilters
in interfaceActionManager
-
checkFilters
-
addAction
- Specified by:
addAction
in interfaceActionManager
- See Also:
-
removeAction
- Specified by:
removeAction
in interfaceActionManager
- See Also:
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
registerContribution
in classDefaultComponent
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
unregisterContribution
in classDefaultComponent
-
registerFilterFactory
Deprecated.seems not used in Nuxeo - should be removed - and anyway the merge is not done -
unregisterFilterFactory
Deprecated.seems not used in Nuxeo - should be removed - and anyway the merge is not done -
remove
public void remove()Description copied from interface:ActionManager
Cleanup method.- Specified by:
remove
in interfaceActionManager
-