issrg.test.pmi
Class PMIXMLRepository

java.lang.Object
  extended by issrg.utils.repository.VirtualRepository
      extended by issrg.test.pmi.PMIXMLRepository
All Implemented Interfaces:
AttributeRepository

public class PMIXMLRepository
extends VirtualRepository

This class is for testing various PMI setups. The PMI is represented by a single XML where all subjects are given tokens by issuers. The repository can return ParsedTokens for individual subjects. PERMIS can use these tokens to arrive at its decisions, without having to configure the LDAP and PKI.


Field Summary
static java.lang.String PMI_XML_PROTOCOL
           
 
Fields inherited from class issrg.utils.repository.VirtualRepository
diagnosis, repository
 
Fields inherited from interface issrg.utils.repository.AttributeRepository
FAILURE_STATUS, INHERENT_FAILURE_STATUS, PARTIAL_SUCCESS_STATUS, SUCCESS_STATUS
 
Constructor Summary
PMIXMLRepository(java.lang.String url)
           
 
Method Summary
 javax.naming.directory.Attributes getAllAttributes(java.security.Principal DN)
          This method returns all available attributes from the entry.
static void populateRepository(VirtualRepository that, java.io.InputStream is, java.lang.String acAttrName)
          This method populates the given VirtualRepository with the contents of the XML in the given InputStream.
 
Methods inherited from class issrg.utils.repository.VirtualRepository
get, getAttribute, getAttributes, getDiagnosis, getStatus, loadPKC, populate, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PMI_XML_PROTOCOL

public static final java.lang.String PMI_XML_PROTOCOL
See Also:
Constant Field Values
Constructor Detail

PMIXMLRepository

public PMIXMLRepository(java.lang.String url)
                 throws java.net.MalformedURLException,
                        java.io.IOException
Throws:
java.net.MalformedURLException
java.io.IOException
Method Detail

getAllAttributes

public javax.naming.directory.Attributes getAllAttributes(java.security.Principal DN)
Description copied from class: VirtualRepository
This method returns all available attributes from the entry. It does the same as getAttributes(DN, null)

Specified by:
getAllAttributes in interface AttributeRepository
Overrides:
getAllAttributes in class VirtualRepository
Parameters:
DN - - the entry name; its getName method should return the canonical name
Returns:
all available Attributes, or null, if no such entry exists

populateRepository

public static void populateRepository(VirtualRepository that,
                                      java.io.InputStream is,
                                      java.lang.String acAttrName)
                               throws java.io.IOException
This method populates the given VirtualRepository with the contents of the XML in the given InputStream.

Throws:
java.io.IOException