org.figure8.join.services.security
Interface PermissionResourceResolver

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
DeliverableTypeResolver, EnvironmentResolver

public interface PermissionResourceResolver
extends java.io.Serializable

A Resolver is an object that helps retrieving resources to whom could apply security permissions. Such a resolver is associated to security roles for discovering the resources they are protecting ...

Version:
$Revision: 1.2 $
Author:
Laurent Broudoux

Method Summary
 java.util.List getPermissionResourceList()
          Retrieve a list of resolved resources wrapped within PermissionResource
 java.lang.Object getResource(java.lang.String resourceId)
          Get a resource using its unique identifier
 java.lang.String getResourceId(java.lang.Object resource)
          Get a resource unique identifier
 java.lang.String getResourceLabel(java.lang.Object resource)
          Get a resource label for display
 java.util.List getResourceList()
          Retrieve a list of resolved resources
 boolean isValidResource(java.lang.Object resource)
          Tells if given resource is a valid one
 

Method Detail

getResourceList

java.util.List getResourceList()
Retrieve a list of resolved resources

Returns:
A List of resources to expose for security permission allocation

getPermissionResourceList

java.util.List getPermissionResourceList()
Retrieve a list of resolved resources wrapped within PermissionResource

Returns:
A List of org.figure8.join.services.security.PermissionResource

isValidResource

boolean isValidResource(java.lang.Object resource)
Tells if given resource is a valid one

Parameters:
resource - Object to try to resolve
Returns:
true is resource is managed by this resolver, false otherwise

getResource

java.lang.Object getResource(java.lang.String resourceId)
                             throws InvalidParameterException
Get a resource using its unique identifier

Parameters:
resourceId - Unique identifier corresponding to resource
Returns:
Object representing the resource
Throws:
InvalidParameterException - if the resourceId is unknown.

getResourceId

java.lang.String getResourceId(java.lang.Object resource)
                               throws InvalidParameterException
Get a resource unique identifier

Parameters:
resource - The object representing the resource
Returns:
The string representation of the resource unique identifier
Throws:
InvalidParameterException - if the resource cannot be resolved

getResourceLabel

java.lang.String getResourceLabel(java.lang.Object resource)
                                  throws InvalidParameterException
Get a resource label for display

Parameters:
resource - The object representing the resource
Returns:
A string representing the display label of resource
Throws:
InvalidParameterException - if the resource cannot be resolved


Copyright © 2005-2008 Join. All Rights Reserved.