# RoleReaderMBean (Abstract)

Overview | Related MBeans | Attributes | Operations

## Overview

Provides a set of methods for reading policies. An Authorization-provider MBean can optionally extend this MBean. The WebLogic Server Administration Console detects when an Authorization provider extends this MBean and automatically provides a GUI for using these methods.

Fully Qualified Interface Name | If you use the `getMBeanInfo` operation in MBeanTypeServiceMBean, supply the following value as this MBean's fully qualified interface name: `weblogic.management.security.authorization.RoleReaderMBean`
Factory Methods | No factory methods. Instances of this MBean are created automatically.

## Operations

This section describes the following operations:

getRoleExpression listRolesForResource roleExists | wls_getDisplayName

### getRoleExpression

Returns the expression that defines the role granting policy.

Operation Name | `"getRoleExpression"`
Parameters | `Object [] { resourceId, roleName }` where: `resourceId` is an object of type `java.lang.String` that specifies: - The resource that scopes the new role. Each resource has its predefined 'hierachy'. This new role is applicable to all of the given resouce's descendants if any. A null indicates a global role, no scoping resource, which applies to all resources within the container. `roleName` is an object of type `java.lang.String` that specifies: - The role for which this method returns the role granding expression. A null value will trigger NullPointerException.
Signature | `String [] { "java.lang.String", "java.lang.String" }`
Returns | `String`
Exceptions | `weblogic.management.utils.NotFoundException`

### listRolesForResource

Lists the role names that are scoped by a resource. Returns a null list if there are no roles under this resource scoping.

Operation Name | `"listRolesForResource"`
Parameters | `Object [] { resourceId }` where: `resourceId` is an object of type `java.lang.String` that specifies: - A resource identifier. A null value specifies a global role.
Signature | `String [] { "java.lang.String" }`
Returns | `class`

### roleExists

Indicates whether a role exists.

Operation Name | `"roleExists"`
Parameters | `Object [] { resourceId, roleName }` where: `resourceId` is an object of type `java.lang.String` that specifies: - The resource that scopes the role. Each role has a scoping resource. A null indicates a global role. `roleName` is an object of type `java.lang.String` that specifies: - The role for which this method searches.
Signature | `String [] { "java.lang.String", "java.lang.String" }`
Returns | `boolean`

### wls_getDisplayName

Operation Name | `"wls_getDisplayName"`
Parameters | `null`
Signature | `null`
Returns | `String`