Class CustomAction


  • public class CustomAction
    extends Object
    This defines a custom entity action, this will be used to define which custom actions are allowed to be performed on entities or collections of entities
    Author:
    Aaron Zeckoski (azeckoski @ gmail.com)
    • Field Detail

      • action

        public final String action
        The action key which will be used to trigger the action (e.g. promote), will be triggered by a URL like so: /user/aaronz/promote
      • viewKey

        public final String viewKey
        (optional) Must match one of the VIEW constants from EntityView
        The view type which this action goes with, this roughly translates to the GET/POST/PUT/DELETE in http
        e.g. GET /user/action would be EntityView.VIEW_LIST while POST /user/aaronz/action would be EntityView.VIEW_NEW, can be null to match all viewkeys (i.e. to allow this action from any http method type and on collections and entities)
      • methodName

        public final String methodName
        This will be non-null if there is a custom action method which was found or identified by the annotation EntityCustomAction or if the developer has defined this explicitly
      • methodArgTypes

        public Class<?>[] methodArgTypes
        These are the argument types found in the custom action method in order, this should not be populated manually as any value in this will be overwritten
    • Method Detail

      • getMethod

        public Method getMethod()
        INTERNAL USE ONLY
      • setMethod

        public void setMethod​(Method m)
        INTERNAL USE ONLY
      • copy

        public CustomAction copy()
        Returns:
        a copy of this object