org.eclipse.higgins.util.saml
Class XMLElement

java.lang.Object
  extended byorg.eclipse.higgins.util.saml.XMLElement
Direct Known Subclasses:
SAML1Assertion, SAML1Subject, SAML2Assertion, SAML2AuthnRequest, SAML2AuthnStatement, SAML2Conditions, SAML2Response, SAML2Subject

public abstract class XMLElement
extends Object


Nested Class Summary
 class XMLElement.VerificationException
           
 
Field Summary
static String PROVIDER_JSR105
           
 
Method Summary
static void addNamespaceAttributes(Document document)
           
static String createID()
           
 String dump()
           
static Date fromXMLDate(String date)
           
 Document getDocument()
           
 Element getElement()
           
 String getID()
           
static String getTextContent(Element element)
           
 boolean hasKeyInfo()
           
 boolean hasSignature()
           
 void setID(String value)
           
static void setTextContent(Element element, String value)
           
 void sign(PrivateKey privateKey)
           
 void sign(PrivateKey privateKey, PublicKey publicKey)
           
 String toString()
           
static String toXMLDate(Date date)
           
 void verify(PublicKey publicKey)
           
 void verifyFromKeyInfo()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROVIDER_JSR105

public static final String PROVIDER_JSR105
See Also:
Constant Field Values
Method Detail

getDocument

public Document getDocument()

getElement

public Element getElement()

dump

public String dump()
            throws IOException
Throws:
IOException

toString

public String toString()

hasSignature

public boolean hasSignature()

hasKeyInfo

public boolean hasKeyInfo()

sign

public void sign(PrivateKey privateKey,
                 PublicKey publicKey)
          throws KeyException,
                 NoSuchAlgorithmException,
                 InvalidAlgorithmParameterException,
                 javax.xml.crypto.MarshalException,
                 javax.xml.crypto.dsig.XMLSignatureException
Throws:
KeyException
NoSuchAlgorithmException
InvalidAlgorithmParameterException
javax.xml.crypto.MarshalException
javax.xml.crypto.dsig.XMLSignatureException

sign

public void sign(PrivateKey privateKey)
          throws NoSuchAlgorithmException,
                 InvalidAlgorithmParameterException,
                 javax.xml.crypto.MarshalException,
                 javax.xml.crypto.dsig.XMLSignatureException,
                 KeyException
Throws:
NoSuchAlgorithmException
InvalidAlgorithmParameterException
javax.xml.crypto.MarshalException
javax.xml.crypto.dsig.XMLSignatureException
KeyException

verify

public void verify(PublicKey publicKey)
            throws javax.xml.crypto.MarshalException,
                   javax.xml.crypto.dsig.XMLSignatureException,
                   XMLElement.VerificationException
Throws:
javax.xml.crypto.MarshalException
javax.xml.crypto.dsig.XMLSignatureException
XMLElement.VerificationException

verifyFromKeyInfo

public void verifyFromKeyInfo()
                       throws javax.xml.crypto.MarshalException,
                              javax.xml.crypto.dsig.XMLSignatureException,
                              XMLElement.VerificationException
Throws:
javax.xml.crypto.MarshalException
javax.xml.crypto.dsig.XMLSignatureException
XMLElement.VerificationException

getTextContent

public static String getTextContent(Element element)

setTextContent

public static void setTextContent(Element element,
                                  String value)

getID

public String getID()

setID

public void setID(String value)

createID

public static String createID()

fromXMLDate

public static Date fromXMLDate(String date)
                        throws ParseException
Throws:
ParseException

toXMLDate

public static String toXMLDate(Date date)

addNamespaceAttributes

public static void addNamespaceAttributes(Document document)