com.metamatrix.platform.security.util
Class RolePermissionFactory

java.lang.Object
  extended by com.metamatrix.platform.security.util.RolePermissionFactory
All Implemented Interfaces:
AuthorizationPermissionFactory, java.io.Serializable

public class RolePermissionFactory
extends java.lang.Object
implements AuthorizationPermissionFactory, java.io.Serializable

This class is the factory for RolePermission instances.

See Also:
Serialized Form

Constructor Summary
RolePermissionFactory()
           
 
Method Summary
 AuthorizationPermission create(AuthorizationResource role, AuthorizationRealm realm, AuthorizationActions actions, java.lang.String contentModifier)
          Create a new authorization permission for the specified resource.
 AuthorizationPermission create(java.lang.String roleName, AuthorizationRealm realm)
          Create a new authorization permission for the specified role.
 AuthorizationPermission create(java.lang.String roleName, AuthorizationRealm realm, AuthorizationActions actions)
          Create a new authorization permission for the specified resource.
 AuthorizationResource createResource(java.lang.String name)
          Create the AuthorizationResource type for the permission type that this factory creates instances of.
 java.lang.Class getPermissionClass()
          Get the class that this factory creates instances of.
static AuthorizationRealm getRealm()
          Get the Realm under which the factory creates its roles.
static java.lang.String getRealmName()
          Get the name of the Realm under which the factory creates its roles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RolePermissionFactory

public RolePermissionFactory()
Method Detail

getPermissionClass

public java.lang.Class getPermissionClass()
Get the class that this factory creates instances of.

Specified by:
getPermissionClass in interface AuthorizationPermissionFactory
Returns:
the class of the instances returned by this factory's create methods.

createResource

public AuthorizationResource createResource(java.lang.String name)
Create the AuthorizationResource type for the permission type that this factory creates instances of.

Specified by:
createResource in interface AuthorizationPermissionFactory
Returns:
A new resource instance of the appropriate type.

create

public AuthorizationPermission create(java.lang.String roleName,
                                      AuthorizationRealm realm)
Create a new authorization permission for the specified role.

Specified by:
create in interface AuthorizationPermissionFactory
Parameters:
roleName - the new role name
realm - the realm is thrown away. The RolePermissionFactory knows the realm that roles belong.

create

public AuthorizationPermission create(AuthorizationResource role,
                                      AuthorizationRealm realm,
                                      AuthorizationActions actions,
                                      java.lang.String contentModifier)
Create a new authorization permission for the specified resource.

Specified by:
create in interface AuthorizationPermissionFactory
Parameters:
roleName - the name for the resource.
realm - the realm is thrown away. The RolePermissionFactory knows the realm that roles belong.
actions - the actions for the resource - ignored in this factory.
contentModifier - the content modifier (may be null) - ignored in this factory.

create

public AuthorizationPermission create(java.lang.String roleName,
                                      AuthorizationRealm realm,
                                      AuthorizationActions actions)
Create a new authorization permission for the specified resource.

Specified by:
create in interface AuthorizationPermissionFactory
Parameters:
roleName - the new resource name
realm - the realm is thrown away. The RolePermissionFactory knows the realm that roles belong.
actions - the actions for the resource - ignored in this factory.

getRealmName

public static java.lang.String getRealmName()
Get the name of the Realm under which the factory creates its roles.

Returns:
the name of this role's realm.

getRealm

public static AuthorizationRealm getRealm()
Get the Realm under which the factory creates its roles.

Returns:
this role's realm.


Copyright © 2009. All Rights Reserved.