@SharedSingleton public class PlaceManagerImpl extends Object implements PlaceManager
Modifier and Type | Class and Description |
---|---|
static interface |
PlaceManagerImpl.AppFormerActivityLoader |
Constructor and Description |
---|
PlaceManagerImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
canCloseAllPlaces() |
boolean |
canClosePlace(PlaceRequest place) |
void |
closeAllPlaces() |
boolean |
closeAllPlacesOrNothing() |
void |
closePlace(PlaceRequest placeToClose) |
void |
closePlace(PlaceRequest placeToClose,
Command doAfterClose) |
void |
closePlace(String id) |
void |
forceCloseAllPlaces() |
void |
forceClosePlace(PlaceRequest placeToClose) |
void |
forceClosePlace(String id) |
Collection<PlaceRequest> |
getActivePlaceRequests()
Returns all the PlaceRequests that map to activies that are currently in the open state and accessible
somewhere in the current perspective.
|
Collection<PathPlaceRequest> |
getActivePlaceRequestsWithPath()
Returns all the PathPlaceRequests that map to activies that are currently in the open state and accessible
somewhere in the current perspective.
|
Collection<SplashScreenActivity> |
getActiveSplashScreens() |
Collection<PathPlaceRequest> |
getActivitiesForResourceType(ResourceTypeDefinition type)
Finds the currently open PlaceRequests for Activities that handle the given ResourceTypeDefinition.
|
Activity |
getActivity(PlaceRequest place)
Finds the currently open activity that handles the given PlaceRequest by ID.
|
List<Command> |
getOnCloseCallbacks(PlaceRequest place) |
List<Command> |
getOnOpenCallbacks(PlaceRequest place) |
PlaceStatus |
getStatus(PlaceRequest place) |
PlaceStatus |
getStatus(String id) |
List<PlaceRequest> |
getUncloseablePlaces() |
void |
goTo(PartDefinition part,
PanelDefinition panel) |
void |
goTo(Path path) |
void |
goTo(Path path,
PanelDefinition panel) |
void |
goTo(Path path,
PlaceRequest placeRequest) |
void |
goTo(Path path,
PlaceRequest placeRequest,
PanelDefinition panel) |
void |
goTo(PlaceRequest place) |
void |
goTo(PlaceRequest place,
com.google.gwt.user.client.ui.HasWidgets addTo)
Locates the Activity associated with the given place, and if that activity is not already part of the workbench,
starts it and adds its view to the given widget container.
|
void |
goTo(PlaceRequest place,
org.jboss.errai.common.client.dom.HTMLElement addTo) |
void |
goTo(PlaceRequest place,
elemental2.dom.HTMLElement addTo) |
void |
goTo(PlaceRequest place,
PanelDefinition panel) |
void |
goTo(String identifier) |
void |
goTo(String id,
org.jboss.errai.common.client.dom.HTMLElement addTo) |
void |
goTo(String identifier,
PanelDefinition panel) |
void |
initPlaceHistoryHandler() |
void |
registerOnCloseCallback(PlaceRequest place,
Command callback) |
void |
registerOnOpenCallback(PlaceRequest place,
Command callback) |
void |
registerPerspectiveCloseChain(String perspectiveIdentifier,
BiParameterizedCommand<Command,PlaceRequest> closeChain)
Registers a callback interceptor that uses a chain approach to execute code before a PlaceRequest is closed,
if the perspective passed as a parameter is currently opened.
|
void |
tryClosePlace(PlaceRequest placeToClose,
Command onAfterClose) |
void |
unregisterOnCloseCallbacks(PlaceRequest place) |
void |
unregisterOnOpenCallbacks(PlaceRequest place) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeOnCloseCallbacks, executeOnOpenCallbacks
@PostConstruct public void initPlaceHistoryHandler()
public void goTo(String identifier, PanelDefinition panel)
goTo
in interface PlaceManager
public void goTo(String identifier)
goTo
in interface PlaceManager
public void goTo(PlaceRequest place)
goTo
in interface PlaceManager
public void goTo(Path path, PanelDefinition panel)
goTo
in interface PlaceManager
public void goTo(Path path)
goTo
in interface PlaceManager
public void goTo(Path path, PlaceRequest placeRequest, PanelDefinition panel)
goTo
in interface PlaceManager
public void goTo(Path path, PlaceRequest placeRequest)
goTo
in interface PlaceManager
public void goTo(PlaceRequest place, PanelDefinition panel)
goTo
in interface PlaceManager
public void goTo(PlaceRequest place, com.google.gwt.user.client.ui.HasWidgets addTo)
PlaceManager
The activity will be properly shut down in any of the following scenarios:
PlaceManager.closePlace(PlaceRequest)
,
PlaceManager.closePlace(String)
, or PlaceManager.closeAllPlaces()
goTo
in interface PlaceManager
addTo
- The container to add the widget's view to. Its corresponding DOM element must have a CSS
position setting of relative or absolute and an explicit size set. This can
be accomplished through direct use of CSS, or through the
Layouts.setToFillParent(com.google.gwt.user.client.ui.Widget)
call.public void goTo(String id, org.jboss.errai.common.client.dom.HTMLElement addTo)
goTo
in interface PlaceManager
public void goTo(PlaceRequest place, org.jboss.errai.common.client.dom.HTMLElement addTo)
goTo
in interface PlaceManager
public void goTo(PlaceRequest place, elemental2.dom.HTMLElement addTo)
goTo
in interface PlaceManager
public void goTo(PartDefinition part, PanelDefinition panel)
goTo
in interface PlaceManager
public Activity getActivity(PlaceRequest place)
PlaceManager
ActivityManagerImpl#resolveExistingParts(PlaceRequest)
for a variant that does.
(TODO: should this method care about paths? if not, should the other method be added to the interface?)getActivity
in interface PlaceManager
place
- the PlaceRequest whose activity to search forpublic PlaceStatus getStatus(String id)
getStatus
in interface PlaceManager
public PlaceStatus getStatus(PlaceRequest place)
getStatus
in interface PlaceManager
@JsMethod public void closePlace(String id)
closePlace
in interface PlaceManager
@JsMethod public void closePlace(PlaceRequest placeToClose)
closePlace
in interface PlaceManager
public void closePlace(PlaceRequest placeToClose, Command doAfterClose)
closePlace
in interface PlaceManager
public void tryClosePlace(PlaceRequest placeToClose, Command onAfterClose)
tryClosePlace
in interface PlaceManager
public void forceClosePlace(String id)
forceClosePlace
in interface PlaceManager
public void forceClosePlace(PlaceRequest placeToClose)
forceClosePlace
in interface PlaceManager
public void closeAllPlaces()
closeAllPlaces
in interface PlaceManager
public void forceCloseAllPlaces()
forceCloseAllPlaces
in interface PlaceManager
public boolean closeAllPlacesOrNothing()
closeAllPlacesOrNothing
in interface PlaceManager
public List<PlaceRequest> getUncloseablePlaces()
getUncloseablePlaces
in interface PlaceManager
public void registerOnOpenCallback(PlaceRequest place, Command callback)
registerOnOpenCallback
in interface PlaceManager
public void unregisterOnOpenCallbacks(PlaceRequest place)
unregisterOnOpenCallbacks
in interface PlaceManager
public void registerOnCloseCallback(PlaceRequest place, Command callback)
registerOnCloseCallback
in interface PlaceManager
public void unregisterOnCloseCallbacks(PlaceRequest place)
unregisterOnCloseCallbacks
in interface PlaceManager
public void registerPerspectiveCloseChain(String perspectiveIdentifier, BiParameterizedCommand<Command,PlaceRequest> closeChain)
PlaceManager
registerPerspectiveCloseChain
in interface PlaceManager
perspectiveIdentifier
- Perspective identifier for which the close chain must be called when it is being closed.closeChain
- Callback to be called when a PlaceRequest is being closed. The callback command must invoke the chain
to proceed with the closing operation.public Collection<SplashScreenActivity> getActiveSplashScreens()
getActiveSplashScreens
in interface PlaceManager
public Collection<PathPlaceRequest> getActivitiesForResourceType(ResourceTypeDefinition type)
PlaceManager
getActivitiesForResourceType
in interface PlaceManager
type
- the ResourceTypeDefinition whose activity to search forpublic Collection<PlaceRequest> getActivePlaceRequests()
public Collection<PathPlaceRequest> getActivePlaceRequestsWithPath()
public boolean canClosePlace(PlaceRequest place)
canClosePlace
in interface PlaceManager
public boolean canCloseAllPlaces()
canCloseAllPlaces
in interface PlaceManager
public List<Command> getOnOpenCallbacks(PlaceRequest place)
getOnOpenCallbacks
in interface PlaceManager
public List<Command> getOnCloseCallbacks(PlaceRequest place)
getOnCloseCallbacks
in interface PlaceManager
Copyright © 2012–2019 JBoss by Red Hat. All rights reserved.