edu.nyu.cs.pdsg.drbac
Class CredFileWriter

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

public class CredFileWriter
extends java.lang.Object

A utility class that writes a delegation to an XML file


Field Summary
private  Delegation deleg
           
private  org.w3c.dom.Document document
           
 
Constructor Summary
CredFileWriter(Delegation _deleg)
          Instantiate a CredFileWriter to write a delegation to a file
 
Method Summary
private  org.w3c.dom.Element encodeInt(long num, java.lang.String name)
           
static java.lang.String formatIndex(int i)
           
 byte[] getBytes()
          Get the delegation in XML form
private  org.w3c.dom.Element makeAttribute(Attribute a)
           
private  org.w3c.dom.Element makeAttributeSet(AttributeSet as)
           
private  org.w3c.dom.Element makeRole(Role r)
           
private  org.w3c.dom.Element makeRole(Role r, java.lang.String type)
           
private  org.w3c.dom.Element makeRoleID(RoleId roleid)
           
private  org.w3c.dom.Element makeSig(byte[] sig, java.lang.String name)
           
 void parseDelegation()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

document

private org.w3c.dom.Document document

deleg

private Delegation deleg
Constructor Detail

CredFileWriter

public CredFileWriter(Delegation _deleg)
Instantiate a CredFileWriter to write a delegation to a file

Parameters:
_deleg - the delegation to write
Method Detail

getBytes

public byte[] getBytes()
Get the delegation in XML form

Returns:
the bytes containing the XML data

parseDelegation

public void parseDelegation()

makeSig

private org.w3c.dom.Element makeSig(byte[] sig,
                                    java.lang.String name)

encodeInt

private org.w3c.dom.Element encodeInt(long num,
                                      java.lang.String name)

makeRoleID

private org.w3c.dom.Element makeRoleID(RoleId roleid)

makeRole

private org.w3c.dom.Element makeRole(Role r)

makeRole

private org.w3c.dom.Element makeRole(Role r,
                                     java.lang.String type)

makeAttributeSet

private org.w3c.dom.Element makeAttributeSet(AttributeSet as)

makeAttribute

private org.w3c.dom.Element makeAttribute(Attribute a)

formatIndex

public static java.lang.String formatIndex(int i)


Copyright (c) 2002-2003 New York University RLAB