jif.runtime
Class NativePrincipal

java.lang.Object
  extended by jif.runtime.NativePrincipal
All Implemented Interfaces:
Principal

public class NativePrincipal
extends java.lang.Object
implements Principal

A NativePrincipal represents the file system users and groups.


Field Summary
protected  java.util.Set superiors
           
 
Constructor Summary
protected NativePrincipal(java.lang.String name)
           
 
Method Summary
protected static Principal[] addToChainBottom(Principal[] chain, Principal principal)
          Create a new chain of length chain.length+1, such that the last element of the new chain is principal, and all other elements are copied over from chain.
protected static Principal[] addToChainTop(Principal principal, Principal[] chain)
          Create a new chain of length chain.length+1, such that the first element of the new chain is principal, and all other elements are copied over from chain, offset by one.
 boolean delegatesTo(Principal p)
           
 boolean equals(java.lang.Object o)
           
 boolean equals(Principal p)
           
 Principal[] findChainDownto(Principal q)
           
 Principal[] findChainUpto(Principal p)
           
 int hashCode()
           
 boolean isAuthorized(java.lang.Object authorizationProof, Closure closure, Label lb)
           
 java.lang.String name()
           
 java.util.Set superiors()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

superiors

protected final java.util.Set superiors
Constructor Detail

NativePrincipal

protected NativePrincipal(java.lang.String name)
Method Detail

name

public java.lang.String name()
Specified by:
name in interface Principal

superiors

public java.util.Set superiors()

delegatesTo

public boolean delegatesTo(Principal p)
Specified by:
delegatesTo in interface Principal

isAuthorized

public boolean isAuthorized(java.lang.Object authorizationProof,
                            Closure closure,
                            Label lb)
Specified by:
isAuthorized in interface Principal

findChainDownto

public Principal[] findChainDownto(Principal q)
Specified by:
findChainDownto in interface Principal

findChainUpto

public Principal[] findChainUpto(Principal p)
Specified by:
findChainUpto in interface Principal

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(Principal p)
Specified by:
equals in interface Principal

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

addToChainBottom

protected static Principal[] addToChainBottom(Principal[] chain,
                                              Principal principal)
Create a new chain of length chain.length+1, such that the last element of the new chain is principal, and all other elements are copied over from chain.


addToChainTop

protected static Principal[] addToChainTop(Principal principal,
                                           Principal[] chain)
Create a new chain of length chain.length+1, such that the first element of the new chain is principal, and all other elements are copied over from chain, offset by one.