public abstract class RoleManager
extends java.lang.Object
This class is not intended for subclassing by extension writers. Retrieve
an instance of the RoleManager using
ExtensionRegistry.getRoleManager().
| Modifier and Type | Field and Description |
|---|---|
static Role |
NO_ROLE
The special predefined role that indicates no role is active.
|
| Constructor and Description |
|---|
RoleManager() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
canSwitchRoles()
Indicates whether or not the product supports switching roles.
|
abstract Role |
getActiveRole()
Gets the active role.
|
boolean |
isDefaultRoleActive()
Returns true if the default role is active.
|
void |
switchToRole(java.lang.String roleId,
Context context,
boolean force)
Invokes an action that switches to the Role identified by
the supplied role id.
|
public static final Role NO_ROLE
public abstract Role getActiveRole()
public abstract boolean canSwitchRoles()
public final boolean isDefaultRoleActive()
public void switchToRole(java.lang.String roleId,
Context context,
boolean force)
roleId - a valid role id, must not be nullcontext - the active contextforce - indicates whether to show a cofirmation prompt
before exit/restart; if true no confirmation dialog is shown
and JDeveloper exits immediatelyjava.lang.IllegalArgumentException - if the supplied role id is
does not match any available Role