public class ActionService extends DefaultComponent implements ActionManager
| Modifier and Type | Field and Description | 
|---|---|
static ComponentName | 
ID  | 
protected com.codahale.metrics.MetricRegistry | 
metrics  | 
lastModified, name| Constructor and Description | 
|---|
ActionService()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
activate(ComponentContext context)
Activates the component. 
 | 
void | 
addAction(Action action)  | 
boolean | 
checkFilter(String filterId,
           ActionContext context)
Returns false if given filter evaluation is supposed to deny access when checking for this filter. 
 | 
boolean | 
checkFilters(Action action,
            ActionContext context)  | 
protected boolean | 
checkFilters(Action action,
            List<String> filterIds,
            ActionContext context)  | 
boolean | 
checkFilters(List<String> filterIds,
            ActionContext context)
Returns false if given filters evaluation is supposed to deny access when checking for this filter. 
 | 
void | 
deactivate(ComponentContext context)
Deactivates the component. 
 | 
Action | 
getAction(String actionId)  | 
Action | 
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 ActionRegistry | 
getActionRegistry()
Return the action registry 
 | 
List<Action> | 
getActions(String category,
          ActionContext context)
Gets actions for a category (filters are evaluated). 
 | 
List<Action> | 
getActions(String category,
          ActionContext context,
          boolean hideUnavailableActions)
Gets actions for a category (filters are evaluated). 
 | 
List<Action> | 
getAllActions(String category)
Gets all actions in a category (filters are NOT evaluated). 
 | 
ActionFilter | 
getFilter(String filterId)  | 
protected ActionFilterRegistry | 
getFilterRegistry()
Return the action filter registry 
 | 
ActionFilter[] | 
getFilters(String actionId)  | 
boolean | 
isEnabled(Action action,
         ActionContext context)  | 
boolean | 
isEnabled(String actionId,
         ActionContext context)  | 
boolean | 
isRegistered(String actionId)  | 
protected boolean | 
isTimeTracerLogEnabled()  | 
void | 
registerContribution(Object contribution,
                    String extensionPoint,
                    ComponentInstance contributor)  | 
protected void | 
registerFilterFactory(FilterFactory ff)
Deprecated. 
 
seems not used in Nuxeo - should be removed - and anyway the merge is not done 
 | 
void | 
remove()
Cleanup method. 
 | 
Action | 
removeAction(String actionId)  | 
void | 
start(ComponentContext context)
Start the component. 
 | 
void | 
unregisterContribution(Object contribution,
                      String extensionPoint,
                      ComponentInstance contributor)  | 
void | 
unregisterFilterFactory(FilterFactory ff)
Deprecated. 
 
seems not used in Nuxeo - should be removed - and anyway the merge is not done 
 | 
getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, stop, unregister, unregisterExtensionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplicationStarted, getApplicationStartedOrderpublic static final ComponentName ID
protected final com.codahale.metrics.MetricRegistry metrics
public ActionService()
public void activate(ComponentContext context)
ComponentThis method is called by the runtime when a component is activated.
activate in interface Componentactivate in class DefaultComponentcontext - the runtime contextpublic void deactivate(ComponentContext context)
ComponentThis method is called by the runtime when a component is deactivated.
deactivate in interface Componentdeactivate in class DefaultComponentcontext - the runtime contextpublic void start(ComponentContext context)
Componentstart in interface Componentstart in class DefaultComponentprotected final ActionRegistry getActionRegistry()
protected final ActionFilterRegistry getFilterRegistry()
public boolean checkFilters(Action action, ActionContext context)
checkFilters in interface ActionManagerpublic List<Action> getActions(String category, ActionContext context)
ActionManagerOnly actions available in the given context are returned
getActions in interface ActionManagerpublic List<Action> getAllActions(String category)
ActionManagergetAllActions in interface ActionManagerpublic List<Action> getActions(String category, ActionContext context, boolean hideUnavailableActions)
ActionManagerIf hideUnavailableActions, all actions of the category are returned but actions are flagged with an available flag depending on filters evaluation.
getActions in interface ActionManagerprotected boolean isTimeTracerLogEnabled()
public Action getAction(String actionId, ActionContext context, boolean hideUnavailableAction)
ActionManagerIf hideUnavailableActions is false, the action is always returned but it is flagged with an available flag depending on filters evaluation.
getAction in interface ActionManagerpublic Action getAction(String actionId)
getAction in interface ActionManagerpublic boolean isRegistered(String actionId)
isRegistered in interface ActionManagerpublic boolean isEnabled(String actionId, ActionContext context)
isEnabled in interface ActionManagerpublic boolean isEnabled(Action action, ActionContext context)
public ActionFilter[] getFilters(String actionId)
getFilters in interface ActionManagerpublic ActionFilter getFilter(String filterId)
getFilter in interface ActionManagerActionFilterRegistry.getFilter(String)public boolean checkFilter(String filterId, ActionContext context)
ActionManagercheckFilter in interface ActionManagerpublic boolean checkFilters(List<String> filterIds, ActionContext context)
ActionManagercheckFilters in interface ActionManagerprotected boolean checkFilters(Action action, List<String> filterIds, ActionContext context)
public void addAction(Action action)
addAction in interface ActionManagerActionRegistry.addAction(Action)public Action removeAction(String actionId)
removeAction in interface ActionManagerActionRegistry.removeAction(String)public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution in class DefaultComponentpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution in class DefaultComponent@Deprecated protected void registerFilterFactory(FilterFactory ff)
ff - @Deprecated public void unregisterFilterFactory(FilterFactory ff)
ff - public void remove()
ActionManagerremove in interface ActionManagerCopyright © 2019 Nuxeo. All rights reserved.