edu.nyu.cs.pdsg.drbac
Class CredFileLoader

java.lang.Object
  extended byedu.nyu.cs.pdsg.drbac.CredFileLoader

class CredFileLoader
extends java.lang.Object

A utility class that loads a delegation from an XML file


Field Summary
private  java.util.ArrayList dwxmlList
           
private  java.io.InputStream in
           
static int MAXSIZE
           
 
Constructor Summary
CredFileLoader(java.io.File path)
          Load credentials from a given path
CredFileLoader(java.io.InputStream _in)
          Load credentials from an input stream
 
Method Summary
private  long decodeInt(org.w3c.dom.Node node)
           
 DelegationWithXML getDelegationWithXML()
          Parse and retrieve the delegation
(this can only be called once)
 DelegationWithXML getFirstDelegationWithXML()
          Ignored
 java.util.Iterator iterator()
          Ignored
private  Attribute makeAttribute(org.w3c.dom.Node node)
           
private  AttributeSet makeAttributeSet(org.w3c.dom.Node node)
           
private  Delegation makeDelegation(org.w3c.dom.Node node)
           
private  DiscoveryTag makeDiscoveryTag(org.w3c.dom.Node node)
           
private  Role makeRole(org.w3c.dom.Node node)
           
private  RoleId makeRoleId(org.w3c.dom.Node node)
           
private  byte[] makeSig(org.w3c.dom.Node node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAXSIZE

public static final int MAXSIZE
See Also:
Constant Field Values

dwxmlList

private java.util.ArrayList dwxmlList

in

private java.io.InputStream in
Constructor Detail

CredFileLoader

public CredFileLoader(java.io.File path)
               throws java.io.FileNotFoundException
Load credentials from a given path

Parameters:
path - The path of the credential file
Throws:
java.io.FileNotFoundException - thrown if the directory is invalid

CredFileLoader

public CredFileLoader(java.io.InputStream _in)
Load credentials from an input stream

Parameters:
_in - the input stream to parse
Method Detail

getDelegationWithXML

public DelegationWithXML getDelegationWithXML()
Parse and retrieve the delegation
(this can only be called once)

Returns:
the delegation and associated XML data

iterator

public java.util.Iterator iterator()
Ignored


getFirstDelegationWithXML

public DelegationWithXML getFirstDelegationWithXML()
Ignored


makeDelegation

private Delegation makeDelegation(org.w3c.dom.Node node)
                           throws CredentialException
Throws:
CredentialException

makeSig

private byte[] makeSig(org.w3c.dom.Node node)

decodeInt

private long decodeInt(org.w3c.dom.Node node)

makeRole

private Role makeRole(org.w3c.dom.Node node)
               throws CredentialException
Throws:
CredentialException

makeRoleId

private RoleId makeRoleId(org.w3c.dom.Node node)
                   throws CredentialException
Throws:
CredentialException

makeDiscoveryTag

private DiscoveryTag makeDiscoveryTag(org.w3c.dom.Node node)
                               throws CredentialException
Throws:
CredentialException

makeAttributeSet

private AttributeSet makeAttributeSet(org.w3c.dom.Node node)
                               throws CredentialException
Throws:
CredentialException

makeAttribute

private Attribute makeAttribute(org.w3c.dom.Node node)
                         throws CredentialException
Throws:
CredentialException


Copyright (c) 2002-2003 New York University RLAB