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.ApplicationContextcontextprotected Map<String,String>errorMapstatic intFAILstatic intSUCCESS_CONTINUEstatic intSUCCESS_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.ApplicationContextgetContext()Map<String,String>getErrors()abstract intpost(String command, Map<String,Object> objList, Object cmd)Post-processing event - After data has persistedabstract intpre(String command, Map<String,Object> objList, Object cmd)Pre-processing event before data is persistedvoidsetContext(org.springframework.context.ApplicationContext context)abstract intvalidate(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)
-
-