Package org.openiam.base
Class ExtendController
- java.lang.Object
-
- org.openiam.base.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 Summary
Fields Modifier and Type Field Description protected org.springframework.context.ApplicationContext
context
protected Map<String,String>
errorMap
static int
FAIL
static int
SUCCESS_CONTINUE
static int
SUCCESS_STOP
-
Constructor Summary
Constructors Constructor Description ExtendController()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.springframework.context.ApplicationContext
getContext()
Map<String,String>
getErrors()
abstract int
post(String command, Map<String,Object> objList, Object cmd)
Post-processing event - After data has persistedabstract int
pre(String command, Map<String,Object> objList, Object cmd)
Pre-processing event before data is persistedvoid
setContext(org.springframework.context.ApplicationContext context)
abstract int
validate(String command, Map<String,Object> objList, Object cmd, Object Errors)
Validation step
-
-
-
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 operationobjList
- - 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 operationobjList
- - 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 operationobjList
- - Map of objects that have been passed in.cmd
- - Command object that corresponds to this controllerErrors
-- Returns:
-
getContext
public org.springframework.context.ApplicationContext getContext()
-
setContext
public void setContext(org.springframework.context.ApplicationContext context)
-
-