|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.zphinx.spine.core.viewprocessors.ViewProcessor
public abstract class ViewProcessor
The ViewProcessor abstracts the view process from any MVC framework in use by the spine framework. It ensures that processes to be invoked in the system are delegated to it and serves as a interface to Spine for controller classes.
Copyright ©Zphinx Software Solutions
DefaultViewProcessor,
MultiViewProcessor| Field Summary | |
|---|---|
protected static String |
DATABASE_DATASOURCE
|
protected static String |
GENERAL_EXCEPTION
|
protected ArrayList |
messages
The list Object used by this object to persist messages in its result object |
protected String[] |
newClass
The new className to set |
| Constructor Summary | |
|---|---|
ViewProcessor()
Default Constructor - instantiates a messages array list |
|
| Method Summary | |
|---|---|
protected CommandComponent |
createAssembler(DataTransferObject dto,
Object obj,
DAOInput daoConstructor,
int operation)
Creates a DataTransferAssembler which will be used to ferry objects to and from the back end using the command design pattern. |
protected AbstractBusinessDelegate |
delegateFactory(CommandComponent command)
Creates and and initializes a suitable AbstractBusinessDelegate |
protected Object |
getDelegate(DataTransferAssembler command,
boolean b)
Gets the appropriate AbstractBusinessDelegate, initializes it and may call its run method if the boolean is set to true |
String |
getProcessorAliasName()
Gets the processorAliasName |
ResultObject |
processData(DataTransferObject dto,
Object obj)
Calls the used methods of this View processor and sends the DataTransferAssembler to the business layer |
ResultObject |
processData(DataTransferObject dto,
Object obj,
DAOInput daoConstructor,
int operation)
Calls the used methods of this View processor and sends the DataTransferAssembler to the business layer |
abstract int |
processNavigation(ResultObject result)
Uses the returned data to determine which navigational element to return to the user. |
protected void |
resetDelegateName()
Resets the delegate in use. |
protected void |
resetPackageName(String[] className)
Reset the delegate names used by this Action |
protected void |
setDelegateFullName(String className)
Sets the delegateFullName where the delegate resides |
void |
setProcessorAliasName(String processorAliasName)
Sets the processorAliasName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String DATABASE_DATASOURCE
protected static final String GENERAL_EXCEPTION
protected ArrayList messages
protected String[] newClass
| Constructor Detail |
|---|
public ViewProcessor()
| Method Detail |
|---|
public ResultObject processData(DataTransferObject dto,
Object obj)
dto - The DataTransferObject used to create a DataTransferAssemblerobj - The object used by the proxy, usually a dataSource if the proxy type is database
public ResultObject processData(DataTransferObject dto,
Object obj,
DAOInput daoConstructor,
int operation)
dto - The DataTransferObject used to create a DataTransferAssemblerobj - The object used to initialize this transaction, usually a dataSource when a database proxy is in usedaoConstructor - The construct object used to instantiate a daooperation - The operation to call within the dto
protected CommandComponent createAssembler(DataTransferObject dto,
Object obj,
DAOInput daoConstructor,
int operation)
Creates a DataTransferAssembler which will be used to ferry objects to and from the back end using the command design pattern.
This implementation adds a data object ( eg a dataSource ) and a dto to a new instance of a CommandComponent and adds a DAOInput object for use by the data access object invoked by the system.
client developers wishing to add an additional operation should override this method in their implementation
dto - The DataTransferObject sent tro this objectobj - The object used to initialize this transaction, usually a dataSource when a database proxy is in usedaoConstructor - The construct object used to instantiate a daooperation - The operation to call within the dto
public abstract int processNavigation(ResultObject result)
result - The result object obtained from the processData method
protected Object getDelegate(DataTransferAssembler command,
boolean b)
throws SpineException
command - The DataTransferAssembler used to configure the Delegateb - A boolean dictating if we should call the delegates run method
SpineExceptionprotected void resetPackageName(String[] className)
className - The array of simple Delegate names used by this actionprotected void resetDelegateName()
protected void setDelegateFullName(String className)
className - The delegateFullName to set.
protected AbstractBusinessDelegate delegateFactory(CommandComponent command)
throws SpineException
command - The CommandComponent used to configure the Delegate
SpineExceptionpublic String getProcessorAliasName()
public void setProcessorAliasName(String processorAliasName)
processorAliasName - the processorAliasName to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||