fedora.server.security
Class BackendSecurityDeserializer

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by fedora.server.security.BackendSecurityDeserializer
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class BackendSecurityDeserializer
extends org.xml.sax.helpers.DefaultHandler

SAX parser to deserialize the beSecurity XML file that contains configuration properties for backend services.

Version:
$Id: BackendSecurityDeserializer.java 5218 2006-11-20 05:10:11Z cwilper $
Author:
payette@cs.cornell.edu

Field Summary
static java.lang.String BE
          The namespace and attributes in the beSecurity spec file
static java.lang.String CALL_BASIC_AUTH
          Attribute names in the beSecurity spec file
static java.lang.String CALL_PASSWORD
           
static java.lang.String CALL_SSL
           
static java.lang.String CALL_USERNAME
           
static java.lang.String CALLBACK_BASIC_AUTH
           
static java.lang.String CALLBACK_SSL
           
static java.lang.String IPLIST
           
static java.lang.String ROLE
           
 
Constructor Summary
BackendSecurityDeserializer(java.lang.String characterEncoding, boolean validate)
           
 
Method Summary
 BackendSecuritySpec deserialize(java.lang.String inFilePath)
           
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
           
static void main(java.lang.String[] args)
           
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes a)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BE

public static final java.lang.String BE
The namespace and attributes in the beSecurity spec file

See Also:
Constant Field Values

CALL_BASIC_AUTH

public static final java.lang.String CALL_BASIC_AUTH
Attribute names in the beSecurity spec file

See Also:
Constant Field Values

CALL_SSL

public static final java.lang.String CALL_SSL
See Also:
Constant Field Values

CALL_USERNAME

public static final java.lang.String CALL_USERNAME
See Also:
Constant Field Values

CALL_PASSWORD

public static final java.lang.String CALL_PASSWORD
See Also:
Constant Field Values

CALLBACK_BASIC_AUTH

public static final java.lang.String CALLBACK_BASIC_AUTH
See Also:
Constant Field Values

CALLBACK_SSL

public static final java.lang.String CALLBACK_SSL
See Also:
Constant Field Values

IPLIST

public static final java.lang.String IPLIST
See Also:
Constant Field Values

ROLE

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

BackendSecurityDeserializer

public BackendSecurityDeserializer(java.lang.String characterEncoding,
                                   boolean validate)
                            throws javax.xml.parsers.FactoryConfigurationError,
                                   javax.xml.parsers.ParserConfigurationException,
                                   org.xml.sax.SAXException,
                                   java.io.UnsupportedEncodingException
Throws:
javax.xml.parsers.FactoryConfigurationError
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.UnsupportedEncodingException
Method Detail

deserialize

public BackendSecuritySpec deserialize(java.lang.String inFilePath)
                                throws GeneralException,
                                       StreamIOException,
                                       java.io.UnsupportedEncodingException
Throws:
GeneralException
StreamIOException
java.io.UnsupportedEncodingException

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes a)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception