Package org.uberfire.client.mvp
Class ActivityBeansCache
- java.lang.Object
-
- org.uberfire.client.mvp.ActivityBeansCache
-
@ApplicationScoped public class ActivityBeansCache extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classActivityBeansCache.EditorResourceTypeNotFound
-
Field Summary
Fields Modifier and Type Field Description protected ResourceTypeManagerCacheresourceTypeManagerCache
-
Constructor Summary
Constructors Constructor Description ActivityBeansCache()ActivityBeansCache(org.jboss.errai.ioc.client.container.SyncBeanManager iocManager, javax.enterprise.event.Event<NewPerspectiveEvent> newPerspectiveEventEvent, javax.enterprise.event.Event<NewWorkbenchScreenEvent> newWorkbenchScreenEventEvent, ResourceTypeManagerCache resourceTypeManagerCache, org.uberfire.experimental.service.auth.ExperimentalActivitiesAuthorizationManager experimentalActivitiesAuthorizationManager, GWTEditorNativeRegister gwtEditorNativeRegister)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNewEditorActivity(org.jboss.errai.ioc.client.container.SyncBeanDef<Activity> syncBeanDef, int priority, List<String> resourceTypes)voidaddNewEditorActivity(org.jboss.errai.ioc.client.container.SyncBeanDef<Activity> activityBean, String priority, String resourceTypeName)Used for runtime plugins.voidaddNewPerspectiveActivity(org.jboss.errai.ioc.client.container.SyncBeanDef<Activity> activityBean)Used for runtime plugins.voidaddNewScreenActivity(org.jboss.errai.ioc.client.container.SyncBeanDef<Activity> activityBean)Used for runtime plugins.voidaddNewSplashScreenActivity(org.jboss.errai.ioc.client.container.SyncBeanDef<Activity> activityBean)List<String>getActivitiesById()org.jboss.errai.ioc.client.container.SyncBeanDef<Activity>getActivity(String id)Returns the activity with the given CDI bean name from this cache, or null if there is no such activity or the activity with the given name is not an activated bean.org.jboss.errai.ioc.client.container.SyncBeanDef<Activity>getActivity(org.uberfire.backend.vfs.Path path)Returns the activated activity with the highest priority that can handle the given file.List<org.jboss.errai.ioc.client.container.SyncBeanDef<Activity>>getPerspectiveActivities()List<SplashScreenActivity>getSplashScreens()Returns all active splash screen activities in this cache.booleanhasActivity(String id)voidnoOp()voidremoveActivity(String id)
-
-
-
Field Detail
-
resourceTypeManagerCache
protected ResourceTypeManagerCache resourceTypeManagerCache
-
-
Constructor Detail
-
ActivityBeansCache
public ActivityBeansCache()
-
ActivityBeansCache
@Inject public ActivityBeansCache(org.jboss.errai.ioc.client.container.SyncBeanManager iocManager, javax.enterprise.event.Event<NewPerspectiveEvent> newPerspectiveEventEvent, javax.enterprise.event.Event<NewWorkbenchScreenEvent> newWorkbenchScreenEventEvent, ResourceTypeManagerCache resourceTypeManagerCache, org.uberfire.experimental.service.auth.ExperimentalActivitiesAuthorizationManager experimentalActivitiesAuthorizationManager, GWTEditorNativeRegister gwtEditorNativeRegister)
-
-
Method Detail
-
removeActivity
public void removeActivity(String id)
-
addNewScreenActivity
public void addNewScreenActivity(org.jboss.errai.ioc.client.container.SyncBeanDef<Activity> activityBean)
Used for runtime plugins.
-
addNewPerspectiveActivity
public void addNewPerspectiveActivity(org.jboss.errai.ioc.client.container.SyncBeanDef<Activity> activityBean)
Used for runtime plugins.
-
addNewEditorActivity
public void addNewEditorActivity(org.jboss.errai.ioc.client.container.SyncBeanDef<Activity> activityBean, String priority, String resourceTypeName)
Used for runtime plugins.
-
addNewEditorActivity
public void addNewEditorActivity(org.jboss.errai.ioc.client.container.SyncBeanDef<Activity> syncBeanDef, int priority, List<String> resourceTypes)
-
addNewSplashScreenActivity
public void addNewSplashScreenActivity(org.jboss.errai.ioc.client.container.SyncBeanDef<Activity> activityBean)
-
hasActivity
public boolean hasActivity(String id)
-
getSplashScreens
public List<SplashScreenActivity> getSplashScreens()
Returns all active splash screen activities in this cache.
-
getActivity
public org.jboss.errai.ioc.client.container.SyncBeanDef<Activity> getActivity(String id)
Returns the activity with the given CDI bean name from this cache, or null if there is no such activity or the activity with the given name is not an activated bean.- Parameters:
id- the CDI name of the bean (seeNamed), or in the case of runtime plugins, the name the activity was registered under.
-
getActivity
public org.jboss.errai.ioc.client.container.SyncBeanDef<Activity> getActivity(org.uberfire.backend.vfs.Path path)
Returns the activated activity with the highest priority that can handle the given file. Returns null if no activated activity can handle the path.- Parameters:
path- the file to find a path-based activity for (probably aWorkbenchEditorActivity, but this cache makes no guarantees).
-
getPerspectiveActivities
public List<org.jboss.errai.ioc.client.container.SyncBeanDef<Activity>> getPerspectiveActivities()
-
noOp
public void noOp()
-
-