Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## spki
Class Empowerment

    java.lang.Object
      |
      +--spki.BaseObj
            |
            +--spki.Empowerment

public class Empowerment
extends BaseObj

SPKI Empowerment class.

Format definitions:

     <redelegate>:: "delegatable" ;
     <transfer>:: "transferable" ;
     <propagate>:: <redelegate> | <transfer> ;
     <grant>:: "(" "grant" <propagate>? ")" ;
     <delegate>:: "(" "delegate" <redelegate>? ")" ;
     <emp-value>:: <grant> | <delegate> ;
     <empower>:: "(" "empower" <emp-value> ")" ;

Version:
  $Id: Empowerment.java,v 1.10 2002/07/05 09:33:12 tep Exp $
Author:
  Tep Narula <tep@win.trlabs.ca>

Field Summary
`private static String` | `__ME` This class's full name.
`static int` | `DELEGATE` Delegation (2).
`static int` | `DELEGATEABLE` Redelegation allowed (1).
`static int` | `GRANT` Granting (1).
`private static int` | `MAX_EMPOWERMENT_VALUE`
`private static int` | `MAX_PROPAGATION_VALUE`
`private static int` | `MIN_EMPOWERMENT_VALUE`
`private static int` | `MIN_PROPAGATION_VALUE`
`static int` | `NO_PROPAGATION` No propagation allowed (0).
`static int` | `NOT_EMPOWERED` Initial empowerment type (0).
`private int` | `propagate` the propgation-control type.
`static String[]` | `PROPAGATE_SEXP_NAMES` The propagate-control S-Expression values, used by toSExpression() and other methods.
`static String` | `SEXP_NAME` This class S-Expression type name, used by toSExpression() and other methods.
`static int` | `TRANSFER` Transfer (3).
`static int` | `TRANSFERABLE` Transfer allowed (2).
`private int` | `type` the empowerment type.
`static String[]` | `TYPE_SEXP_NAMES` The empowerment-type S-Expression values, used by toSExpression() and other methods.

Fields inherited from class spki.BaseObj
`__ME, cache_sexp, cached_sexp, DEFAULT_HASH_ALG, locked, SEXP_NAME`

Constructor Summary
`protected` | `Empowerment()` Don't use me!
`` | `Empowerment(int type, int propagate)` Create an immutable Empowerment object from the given empowerment type and, optionally, the propagation-control type.
`` | `Empowerment(SExpression sexp)` Create an immutable Empowerment object from an S-Expression.

Method Summary
`int` | `getEmpowermentType()` Get the empowerment type.
`int` | `getPropagationType()` Get the propgation-control type.
`SExpression` | `toSExpression()` Build an SExpression representing this object.

Methods inherited from class spki.BaseObj
`disableSExpressionCaching, enableSExpressionCaching, extractHashAlgId, getCachedSExpression, isLocked, isSListOfType, lock, providerToSPKI, setCachedSExpression, spkiToProvider, toString`

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait`

Field Detail

### __ME

    private static final String __ME

  This class's full name.

### SEXP_NAME

    public static final String SEXP_NAME

  This class S-Expression type name, used by toSExpression() and other methods.
  See Also:
    `toSExpression()`

### TYPE_SEXP_NAMES

    public static final String[] TYPE_SEXP_NAMES

  The empowerment-type S-Expression values, used by toSExpression() and other methods.
  See Also:
    `toSExpression()`

### NOT_EMPOWERED

    public static final int NOT_EMPOWERED

  Initial empowerment type (0).

### GRANT

    public static final int GRANT

  Granting (1).

### DELEGATE

    public static final int DELEGATE

  Delegation (2).

### TRANSFER

    public static final int TRANSFER

  Transfer (3). This is only used in EIntersect algorithm for Tuple reduction.
  See Also:
    `Tuple.EIntersect(Empowerment,Empowerment)`

### MIN_EMPOWERMENT_VALUE

    private static final int MIN_EMPOWERMENT_VALUE

  See Also:
    `GRANT`

### MAX_EMPOWERMENT_VALUE

    private static final int MAX_EMPOWERMENT_VALUE

  See Also:
    `TRANSFER`

### type

    private int type

  the empowerment type.
  See Also:
    `GRANT`, `DELEGATE`

### PROPAGATE_SEXP_NAMES

    public static final String[] PROPAGATE_SEXP_NAMES

  The propagate-control S-Expression values, used by toSExpression() and other methods.
  See Also:
    `toSExpression()`

### NO_PROPAGATION

    public static final int NO_PROPAGATION

  No propagation allowed (0).

### DELEGATEABLE

    public static final int DELEGATEABLE

  Redelegation allowed (1).

### TRANSFERABLE

    public static final int TRANSFERABLE

  Transfer allowed (2).

### MIN_PROPAGATION_VALUE

    private static final int MIN_PROPAGATION_VALUE

  See Also:
    `NO_PROPAGATION`

### MAX_PROPAGATION_VALUE

    private static final int MAX_PROPAGATION_VALUE

  See Also:
    `TRANSFERABLE`

### propagate

    private int propagate

  the propgation-control type.
  See Also:
    `NO_PROPAGATION`, `DELEGATEABLE`, `TRANSFERABLE`

Constructor Detail

### Empowerment

    protected Empowerment()

  Don't use me!
  See Also:
    `Empowerment(SExpression)`, `Empowerment(int,int)`

### Empowerment

    public Empowerment(SExpression sexp)
                throws ParseException,
                       SPKIException

  Create an immutable Empowerment object from an S-Expression.
  See Also:
    `BaseObj.BaseObj(SExpression)`

### Empowerment

    public Empowerment(int type,
                       int propagate)
                throws SPKIException

  Create an immutable Empowerment object from the given empowerment type and, optionally, the propagation-control type.
  Parameters:
    `type` - the empowerment type value, must be within the range of MIN_EMPOWERMENT_VALUE and MAX_EMPOWERMENT_VALUE.
    `propgate` - the propagation-control type value, must be within the range of MIN_PROPAGATION_VALUE and MAX_PROPAGATION_VALUE.
  Throws:
    SPKIException - if something went wrong.
  See Also:
    `GRANT`, `DELEGATE`, `NO_PROPAGATION`, `DELEGATEABLE`, `TRANSFERABLE`

Method Detail

### toSExpression

    public SExpression toSExpression()
                              throws SPKIException

  Description copied from interface: SPKIObject
  Build an SExpression representing this object.
  Overrides:
    toSExpression in class BaseObj
  Tags copied from interface: SPKIObject
  Returns:
    SExpression object representing this object, or `null`.
  Throws:
    SPKIException - if something went wrong during conversion.

### getEmpowermentType

    public int getEmpowermentType()

  Get the empowerment type.
  Returns:
    an integer value representing empowerment type.
  See Also:
    `GRANT`, `DELEGATE`

### getPropagationType

    public int getPropagationType()

  Get the propgation-control type.
  Returns:
    an integer value representing propagation-control type.
  See Also:
    `NO_PROPAGATION`, `DELEGATEABLE`, `TRANSFERABLE`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD