org.apache.lenya.cms.ac.usecase
Interface UsecaseAuthorizer

All Superinterfaces:
org.apache.lenya.ac.Authorizer, org.apache.avalon.framework.component.Component
All Known Implementing Classes:
UsecaseAuthorizerImpl

public interface UsecaseAuthorizer
extends org.apache.lenya.ac.Authorizer

Authorizer for usecases.

Version:
$Id: UsecaseAuthorizer.java 392449 2006-04-07 23:20:38Z michi $

Field Summary
 
Fields inherited from interface org.apache.lenya.ac.Authorizer
ROLE
 
Method Summary
 boolean authorizeUsecase(java.lang.String usecase, org.apache.lenya.ac.Role[] roles, org.apache.lenya.cms.publication.Publication publication)
          Authorizes a usecase by considering all roles of the current identity
 boolean isPermitted(java.lang.String usecase, org.apache.lenya.cms.publication.Publication publication, org.apache.lenya.ac.Role role)
          Checks whether the specified role is permitted to invoke a given usecase
 void setPermission(java.lang.String usecase, org.apache.lenya.cms.publication.Publication publication, org.apache.lenya.ac.Role role, boolean granted)
          Grants or denies a usecase to a role
 
Methods inherited from interface org.apache.lenya.ac.Authorizer
authorize
 

Method Detail

authorizeUsecase

boolean authorizeUsecase(java.lang.String usecase,
                         org.apache.lenya.ac.Role[] roles,
                         org.apache.lenya.cms.publication.Publication publication)
                         throws org.apache.lenya.ac.AccessControlException
Authorizes a usecase by considering all roles of the current identity

Parameters:
usecase - The usecase ID.
roles - The roles of the current identity.
publication - The publication.
Returns:
A boolean value.
Throws:
org.apache.lenya.ac.AccessControlException - when something went wrong.

setPermission

void setPermission(java.lang.String usecase,
                   org.apache.lenya.cms.publication.Publication publication,
                   org.apache.lenya.ac.Role role,
                   boolean granted)
                   throws org.apache.lenya.ac.AccessControlException
Grants or denies a usecase to a role

Parameters:
usecase - The usecase.
publication - The publication.
role - The role.
granted - If the usecase shall be permitted.
Throws:
org.apache.lenya.ac.AccessControlException - if an error occurs.

isPermitted

boolean isPermitted(java.lang.String usecase,
                    org.apache.lenya.cms.publication.Publication publication,
                    org.apache.lenya.ac.Role role)
                    throws org.apache.lenya.ac.AccessControlException
Checks whether the specified role is permitted to invoke a given usecase

Parameters:
usecase - The usecase.
publication - The publication.
role - The role.
Returns:
A boolean value.
Throws:
org.apache.lenya.ac.AccessControlException - if an error occurs.


Copyright © $ Apache Software Foundation. All Rights Reserved.