|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.scaffold.util.BizResponseImpl
public class BizResponseImpl
Concrete implementation of a business response
[org,apache.commons.util.BizResponse
]
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 | |
---|---|
BizResponseImpl()
Default constructor. |
|
BizResponseImpl(Object data)
Convenience constructor to set result object. |
|
BizResponseImpl(Object data,
boolean singleForm)
Convenience constructor to set result object and singleForm status. |
|
BizResponseImpl(String dispatch)
Convenience constructor to set forwarding advice. |
Method Summary | |
---|---|
void |
addMessage(Message message)
Add a message to the list. |
void |
addMessage(Message message,
String property)
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). |
Messages |
getMessages()
Return the messages list. |
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 true path or a logical name (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)
Field to store dispatch property. |
void |
setDispatchPath(boolean dispatchPath)
Indicates whether dispatch advice (if any) is suppose to be a path or a logical name (e.g. |
void |
setExposed(boolean exposed)
Indicates whether the result should be exposed to the rest of the application through a context. |
void |
setMessages(Messages 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 BizResponseImpl()
public BizResponseImpl(Object data)
data
- The default data objectpublic BizResponseImpl(Object data, boolean singleForm)
data
- The default data objectpublic BizResponseImpl(String dispatch)
dispatch
- The default dispatch adviceMethod Detail |
---|
public String getName()
BizResponse
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 BizResponse
public void setName(String name)
BizResponse
setName
in interface BizResponse
name
- The new namepublic String getScope()
BizResponse
getScope
in interface BizResponse
public void setScope(String scope)
BizResponse
setScope
in interface BizResponse
scope
- The new scopepublic boolean isSingleForm()
BizResponse
isSingleForm
in interface BizResponse
public void setSingleForm(boolean singleForm)
BizResponse
setSingleForm
in interface BizResponse
public boolean isExposed()
BizResponse
isExposed
in interface BizResponse
public void setExposed(boolean exposed)
BizResponse
setExposed
in interface BizResponse
public Object getData()
BizResponse
getData
in interface BizResponse
public void setData(Object data)
BizResponse
setData
in interface BizResponse
data
- The new data objectpublic boolean isData()
BizResponse
isData
in interface BizResponse
public boolean isAggregate()
BizResponse
isAggregate
in interface BizResponse
public void setAggregate(boolean aggregate)
BizResponse
setAggregate
in interface BizResponse
aggregate
- Set to true for aggregate resultpublic boolean isMessages()
BizResponse
isMessages
in interface BizResponse
public void addMessage(Message message, String property)
BizResponse
addMessage
in interface BizResponse
public void addMessage(Message message)
BizResponse
addMessage
in interface BizResponse
public Messages getMessages()
BizResponse
getMessages
in interface BizResponse
public void setMessages(Messages messages)
public String getDispatch()
BizResponse
getDispatch
in interface BizResponse
setDispatchPath()
public void setDispatch(String dispatch)
BizResponse
setDispatch
in interface BizResponse
public boolean isDispatch()
BizResponse
isDispatch
in interface BizResponse
public boolean isDispatchPath()
BizResponse
isDispatchPath
in interface BizResponse
public void setDispatchPath(boolean dispatchPath)
BizResponse
setDispatchPath
in interface BizResponse
dispatchPath
- The new dispatch advicepublic void setScroller(Scroller scroller)
public Scroller getScroller()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |