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

## weblogic.security.spi
Interface DeployableRoleProvider

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 re/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 one 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).

Author:
  Copyright (c) 2002 by BEA. All Rights Reserved.

Method Summary
`void` | `deployRole(Resource resource, java.lang.String roleName, java.lang.String[] userAndGroupNames)` Deploys a role (that is, creates a role on behalf of a deployed Web application/EJB).
`void` | `undeployRole(Resource resource, java.lang.String roleName)` 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

    public void deployRole(Resource resource,
                           java.lang.String roleName,
                           java.lang.String[] userAndGroupNames)
                    throws RoleCreationException

  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

    public void undeployRole(Resource resource,
                             java.lang.String roleName)
                      throws RoleRemovalException

  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/docs70
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
WebLogic Server 7.0 API Reference