Package org.uberfire.client.mvp
Class AbstractWorkbenchPerspectiveActivity
- java.lang.Object
-
- org.uberfire.client.mvp.AbstractActivity
-
- org.uberfire.client.mvp.AbstractWorkbenchPerspectiveActivity
-
- All Implemented Interfaces:
Activity,ContextSensitiveActivity,PerspectiveActivity,org.uberfire.security.authz.RuntimeFeatureResource,org.uberfire.security.authz.RuntimeResource,org.uberfire.security.Resource
- Direct Known Subclasses:
StandaloneEditorPerspective
public abstract class AbstractWorkbenchPerspectiveActivity extends AbstractActivity implements PerspectiveActivity
Implementation of behaviour common to all perspective activities. Concrete implementations are typically not written by hand; rather, they are generated from classes annotated withWorkbenchPerspective.
-
-
Field Summary
-
Fields inherited from class org.uberfire.client.mvp.AbstractActivity
open, place, placeManager
-
-
Constructor Summary
Constructors Constructor Description AbstractWorkbenchPerspectiveActivity(PlaceManager placeManager)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract org.uberfire.workbench.model.PerspectiveDefinitiongetDefaultPerspectiveLayout()Returns a new copy of the layout (panels and their parts) that should be used if no persisted state is available.voidgetMenus(Consumer<org.uberfire.workbench.model.menu.Menus> menusConsumer)Returns a new copy of the menus that should be used with this perspective.org.uberfire.security.ResourceTypegetResourceType()org.uberfire.workbench.model.toolbar.ToolBargetToolBar()booleanisDefault()Returns true if this perspective should be displayed automatically when the application starts.booleanisTransient()Tells whether this perspective's state (layout and size of panels, parts contained in each panel) should be saved per user or not.-
Methods inherited from class org.uberfire.client.mvp.AbstractActivity
getPlace, onClose, onOpen, onShutdown, onStartup, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.uberfire.client.mvp.Activity
getPlace, isDynamic, onClose, onOpen, onShutdown, onStartup
-
Methods inherited from interface org.uberfire.client.mvp.PerspectiveActivity
getName
-
-
-
-
Constructor Detail
-
AbstractWorkbenchPerspectiveActivity
public AbstractWorkbenchPerspectiveActivity(PlaceManager placeManager)
-
-
Method Detail
-
getResourceType
public org.uberfire.security.ResourceType getResourceType()
- Specified by:
getResourceTypein interfaceorg.uberfire.security.Resource
-
getDefaultPerspectiveLayout
public abstract org.uberfire.workbench.model.PerspectiveDefinition getDefaultPerspectiveLayout()
Description copied from interface:PerspectiveActivityReturns a new copy of the layout (panels and their parts) that should be used if no persisted state is available. Each time this method is called, it must produce a new PerspectiveDefinition. This rule applies whether or not the perspective is transient.- Specified by:
getDefaultPerspectiveLayoutin interfacePerspectiveActivity- Returns:
- the perspective layout to use when a previously saved one is not available.
- See Also:
PerspectiveActivity.isTransient(),WorkbenchServicesProxy.loadPerspective(String, org.uberfire.mvp.ParameterizedCommand)
-
isDefault
public boolean isDefault()
Description copied from interface:PerspectiveActivityReturns true if this perspective should be displayed automatically when the application starts. Each application needs exactly one default perspective.- Specified by:
isDefaultin interfaceActivity- Specified by:
isDefaultin interfacePerspectiveActivity- Returns:
- true if this is the default perspective; false if it is not.
-
isTransient
public boolean isTransient()
Description copied from interface:PerspectiveActivityTells whether this perspective's state (layout and size of panels, parts contained in each panel) should be saved per user or not.- Specified by:
isTransientin interfacePerspectiveActivity- Returns:
- false if this perspective's state should be saved and retrieved from the server; true if this perspective should always start up in its default layout.
- See Also:
WorkbenchServicesProxy.loadPerspective(String, org.uberfire.mvp.ParameterizedCommand)
-
getMenus
public void getMenus(Consumer<org.uberfire.workbench.model.menu.Menus> menusConsumer)
Description copied from interface:PerspectiveActivityReturns a new copy of the menus that should be used with this perspective. Each time this method is called, it must produce a new set of menus.- Specified by:
getMenusin interfacePerspectiveActivity
-
getToolBar
public org.uberfire.workbench.model.toolbar.ToolBar getToolBar()
- Specified by:
getToolBarin interfacePerspectiveActivity
-
-