|
GWT 2.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RequestContext
The base interface for RequestFactory service endpoints.
Method Summary | ||
---|---|---|
|
create(java.lang.Class<T> clazz)
Returns a new mutable proxy that this request can carry to the server, perhaps to be persisted. |
|
|
edit(T object)
Returns a mutable version of the proxy, whose mutations will accumulate in this context. |
|
void |
fire()
Send the accumulated changes and method invocations associated with the RequestContext. |
|
void |
fire(Receiver<java.lang.Void> receiver)
For receiving errors or validation failures only. |
|
boolean |
isChanged()
Returns true if any changes have been made to proxies mutable under this context. |
Method Detail |
---|
<T extends BaseProxy> T create(java.lang.Class<T> clazz)
clazz
- a Class object of type T
BaseProxy
instance of type T<T extends BaseProxy> T edit(T object)
object
- an instance of type T
EntityProxy
or ValueProxy
instance of type Tvoid fire()
If Request.to(Receiver)
has not been called, this method will
install a default receiver that will throw a RuntimeException if there is a
server failure.
void fire(Receiver<java.lang.Void> receiver)
receiver
- a Receiver
instance
java.lang.IllegalArgumentException
- if receiver
is
null
boolean isChanged()
String name = bar.getName(); bar.setName("something else"); assertTrue(context.isChanged()); bar.setName(name); assertFalse(context.isChanged());
true
if any changes have been made
|
GWT 2.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |