Package org.uberfire.client.mvp
Class AbstractWorkbenchEditorActivity
- java.lang.Object
-
- org.uberfire.client.mvp.AbstractActivity
-
- org.uberfire.client.mvp.AbstractWorkbenchActivity
-
- org.uberfire.client.mvp.AbstractWorkbenchEditorActivity
-
- All Implemented Interfaces:
Activity,ContextSensitiveActivity,WorkbenchActivity,WorkbenchEditorActivity,org.uberfire.security.authz.RuntimeFeatureResource,org.uberfire.security.authz.RuntimeResource,org.uberfire.security.Resource
public abstract class AbstractWorkbenchEditorActivity extends AbstractWorkbenchActivity implements WorkbenchEditorActivity
Implementation of behaviour common to all workbench editor activities. Concrete implementations are typically not written by hand; rather, they are generated from classes annotated withWorkbenchEditor.
-
-
Field Summary
Fields Modifier and Type Field Description protected LockManagerlockManagerprotected javax.enterprise.inject.Instance<LockManager>lockManagerProviderprotected org.uberfire.backend.vfs.ObservablePathpath-
Fields inherited from class org.uberfire.client.mvp.AbstractActivity
open, place, placeManager
-
-
Constructor Summary
Constructors Constructor Description AbstractWorkbenchEditorActivity(PlaceManager placeManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.uberfire.client.annotations.WorkbenchEditor.LockingStrategygetLockingStrategy()Returns the locking strategy for this editor activity, defaulting to pessimistic.booleanisDirty()voidonClose()Tracks open/closed lifecycle.voidonFocus()Invoked by the UberFire framework when this activity is the current activity in the current panel.voidonOpen()Tracks open/closed lifecycle.voidonSave()voidonStartup(org.uberfire.backend.vfs.ObservablePath path, org.uberfire.mvp.PlaceRequest place)voidonStartup(org.uberfire.mvp.PlaceRequest place)Overrides the default implementation by redirecting calls that arePathPlaceRequestinstances toonStartup(ObservablePath, PlaceRequest).protected voidsetupDefaultPessimisticLockManager()-
Methods inherited from class org.uberfire.client.mvp.AbstractWorkbenchActivity
contextId, getDefaultPosition, getMenus, getOwningPlace, getTitle, getTitleDecoration, getToolBar, getWidget, onLostFocus, onMayClose
-
Methods inherited from class org.uberfire.client.mvp.AbstractActivity
getPlace, onShutdown, 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
getName, getPlace, isDefault, isDynamic, onShutdown
-
Methods inherited from interface org.uberfire.security.Resource
getDependencies, getIdentifier, isType
-
Methods inherited from interface org.uberfire.client.mvp.WorkbenchActivity
contextId, getDefaultPosition, getMenus, getOwningPlace, getTitle, getTitleDecoration, getTitleDecorationElement, getToolBar, getWidget, getWidgetElement, onLostFocus, onMayClose, preferredHeight, preferredWidth
-
Methods inherited from interface org.uberfire.client.mvp.WorkbenchEditorActivity
getResourceType
-
-
-
-
Field Detail
-
lockManagerProvider
@Inject protected javax.enterprise.inject.Instance<LockManager> lockManagerProvider
-
lockManager
protected LockManager lockManager
-
path
protected org.uberfire.backend.vfs.ObservablePath path
-
-
Constructor Detail
-
AbstractWorkbenchEditorActivity
public AbstractWorkbenchEditorActivity(PlaceManager placeManager)
-
-
Method Detail
-
onStartup
public final void onStartup(org.uberfire.mvp.PlaceRequest place)
Overrides the default implementation by redirecting calls that arePathPlaceRequestinstances toonStartup(ObservablePath, PlaceRequest). Non-path place requests are handed up to the super impl.- Specified by:
onStartupin interfaceActivity- Overrides:
onStartupin classAbstractActivity- Parameters:
place- The place that resolved to this activity
-
onStartup
public void onStartup(org.uberfire.backend.vfs.ObservablePath path, org.uberfire.mvp.PlaceRequest place)- Specified by:
onStartupin interfaceWorkbenchEditorActivity
-
setupDefaultPessimisticLockManager
protected void setupDefaultPessimisticLockManager()
-
onOpen
public void onOpen()
Description copied from class:AbstractActivityTracks open/closed lifecycle. Subclasses should always call super.onOpen() in methods that override this one.- Specified by:
onOpenin interfaceActivity- Overrides:
onOpenin classAbstractActivity
-
onSave
public void onSave()
- Specified by:
onSavein interfaceWorkbenchEditorActivity
-
isDirty
public boolean isDirty()
- Specified by:
isDirtyin interfaceWorkbenchEditorActivity
-
onClose
public void onClose()
Description copied from class:AbstractActivityTracks open/closed lifecycle. Subclasses should always call super.onClose() in methods that override this one.- Specified by:
onClosein interfaceActivity- Overrides:
onClosein classAbstractActivity
-
onFocus
public void onFocus()
Description copied from interface:WorkbenchActivityInvoked by the UberFire framework when this activity is the current activity in the current panel. Activities may choose to make their UI more prominent, or begin refreshing their data more aggressively when they are focused.- Specified by:
onFocusin interfaceWorkbenchActivity- Overrides:
onFocusin classAbstractWorkbenchActivity- See Also:
WorkbenchActivity.onLostFocus(),PanelManager.onPartFocus(org.uberfire.workbench.model.PartDefinition)
-
getLockingStrategy
protected org.uberfire.client.annotations.WorkbenchEditor.LockingStrategy getLockingStrategy()
Returns the locking strategy for this editor activity, defaulting to pessimistic. This method is overridden for generated activities returning the strategy configured atWorkbenchEditor.
-
-