Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.security.spi
Interface DeployableRoleProvider

All Superinterfaces:
  RoleProvider, SecurityProvider

Deprecated. 9.0.0.0 Replaced by `DeployableRoleProviderV2`

    public interface DeployableRoleProvider

extends RoleProvider

A Role Mapping provider that supports deploying roles on behalf of Web application and EJB deployment needs to implement this interface.

When a Web application or EJB is deployed, roles need to be created. Similarly, when the Web application or EJB is redeployed or hot deployed, the roles need to be updated. And, when the Web application or EJB is undeployed, the roles should be removed. This work needs to be done by a Role Mapping provider.

Not all Role Mapping providers need to support this interface. However, in a realm, at least one of the Role Mapping providers must support this interface. Otherwise, it is impossible to deploy Web applications and EJBs. To help with this, there are two MBeans associated with Role Mapping providers: one for providers who support deployment and one for those that do not support deployment. The MBean for deployment has an attribute that indicates whether this provider should be used for deployment. This way, when the realm is configured, it is possible to detect illegal configurations (for example, none of the Role Mapping providers support Web application/EJB deployment).

Method Summary
`void` | `deployRole(Resource resource, String roleName, String[] userAndGroupNames)` Deprecated. Deploys a role (that is, creates a role on behalf of a deployed Web application/EJB).
`void` | `undeployRole(Resource resource, String roleName)` Deprecated. Undeploys a role (that is, deletes a role on behalf of an undeployed Web application/EJB).

Methods inherited from interface weblogic.security.spi.RoleProvider
`getRoleMapper`

Methods inherited from interface weblogic.security.spi.SecurityProvider
`getDescription, initialize, shutdown`

Method Detail

### deployRole

    void deployRole(Resource resource,
                    String roleName,
                    String[] userAndGroupNames)
                    throws RoleCreationException

  Deprecated.
  Deploys a role (that is, creates a role on behalf of a deployed Web application/EJB). For a Web application, information is taken from the `<security-role-assignment>` element in the `weblogic.xml` deployment descriptor file. If the role already exists, it is removed and replaced by this role.

  Parameters:
    `resource` - the `Resource` object to which the role applies. For a Web application, this is the resource to which the `weblogic.xml` deployment descriptor file applies.

    `roleName` - a String name of the role within the application. (For example, for a Web application, the `<role-name>` tag from the `<security-role-assignment>` element in the `weblogic.xml` deployment descriptor file.)

    `userAndGroupNames` - a String array of users and/or groups that are in this role. For a Web application, this would be the value of one or more `<principal-name>` tags from the `<security-role-assignment>` element in the `weblogic.xml` deployment descriptor file.

    If the list is null or empty, then the role has no membership and the administrator must complete the role definition before the role can be used.

  Throws:
    `RoleCreationException` - if an unexpected error occurs while deploying the role for the specified resource.

### undeployRole

    void undeployRole(Resource resource,
                      String roleName)
                      throws RoleRemovalException

  Deprecated.
  Undeploys a role (that is, deletes a role on behalf of an undeployed Web application/EJB). For a Web application, information is taken from the `<security-role-assignment>` element in the `weblogic.xml` deployment descriptor file. This method is a no-op if the role does not exist.

  Parameters:
    `resource` - the `Resource` object to which the role applies. For a Web application, this is the resource to which the `weblogic.xml` deployment descriptor file applies.

    `roleName` - a String name of the role within that application. (For example, for a Web application the `<role-name>` tag from the `<security-role-assignment>` element, defined in the `weblogic.xml` deployment descriptor file.)

  Throws:
    `RoleRemovalException` - if an unexpected error occurs while undeploying the specified role.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs92 Copyright 2006 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD