|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.scaffold.util.ProcessResultBase
public class ProcessResultBase
Concrete implementation of ProcessResult
that can be
used "as-is" to manage a response from the business tier.
Field Summary | |
---|---|
protected boolean |
aggregate
Field to store the aggregate state [false]. |
protected Scroller |
scroller
Our scroller object for paging through lists. |
Constructor Summary | |
---|---|
ProcessResultBase()
Default constructor. |
|
ProcessResultBase(Object data)
Convenience constructor to set result object. |
|
ProcessResultBase(Object data,
boolean singleForm)
Convenience constructor to set result object and singleForm status. |
|
ProcessResultBase(String dispatch)
Convenience constructor to set forwarding advice. |
Method Summary | |
---|---|
boolean |
addMessage(Object message)
Add a message to the list. |
Object |
getData()
Return the data object. |
String |
getDispatch()
The dispatch property can be used to re-route control to an non-default location, either as a system path or via a logical name (e.g ActionForward). |
List |
getMessages()
Return the messages list (an ArrayList). |
String |
getName()
Return the attribute name for the result object. |
String |
getScope()
Return the scope under which to store this result object. |
Scroller |
getScroller()
|
boolean |
isAggregate()
Return whether the result of this ProcessResult is a collection of contains other ProcessResult objects to be handled individually. |
boolean |
isData()
Return whether data object has been set. |
boolean |
isDispatch()
Return whether dispatch advice has been set. |
boolean |
isDispatchPath()
Return whether dispatch advice is suppose to be a path or a token (e.g. |
boolean |
isExposed()
Return the exposed state. |
boolean |
isMessages()
Return whether there are any messages queued. |
boolean |
isSingleForm()
Return the single-form state: list of 0 or more records=FALSE, exactly one record=TRUE. |
void |
setAggregate(boolean aggregate)
Assign a new container state. |
void |
setData(Object data)
Assign a new data object. |
void |
setDispatch(String dispatch)
Set the dispatch advice. |
void |
setDispatchPath(boolean dispatchPath)
Set the dispatchPath state. |
void |
setExposed(boolean exposed)
Indicates whether the result should be exposed to the rest of the application through a context. |
void |
setMessages(List messages)
Set a new list of messages. |
void |
setName(String name)
Set the attribute name for this result object. |
void |
setScope(String scope)
Set the scope under which to store this result object. |
void |
setScroller(Scroller scroller)
|
void |
setSingleForm(boolean singleForm)
Set the single-form state: list of 0 or more records=FALSE, exactly one record=TRUE. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean aggregate
protected Scroller scroller
Constructor Detail |
---|
public ProcessResultBase()
public ProcessResultBase(Object data)
data
- The default data objectpublic ProcessResultBase(Object data, boolean singleForm)
data
- The default data objectpublic ProcessResultBase(String dispatch)
dispatch
- The default dispatch adviceMethod Detail |
---|
public String getName()
ProcessResult
Typically, this will be set by the caller but is provided in case a special name must be used or a way is needed to distingish between result objects.
getName
in interface ProcessResult
public void setName(String name)
setName
in interface ProcessResult
name
- The new namepublic String getScope()
getScope
in interface ProcessResult
public void setScope(String scope)
setScope
in interface ProcessResult
scope
- The new scopepublic boolean isSingleForm()
isSingleForm
in interface ProcessResult
public void setSingleForm(boolean singleForm)
setSingleForm
in interface ProcessResult
Set
- to true for single form.public boolean isExposed()
isExposed
in interface ProcessResult
public void setExposed(boolean exposed)
setExposed
in interface ProcessResult
multiple
- The new exposedpublic Object getData()
getData
in interface ProcessResult
public void setData(Object data)
setData
in interface ProcessResult
data
- The new data objectpublic boolean isData()
isData
in interface ProcessResult
public boolean isAggregate()
isAggregate
in interface ProcessResult
public void setAggregate(boolean aggregate)
setAggregate
in interface ProcessResult
aggregate
- Set to true for aggregate resultpublic boolean isMessages()
isMessages
in interface ProcessResult
public boolean addMessage(Object message)
addMessage
in interface ProcessResult
public List getMessages()
getMessages
in interface ProcessResult
public void setMessages(List messages)
The
- new list of messagespublic String getDispatch()
getDispatch
in interface ProcessResult
setDispatchPath()
public void setDispatch(String dispatch)
setDispatch
in interface ProcessResult
dispatch
- The new dispatch advice.public boolean isDispatch()
isDispatch
in interface ProcessResult
public boolean isDispatchPath()
isDispatchPath
in interface ProcessResult
public void setDispatchPath(boolean dispatchPath)
setDispatchPath
in interface ProcessResult
Boolean
- Set to true if dispatch is a URIpublic void setScroller(Scroller scroller)
public Scroller getScroller()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |