Oracle Entitlements Server for Java API Reference

com.bea.security
Class RoleService

java.lang.Object
  |
  +--com.bea.security.PublicSecurityService
        |
        +--com.bea.security.RoleService

public class RoleService
extends PublicSecurityService

The RoleService can be used to obtain the appropriate set of roles assigned to an identity for a particular resource and action.

Author:
Copyright © 2004-2008, Oracle and/or its affiliates. All rights reserved.

Fields inherited from class com.bea.security.PublicSecurityService
COMPATIBLE, COMPATIBLE_DEPRECATED, COMPATIBLE_UNKNOWN, NOT_COMPATIBLE
 
Method Summary
 java.util.Vector getRoles_Debug(AuthenticIdentity ident, RuntimeResource resource, RuntimeAction action, AppContext context, DebugInfo debugInfo)
          Gets the roles for an AuthenticIdentity in reference to a resource and action.
 java.util.Vector getRoles(AuthenticIdentity ident, RuntimeResource resource, RuntimeAction action)
          Gets the roles for an AuthenticIdentity in reference to a resource and action.
 java.util.Vector getRoles(AuthenticIdentity ident, RuntimeResource resource, RuntimeAction action, AppContext context)
          Gets the roles for an AuthenticIdentity in reference to a resource, action, and application context.
 ServiceType getServiceType()
          Returns the type of this service.
 ServiceVersion getVersion()
          Returns the version of this service.
 int isCompatible(ServiceVersion version)
          Determines if the version of the public service API specified in the Java application is compatible with the current version of the service API in the security runtime instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getServiceType

public ServiceType getServiceType()
Returns the type of this service.

Returns:
a ServiceType object indicating the service type of this service.
Overrides:
getServiceType in class PublicSecurityService

getVersion

public ServiceVersion getVersion()
Returns the version of this service.

Returns:
a ServiceVersion object indicating the version and patch level of this service.
Overrides:
getVersion in class PublicSecurityService

isCompatible

public int isCompatible(ServiceVersion version)
Determines if the version of the public service API specified in the Java application is compatible with the current version of the service API in the security runtime instance.

Parameters:
version - a ServiceVersion which is being asked for by the Java application. The current service, that is, the service in the security runtime instance, will indiciate if it supports the version specified in the isCompatible() method.
Returns:
an int equaling NOT_COMPATIBLE if the service is not compatible with the supplied version, COMPATIBLE if the service is fully compatible, COMPATIBLE_DEPRECATED if the service is compatible, but some functions have been depricated between the versions, or, finally, COMPATIBLE_UNKNOWN if the version passed in is newer than the current version, so compatibility is unknown.
Overrides:
isCompatible in class PublicSecurityService

getRoles

public java.util.Vector getRoles(AuthenticIdentity ident,
                                 RuntimeResource resource,
                                 RuntimeAction action,
                                 AppContext context)
                          throws IdentityNotAuthenticException,
                                 ParameterException
Gets the roles for an AuthenticIdentity in reference to a resource, action, and application context.

Parameters:
ident - an AuthenticIdentity of the user that the roles are associated with.
resource - the RuntimeResource that the roles are relevant for.
action - the RuntimeAction that the roles are relevant for.
context - an AppContext object that contains names and values associated with the application state which may be used in order to determine which roles are mapped for an identity.
Returns:
a Vector of IdentityRole objects that lists the roles associated for this identity.
Throws:
IdentityNotAuthenticException - This exception is thrown if the identity provided is invalid or not properly authenticated.
ParameterException - This exception is thrown if the resource or action is invalid.

getRoles_Debug

public java.util.Vector getRoles_Debug(AuthenticIdentity ident,
                                       RuntimeResource resource,
                                       RuntimeAction action,
                                       AppContext context,
                                       DebugInfo debugInfo)
                                throws IdentityNotAuthenticException,
                                       ParameterException
Gets the roles for an AuthenticIdentity in reference to a resource and action. This API is only supported on java-ssm

Parameters:
ident - an AuthenticIdentity of the user that the roles are associated with.
resource - the RuntimeResource that the roles are relevant for.
action - the RuntimeAction that the roles are relevant for.
debugInfo - the DebugInfo which store information about policy evaluation
Returns:
a Vector of IdentityRole objects that lists the roles associated for this identity.
Throws:
IdentityNotAuthenticException - This exception is thrown if the identity provided is invalid or not properly authenticated.
ParameterException - This exception is thrown if the resource or action is invalid.

getRoles

public java.util.Vector getRoles(AuthenticIdentity ident,
                                 RuntimeResource resource,
                                 RuntimeAction action)
                          throws IdentityNotAuthenticException,
                                 ParameterException
Gets the roles for an AuthenticIdentity in reference to a resource and action.

Parameters:
ident - an AuthenticIdentity of the user that the roles are associated with.
resource - the RuntimeResource that the roles are relevant for.
action - the RuntimeAction that the roles are relevant for.
Returns:
a Vector of IdentityRole objects that lists the roles associated for this identity.
Throws:
IdentityNotAuthenticException - This exception is thrown if the identity provided is invalid or not properly authenticated.
ParameterException - This exception is thrown if the resource or action is invalid.