Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.security.drm.model
Class Right

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

    public class Right

extends 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)`
`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 String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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