|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.zphinx.spine.core.AbstractBusinessDelegate
public abstract class AbstractBusinessDelegate
Core class used by the business tier to access business information and process activities.
It forms the core of the business layer and client programmers are advised to write all processing and business rules within the sub classes of this object to make their code more transparent to the view.
created 10-Jan-2005 16:03:12
copyright ©Zphinx Software Solutions
| Constructor Summary | |
|---|---|
AbstractBusinessDelegate()
|
|
| Method Summary | |
|---|---|
protected Object |
findBuilder()
Gets the builder for this BusinessDelegate as defined in the configuration file |
protected DataTransferAssembler |
getCommand()
Gets the DataTransferAssembler which configured this AbstractBusinessDelegate |
protected AbstractDataProxy |
getDataProxy()
Gets the AbstractDataProxy in use by this delegate |
protected Locale |
getUserLocale()
Gets the current users Locale from the DataTransferObject passed to this BusinessDelegate, otherwise returns the default Localein which this framework is been invoked |
AbstractBusinessDelegate |
init(DataTransferAssembler command)
Initializes this AbstractBusinessDelegate and returns a copy to the user |
ResultObject |
initAndRun(DataTransferAssembler command)
Performs initialization and runs the AbstractBusinessDelegate methods |
protected void |
initialize(DataTransferAssembler command)
Initializes this AbstractBusinessDelegate,invokes the preconfigured proxy and prepares it for further processing. |
protected DataAccessObject |
initializeNewDAO(int pageIndex)
Re initalizes this BusinessDelegate to use a new DataProxy and DataAccessObject where the processor is a MultiView Processor. |
protected ResultObject |
postProcessBusinessRules(ResultObject results1,
DataTransferAssembler command1)
Run all business rules associated with this delegate after processing in the data tier. |
protected boolean |
preProcessBusinessRules(DataTransferAssembler command)
Run all business rules associated with this delegate before processing in the backend |
protected Object |
processDAO()
Processes the call to DataAccessObject.fetchData(DataTransferObject) and returns the Object which is the result of this invocation. |
protected abstract ResultObject |
run()
Performs the activities required by this delegate, then calls the close method of AbstractDataProxy |
void |
setProcessorName(String processorName)
Sets the processorName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractBusinessDelegate()
| Method Detail |
|---|
protected void initialize(DataTransferAssembler command)
throws SpineException
This method should be overidden if the use of a DataAccessObject is not necessary.
command - The CommandComponent used by this AbstractBusinessDelegate
SpineException - Wrap errors in the message driven SpineException
protected Object processDAO()
throws SpineException
DataAccessObject.fetchData(DataTransferObject) and returns the Object which is the result of this invocation.
SpineException
public final AbstractBusinessDelegate init(DataTransferAssembler command)
throws SpineException
command - The CommandComponent used by this AbstractBusinessDelegate
SpineException
public final ResultObject initAndRun(DataTransferAssembler command)
throws SpineException
preProcessBusinessRules(DataTransferAssembler)run()postProcessBusinessRules(ResultObject, DataTransferAssembler)
command - The CommandComponent used by this AbstractBusinessDelegate
SpineException - Wrap errors in the SpineException
protected ResultObject postProcessBusinessRules(ResultObject results1,
DataTransferAssembler command1)
throws SpineException
results1 - The ResultObject obtained from the run() methodcommand1 - The CommandComponent used by this AbstractBusinessDelegate
SpineException - Wrap errors in the message driven SpineException
protected boolean preProcessBusinessRules(DataTransferAssembler command)
throws SpineException
command - The command object associated with this delegate
SpineException - Wrap errors in the message driven SpineExceptionprotected abstract ResultObject run()
protected DataTransferAssembler getCommand()
protected AbstractDataProxy getDataProxy()
protected Object findBuilder()
throws SpineException
SpineException
protected final DataAccessObject initializeNewDAO(int pageIndex)
throws SpineException
Re initalizes this BusinessDelegate to use a new DataProxy and DataAccessObject where the processor is a MultiView Processor.
This method will not work for a simpl processor instance
pageIndex - The pageIndex of the DAO instance in configuration
SpineExceptionpublic void setProcessorName(String processorName)
processorName - the processorName to setprotected Locale getUserLocale()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||