public interface PerspectiveManager
PlaceManager
, and it accomplishes
these actions by delegating to the PanelManager
and WorkbenchServicesProxy
.Modifier and Type | Method and Description |
---|---|
PerspectiveActivity |
getCurrentPerspective()
Returns the current perspective's
PerspectiveActivity . |
PlaceRequest |
getCurrentPerspectivePlaceRequest() |
String |
getDefaultPerspectiveIdentifier()
Fetches the current default perspective identifier.
|
PerspectiveDefinition |
getLivePerspectiveDefinition()
Returns a description of the current perspective which reflects the current visible state of the user interface.
|
void |
loadPerspectiveStates(ParameterizedCommand<Set<PerspectiveDefinition>> doWhenFinished)
Retrieves the definitions of all the persisted perspectives.
|
void |
removePerspectiveState(String perspectiveId,
Command doWhenFinished)
This method removes any persisted definition for the given perspective.
|
void |
removePerspectiveStates(Command doWhenFinished)
This method removes all persisted Perspective definitions.
|
void |
savePerspectiveState(Command doWhenFinished)
Saves the current live perspective definition to the server.
|
void |
switchToPerspective(PlaceRequest placeRequest,
PerspectiveActivity perspective,
ParameterizedCommand<PerspectiveDefinition> doWhenFinished)
This method should only be invoked by PlaceManager.
|
PerspectiveActivity getCurrentPerspective()
PerspectiveActivity
. When the app first starts, this will be null. Once
the workbench has bootstrapped, the return value will not be null again.PerspectiveDefinition getLivePerspectiveDefinition()
void savePerspectiveState(Command doWhenFinished)
PerspectiveActivity.getDefaultPerspectiveLayout()
when switching to a new
perspective. This method has no effect if the current perspective is transient.doWhenFinished
- action to execute after the save is complete (or immediately in the case of a transient perspective).
Must not be null. To do nothing, use Commands.DO_NOTHING
.WorkbenchPerspective.isTransient()
,
PerspectiveActivity.isTransient()
void switchToPerspective(PlaceRequest placeRequest, PerspectiveActivity perspective, ParameterizedCommand<PerspectiveDefinition> doWhenFinished)
PlaceManager.goTo(org.uberfire.mvp.PlaceRequest)
.
Closes all current panels in the PanelManager (they must have already had their parts removed), then builds up
the new panel arrangement based on the PerspectiveDefinition
associated with the given perspective
activity. If the given perspective is transient, its default perspective definition will always be used.
Otherwise, the PerspectiveManager will first attempt to retrieve the current user's saved PerspectiveDefinition
from the server, falling back on the default if none is found.placeRequest
- the placeRequest that originated the perspective to switch to. Must not be null.perspective
- the perspective to switch to. Must not be null.doWhenFinished
- The command to execute once the new perspective's panels have been created. Must not be null.
When the callback is invoked, the panels will be set up in their correct positions, but no parts will
have been added.void loadPerspectiveStates(ParameterizedCommand<Set<PerspectiveDefinition>> doWhenFinished)
doWhenFinished
- The command to execute once the perspective definitions are retrieved.void removePerspectiveState(String perspectiveId, Command doWhenFinished)
doWhenFinished
- The command to execute once the perspective state have been removed. Must not be null.void removePerspectiveStates(Command doWhenFinished)
doWhenFinished
- The command to execute once the perspective states have been removed. Must not be null.String getDefaultPerspectiveIdentifier()
PlaceRequest getCurrentPerspectivePlaceRequest()
Copyright © 2012–2019 JBoss by Red Hat. All rights reserved.