|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.customware.gwt.presenter.client.place.Place
public abstract class Place
A place represents a particular 'bookmark' or location inside the application. A place is stateful - it may represent a location with it's current settings, such as a particular ID value, or other unique indicators that will allow a user to track back to that location later, either via a browser bookmark, or by clicking the 'back' button.
However, there may be more than one instance of concrete Place classes, so the state should be shared between all instances of any given class. Usually this is done via a shared class, such as aPresenter instance.
| Constructor Summary | |
|---|---|
Place()
|
|
| Method Summary | |
|---|---|
void |
addHandlers(EventBus eventBus)
This method is called if the place should register itself with the event bus. |
PlaceRequest |
createRequest()
Returns a new request for this place in its current state. |
boolean |
equals(java.lang.Object o)
|
abstract java.lang.String |
getName()
Returns the unique name for this place. |
protected abstract void |
handleRequest(PlaceRequest request)
This method is called when a matching request is received. |
int |
hashCode()
|
boolean |
matchesRequest(PlaceRequest request)
This method is checked before calling handleRequest(PlaceRequest). |
protected abstract PlaceRequest |
prepareRequest(PlaceRequest request)
Returns the request with any extra values relevant to the current place initialised. |
void |
removeHandlers(EventBus eventBus)
This method is called when it should deregister any event handlers that were registered with the addHandlers(net.customware.gwt.presenter.client.EventBus) method. |
protected abstract void |
reveal()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Place()
| Method Detail |
|---|
public abstract java.lang.String getName()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectprotected abstract void handleRequest(PlaceRequest request)
request - The place request.public boolean matchesRequest(PlaceRequest request)
handleRequest(PlaceRequest).
request - The request to check.
true if the ID matches this place's name.public PlaceRequest createRequest()
prepareRequest(PlaceRequest) before returning.
PlaceRequest.protected abstract PlaceRequest prepareRequest(PlaceRequest request)
return request.with( "name", idValue ).with( "name", "Foo" );
request - The current request object.
protected abstract void reveal()
public void addHandlers(EventBus eventBus)
PlaceManager should
enforce this however, so in general, don't call this method directly.
eventBus - The event bus.public void removeHandlers(EventBus eventBus)
addHandlers(net.customware.gwt.presenter.client.EventBus) method.
eventBus - The event bus.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||