org.opentox.interfaces
Interface IAuthorizationHierarchy

All Superinterfaces:
java.lang.Comparable<IAuthorizationHierarchy>
All Known Implementing Classes:
Priviledges

public interface IAuthorizationHierarchy
extends java.lang.Comparable<IAuthorizationHierarchy>

Defines an Hierarchy of authorization levels such as guest < user < priviledged user < administrator as these are defined in Priviledges. Extends the Comparable Interface and uses the method compareTo(IAuthorizationHierarchy other) to define a relationship between the various access levels.

Version:
1.3.3 (Last update: Jan 11, 2009)
Author:
OpenTox - http://www.opentox.org/, Sopasakis Pantelis, Sarimveis Harry, Kolotouros Dimitris

Method Summary
 int compareTo(IAuthorizationHierarchy other)
          Compares two Access Levels and returns an integer that describes a comparison relationship between them.
 java.lang.String getLevel()
          The priviledges as a string, i.e.
 

Method Detail

compareTo

int compareTo(IAuthorizationHierarchy other)
Compares two Access Levels and returns an integer that describes a comparison relationship between them. 0 stands for equality, if a.compareTo(b) returns 1 it should be interpreted as a > b while -1 should mean a < b.

Specified by:
compareTo in interface java.lang.Comparable<IAuthorizationHierarchy>
Parameters:
other - The Access Level (IAuthorizationHierarchy ) to compare with.
Returns:
Comparison Flag.

getLevel

java.lang.String getLevel()
The priviledges as a string, i.e. "user/simple".

Returns:
priviledges as a string.