org.apache.lenya.ac
Interface Policy

All Known Implementing Classes:
DefaultPolicy, URLPolicy

public interface Policy

A policy assigns roles to accreditables using credentials. Additionally, SSL protection is defined.

Version:
$Id: Policy.java 473841 2006-11-12 00:46:38Z gregor $

Method Summary
 Role[] getRoles(Identity identity)
          Returns all roles of a certain identity.
 boolean isEmpty()
          Returns if the policy is empty.
 boolean isSSLProtected()
          Returns if this policy requires SSL protection.
 

Method Detail

getRoles

Role[] getRoles(Identity identity)
                throws AccessControlException
Returns all roles of a certain identity.

Parameters:
identity - The identity.
Returns:
An array of roles.
Throws:
AccessControlException - when something went wrong.

isSSLProtected

boolean isSSLProtected()
                       throws AccessControlException
Returns if this policy requires SSL protection.

Returns:
A boolean value.
Throws:
AccessControlException - when something went wrong.

isEmpty

boolean isEmpty()
                throws AccessControlException
Returns if the policy is empty. A policy is empty if it does not contain any credentials.

Returns:
A boolean value.
Throws:
AccessControlException - when something went wrong.


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.