org.fcrepo.server.security.xacml.pdp.data
Class PolicyUtils

java.lang.Object
  extended by org.fcrepo.server.security.xacml.pdp.data.PolicyUtils

public class PolicyUtils
extends Object

Various utility methods for managing policies

Version:
$Id$
Author:
Stephen Bayliss

Constructor Summary
PolicyUtils()
           
 
Method Summary
 String fileToString(File f)
          Read file and return contents as a string
 Map<String,String> getDocumentMetadata(byte[] docData)
           
 Map<String,String> getDocumentMetadata(InputStream docIS)
          Obtains the metadata for the given document.
 String getPolicyName(File policy)
           
 String getPolicyName(String policy)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicyUtils

public PolicyUtils()
Method Detail

fileToString

public String fileToString(File f)
                    throws MelcoePDPException
Read file and return contents as a string

Parameters:
f - File to read
Returns:
Throws:
PolicyStoreException
MelcoePDPException

getPolicyName

public String getPolicyName(File policy)
                     throws MelcoePDPException
Throws:
MelcoePDPException

getPolicyName

public String getPolicyName(String policy)
                     throws MelcoePDPException
Throws:
MelcoePDPException

getDocumentMetadata

public Map<String,String> getDocumentMetadata(byte[] docData)

getDocumentMetadata

public Map<String,String> getDocumentMetadata(InputStream docIS)
Obtains the metadata for the given document.

Parameters:
docIS - the document as an InputStream
Returns:
the document metadata as a Map


Copyright © 2012 DuraSpace. All Rights Reserved.