public final class RescatContextRegistry
extends java.lang.Object
RescatContext.
The named instances may correspond to specific workspaces or the resource
palette.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PRIMARY_PALETTE_CONTEXT_NAME |
| Constructor and Description |
|---|
RescatContextRegistry()
Private constructor to prevent instantiation of this class
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRegistryListener(RegistryListener listener) |
RescatContext |
getActiveWorkspaceContext()
Return the RescatContext instance associated with the current active
workspace.
|
java.util.Collection<RescatContext> |
getAllResourcePaletteContexts()
Returns the
RescatContext associated with the Resource Palette. |
java.lang.String |
getContextName(RescatContext rescatContext)
Deprecated.
|
static RescatContextRegistry |
getInstance()
Returns the singleton instance of RescatContextRegistry.
|
java.lang.String |
getRegistryKey(Workspace ws)
Constructs a registry key from the workspace object.
|
RescatContext |
getRescatContext(Context ideContext)
Return the
RescatContext instance associated with the current IDE
context or null if a matching RescatContext cannot be found. |
RescatContext |
getRescatContext(java.lang.String id)
Returns the RescatContext instance associated with the specified id
|
RescatContext |
getResourcePaletteContext()
Returns the
RescatContext associated with the Resource Palette. |
RescatContext |
getWorkspaceContext(Workspace ws)
Returns the
RescatContext associated with the specified workspace |
boolean |
isResourcePaletteContext(RescatContext ctx) |
boolean |
isResourcePaletteView(Context ideContext)
Deprecated.
|
void |
registerContext(RescatContext rescatContext)
Register a RescatContext instance with the registry.
|
void |
removeRegistryListener(RegistryListener listener) |
RescatContext |
unregisterContext(java.lang.String id)
Remove a RescatContext instance from the registry.
|
public static final java.lang.String PRIMARY_PALETTE_CONTEXT_NAME
public RescatContextRegistry()
public static RescatContextRegistry getInstance()
public void registerContext(RescatContext rescatContext)
rescatContext - instance to be registeredpublic RescatContext unregisterContext(java.lang.String id)
id - id of the instance to be removed from the registry.public java.lang.String getRegistryKey(Workspace ws)
oracle.adf.share.dt.AppConnContext
to generate a registry key for a workspace.@Deprecated public java.lang.String getContextName(RescatContext rescatContext)
public RescatContext getRescatContext(java.lang.String id)
id - id of the RescatContext instancepublic RescatContext getRescatContext(Context ideContext)
RescatContext instance associated with the current IDE
context or null if a matching RescatContext cannot be found.
If the current Context is associated with a resource
palette View, returns the RescatContext
for the Resource Palette.
if the Context identifies a workspace, returns the
RescatContext for the workspace .
Otherwise return the RescatContext for the current active workspace.
This method assumes that RescatContext instances are named
after the owning workspace.ideContext - the ContextView,
RescatContext@Deprecated public boolean isResourcePaletteView(Context ideContext)
ideContext - the Context to inspectViewpublic RescatContext getResourcePaletteContext()
RescatContext associated with the Resource Palette.RescatContext associated with the Resource Palette.RescatContextpublic java.util.Collection<RescatContext> getAllResourcePaletteContexts()
RescatContext associated with the Resource Palette.RescatContext associated with the Resource Palette.RescatContextpublic RescatContext getWorkspaceContext(Workspace ws)
RescatContext associated with the specified workspaceRescatContext associated with the specified workspace
or null if the workspace does not have a registered RescatContextRescatContextpublic RescatContext getActiveWorkspaceContext()
RescatContext instances are named after the owning
workspace.View,
RescatContextpublic boolean isResourcePaletteContext(RescatContext ctx)
public void addRegistryListener(RegistryListener listener)
public void removeRegistryListener(RegistryListener listener)