ro.isdc.wro.model.resource.support
Class DefaultResourceAuthorizationManager

java.lang.Object
  extended by ro.isdc.wro.model.resource.support.DefaultResourceAuthorizationManager
All Implemented Interfaces:
MutableResourceAuthorizationManager, ResourceAuthorizationManager

public class DefaultResourceAuthorizationManager
extends Object
implements MutableResourceAuthorizationManager

Controls the resources which should be accessible through ResourceProxyRequestHandler. Prevent the security issue which may occur when everything can be accessed using the proxy.

Author:
Alex Objelean

Constructor Summary
DefaultResourceAuthorizationManager()
           
 
Method Summary
 void add(String uri)
          Add a new resource uri to the set of authorized resources.
 void clear()
          Clear all authorized resources added previously.
 boolean isAuthorized(String uri)
          
 Collection<String> list()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultResourceAuthorizationManager

public DefaultResourceAuthorizationManager()
Method Detail

isAuthorized

public boolean isAuthorized(String uri)

Specified by:
isAuthorized in interface ResourceAuthorizationManager
Parameters:
uri - of the resource to authorize.
Returns:
true if the provided uri is an authorized resource.

add

public void add(String uri)
Add a new resource uri to the set of authorized resources.

Specified by:
add in interface MutableResourceAuthorizationManager
Parameters:
uri - the resource uri to authorize.

list

public Collection<String> list()
Returns:
a read-only copy of authorized resources.

clear

public void clear()
Clear all authorized resources added previously.

Specified by:
clear in interface MutableResourceAuthorizationManager


Copyright © 2008-2013. All Rights Reserved.