Class ExtendController


  • public abstract class ExtendController
    extends Object
    Abstract class that allows you to extend a controller class using "pre" and "post" events
    Author:
    suneet
    • Field Detail

      • context

        protected org.springframework.context.ApplicationContext context
      • SUCCESS_CONTINUE

        public static int SUCCESS_CONTINUE
      • SUCCESS_STOP

        public static int SUCCESS_STOP
      • FAIL

        public static int FAIL
    • Constructor Detail

      • ExtendController

        public ExtendController()
    • Method Detail

      • pre

        public abstract int pre​(String command,
                                Map<String,​Object> objList,
                                Object cmd)
        Pre-processing event before data is persisted
        Parameters:
        command - - command name that can used to organize the code with in the operation
        objList - - Map of objects that have been passed in.
        cmd - - Command object that corresponds to this controller
        Returns:
      • post

        public abstract int post​(String command,
                                 Map<String,​Object> objList,
                                 Object cmd)
        Post-processing event - After data has persisted
        Parameters:
        command - - command name that can used to organize the code with in the operation
        objList - - Map of objects that have been passed in.
        cmd - - Command object that corresponds to this controller
        Returns:
      • validate

        public abstract int validate​(String command,
                                     Map<String,​Object> objList,
                                     Object cmd,
                                     Object Errors)
        Validation step
        Parameters:
        command - - command name that can used to organize the code with in the operation
        objList - - Map of objects that have been passed in.
        cmd - - Command object that corresponds to this controller
        Errors -
        Returns:
      • getContext

        public org.springframework.context.ApplicationContext getContext()
      • setContext

        public void setContext​(org.springframework.context.ApplicationContext context)