deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.security.drm.model
Class Right

java.lang.Object
  extended by org.deegree.security.drm.model.Right

public class Right
extends java.lang.Object

A Right instance encapsulates a SecurableObject, a RightType and optional constraints which restrict it's applicability.

For example, one instance of a RightSet may be the 'access'-Right to a geographic dataset restricted to a certain area and weekdays. The situation (requested area and current time) is coded as a Feature object.

Version:
$Revision: 18195 $
Author:
Markus Schneider

Constructor Summary
Right(SecurableObject object, RightType type)
          Creates a new Right -instance (with no constraints).
Right(SecurableObject object, RightType type, Filter constraints)
          Creates a new Right -instance.
 
Method Summary
 boolean applies(SecurableObject object)
           
 boolean applies(SecurableObject object, Feature situation)
           
 Filter getConstraints()
          Returns the restrictions (the parameters) of this Right.
 SecurableObject getSecurableObject()
           
 RightType getType()
           
 Right merge(Right that)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Right

public Right(SecurableObject object,
             RightType type)
Creates a new Right -instance (with no constraints).

Parameters:
object -
type -

Right

public Right(SecurableObject object,
             RightType type,
             Filter constraints)
Creates a new Right -instance.

Parameters:
object -
type -
constraints - null means that no constraints are defined
Method Detail

getSecurableObject

public SecurableObject getSecurableObject()
Returns:
the associated SecurableObject.

getType

public RightType getType()
Returns:
the associated RightType.

getConstraints

public Filter getConstraints()
Returns the restrictions (the parameters) of this Right.

Returns:
null, if no constraints are defined

merge

public Right merge(Right that)
            throws GeneralSecurityException
Parameters:
that -
Returns:
the disjunctive combination of the instance and the submitted Right, so that the new Right has the permissions of both instances.
Throws:
GeneralSecurityException

applies

public boolean applies(SecurableObject object,
                       Feature situation)
                throws GeneralSecurityException
Parameters:
object -
situation -
Returns:
true if the Right applies on the given SecurableObject and in a concrete situation (the situation is represented by the given Feature).
Throws:
GeneralSecurityException

applies

public boolean applies(SecurableObject object)
Parameters:
object -
Returns:
true if the Right applies on the given SecurableObject and in unrestricted manner (w/o constraints).

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org