|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.errai.ui.nav.client.local.spi.NavigationGraph
public abstract class NavigationGraph
The NavigationGraph is responsible for creating or retrieving instances of Page and PageTransition objects. It is
also the central repository for structural information about the interpage navigation in the app (this information is
defined in a decentralized way, by classes that implement PageNode
and contain injected TransitionTo
fields.
The concrete implementation of this class is usually generated at compile-time by scanning for page classes. It is
expected to fill in the pagesByName
map in its constructor.
Nested Class Summary | |
---|---|
protected static class |
NavigationGraph.PageNodeCreationalCallback<W extends com.google.gwt.user.client.ui.IsWidget>
|
Field Summary | |
---|---|
protected AsyncBeanManager |
bm
|
protected Map<String,PageNode<? extends com.google.gwt.user.client.ui.IsWidget>> |
pagesByName
Maps page names to the classes that implement them. |
protected com.google.common.collect.Multimap<Class<? extends PageRole>,PageNode<? extends com.google.gwt.user.client.ui.IsWidget>> |
pagesByRole
|
Constructor Summary | |
---|---|
NavigationGraph()
|
Method Summary | ||
---|---|---|
|
getPage(Class<W> type)
Returns an instance of the given page type. |
|
|
getPage(String name)
Returns an instance of the given page type. |
|
PageNode |
getPageByRole(Class<? extends UniquePageRole> role)
|
|
Collection<PageNode<? extends com.google.gwt.user.client.ui.IsWidget>> |
getPagesByRole(Class<? extends PageRole> role)
Returns all pages that have the specified role. |
|
boolean |
isEmpty()
Returns true if and only if there are no pages in this nagivation graph. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final AsyncBeanManager bm
protected final Map<String,PageNode<? extends com.google.gwt.user.client.ui.IsWidget>> pagesByName
protected final com.google.common.collect.Multimap<Class<? extends PageRole>,PageNode<? extends com.google.gwt.user.client.ui.IsWidget>> pagesByRole
Constructor Detail |
---|
public NavigationGraph()
Method Detail |
---|
public <W extends com.google.gwt.user.client.ui.IsWidget> PageNode<W> getPage(String name)
name
- The page name, as defined by the implementation of page.
public <W extends com.google.gwt.user.client.ui.IsWidget> PageNode<W> getPage(Class<W> type)
type
- The Class object for the bean that implements the page.
public Collection<PageNode<? extends com.google.gwt.user.client.ui.IsWidget>> getPagesByRole(Class<? extends PageRole> role)
getPage(Class)
PageRole
role
- the role used to lookup the pages
public PageNode getPageByRole(Class<? extends UniquePageRole> role)
public boolean isEmpty()
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |