Class FunctionAuthoriser

  • All Implemented Interfaces:
    GraphHook

    public class FunctionAuthoriser
    extends Object
    implements GraphHook
    The FunctionAuthoriser is a GraphHook which stops a user running Functions which have been banned. The Authoriser can be configured with unauthorised function classes.
    • Constructor Detail

      • FunctionAuthoriser

        public FunctionAuthoriser()
      • FunctionAuthoriser

        public FunctionAuthoriser​(List<Class<? extends Function>> unauthorisedFunctions)
    • Method Detail

      • preExecute

        public void preExecute​(OperationChain<?> opChain,
                               Context context)
        Description copied from interface: GraphHook
        Called from Graph before an OperationChain is executed.
        Specified by:
        preExecute in interface GraphHook
        Parameters:
        opChain - the OperationChain being executed. This can be modified/optimised in any GraphHook.
        context - the Context in which the operation chain was executed. The context also holds a reference to the original operation chain.
      • getUnauthorisedFunctions

        public List<Class<? extends Function>> getUnauthorisedFunctions()
      • setUnauthorisedFunctions

        public void setUnauthorisedFunctions​(List<Class<? extends Function>> unauthorisedFunctions)