Coalevo Logo

net.coalevo.security.model
Interface Authorizations


public interface Authorizations

Defines a container for Authorizations.

The two types of authorizations defined in the Coalevo platform are:

  1. Permissions (instance of Permission)
  2. Roles (instances of Role
Permissions are actually associated with roles, and resolved into a set according to a simple alogrithm.

Version:
1.0.0 (10/02/2009)
Author:
Dieter Wimberger (wimpi)

Method Summary
 java.util.Set<java.lang.String> getRolenames()
          Returns an unmodifiable set of the names of all roles of the corresponding agent.
 boolean hasPermission(java.lang.String id)
          Checks if this Agent has a permission specified by the given name.
 boolean hasRole(java.lang.String id)
          Checks if this Agent has a role specified by the given identifier.
 

Method Detail

hasPermission

boolean hasPermission(java.lang.String id)
Checks if this Agent has a permission specified by the given name.

Parameters:
id - a String that identifies a permission.
Returns:
true if allowed and not denied, false otherwise.

hasRole

boolean hasRole(java.lang.String id)
Checks if this Agent has a role specified by the given identifier.

Parameters:
id - a String identifier for a Role instance.
Returns:
true if this Authorizations instance contains the given role.

getRolenames

java.util.Set<java.lang.String> getRolenames()
Returns an unmodifiable set of the names of all roles of the corresponding agent.

Returns:
an unmodifiable Set of String elements.

Coalevo Logo

(c) 2004-2009 VFI (http://www.vfi.or.at)