com.ebmwebsourcing.sla.agreement.descriptor.original
Class AgreementDescriptorBuilder

java.lang.Object
  extended by com.ebmwebsourcing.sla.agreement.descriptor.original.AgreementDescriptorBuilder

public final class AgreementDescriptorBuilder
extends java.lang.Object

This Class defines the Agreement Descriptor builder for the kernel.

  • It can validate EndpointReference descriptor in XML form.
  • It can build class bindings from a XML form.
  • It can build the XML binding from classes form.

    Note that this Builder is based on the original Agreement schema; it doesn't control the EndpointReference extension parts.

    This class is thread-safe.

    Since:
    PEtALS 2.2
    Author:
    Roland NAUDIN - EBM WebSourcing

    Field Summary
    static java.lang.String AGREEMENT_NAMESPACE
              Agreeement Namespace
    static java.lang.String XSD_AGREEMENT
              Agreeement schema name
    static java.lang.String XSD_AGREEMENT_EXTENSIONS
              Agreeement Extensions schema name
     
    Method Summary
    static Agreement buildJavaAgreementDescriptor(java.io.InputStream agreementDescriptorStream)
              Build the Java bindings from the Agreement descriptor in XML form.
    static javax.xml.bind.JAXBElement<Agreement> buildJavaJAxbAgreementDescriptor(java.io.InputStream agreementDescriptorStream)
               
    static org.w3c.dom.Element buildXmlAgreementDescriptor(Agreement agreementDescriptor)
              Build the XML nodes from the EndpointReference descriptor in Java classes form.
    static org.w3c.dom.Element buildXmlEndpointDescriptor(com.ebmwebsourcing.addressing.descriptor.Endpoint epr)
               
    static org.w3c.dom.Element buildXmlGuaranteeDescriptor(GuaranteeTermType guarantee)
               
    static javax.xml.bind.JAXBElement<EndpointReferenceType> buildXmlJaxbEndpointDescriptor(com.ebmwebsourcing.addressing.descriptor.Endpoint epr)
               
    static java.lang.String buildXmlStringAgreementdescriptor(Agreement agreementDescriptor)
              Build the XML String from the Agreement descriptor in Java classes form.
    static javax.xml.bind.JAXBContext getJaxbContext()
               
    static javax.xml.bind.Marshaller getMarshaller()
              Get the marshaller instance.
    static javax.xml.bind.Unmarshaller getUnmarshaller()
               
    static void setJaxbContext(javax.xml.bind.JAXBContext jaxbContext)
               
    static void setMarshaller(javax.xml.bind.Marshaller marshaller)
               
    static void validateAgreementDescriptor(java.io.InputStream agreementDescriptorStream)
              Validate the given Agreement descriptor against the EndpointReference schema.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    AGREEMENT_NAMESPACE

    public static final java.lang.String AGREEMENT_NAMESPACE
    Agreeement Namespace

    See Also:
    Constant Field Values

    XSD_AGREEMENT

    public static final java.lang.String XSD_AGREEMENT
    Agreeement schema name

    See Also:
    Constant Field Values

    XSD_AGREEMENT_EXTENSIONS

    public static final java.lang.String XSD_AGREEMENT_EXTENSIONS
    Agreeement Extensions schema name

    See Also:
    Constant Field Values
    Method Detail

    validateAgreementDescriptor

    public static void validateAgreementDescriptor(java.io.InputStream agreementDescriptorStream)
                                            throws AgreementDescriptorException
    Validate the given Agreement descriptor against the EndpointReference schema.

    Parameters:
    EndpointReferenceDescriptorStream -
    Throws:
    EndpointReferenceException - The validation has failed
    EndpointReferenceDescriptorException - Failed to create the validator
    AgreementDescriptorException

    buildJavaAgreementDescriptor

    public static Agreement buildJavaAgreementDescriptor(java.io.InputStream agreementDescriptorStream)
                                                  throws AgreementDescriptorException
    Build the Java bindings from the Agreement descriptor in XML form. The validation against the Agreement schema is processed during the transformation.

    Parameters:
    AgreementDescriptorStream - The Agreement descriptor in XML form
    Returns:
    The root object of the EndpointReference descriptor
    Throws:
    AgreementDescriptorException - The exception raised during the unmarshaller creation or the exception raised during the build of the java bindings.

    buildJavaJAxbAgreementDescriptor

    public static javax.xml.bind.JAXBElement<Agreement> buildJavaJAxbAgreementDescriptor(java.io.InputStream agreementDescriptorStream)
                                                                                  throws AgreementDescriptorException
    Throws:
    AgreementDescriptorException

    buildXmlAgreementDescriptor

    public static org.w3c.dom.Element buildXmlAgreementDescriptor(Agreement agreementDescriptor)
                                                           throws AgreementDescriptorException
    Build the XML nodes from the EndpointReference descriptor in Java classes form.

    Parameters:
    EndpointReferenceDescriptorClass - The EndpointReference Descriptor root class
    EndpointReferenceDescriptorNode - The XML Node to fill with the EndpointReference descriptor XML nodes
    Throws:
    EndpointReferenceDescriptorException - The exception raised during the unmarshaller creation or the exception raised during the build of the XML nodes.
    AgreementDescriptorException

    buildXmlGuaranteeDescriptor

    public static org.w3c.dom.Element buildXmlGuaranteeDescriptor(GuaranteeTermType guarantee)
                                                           throws AgreementDescriptorException
    Throws:
    AgreementDescriptorException

    buildXmlEndpointDescriptor

    public static org.w3c.dom.Element buildXmlEndpointDescriptor(com.ebmwebsourcing.addressing.descriptor.Endpoint epr)
                                                          throws AgreementDescriptorException
    Throws:
    AgreementDescriptorException

    buildXmlJaxbEndpointDescriptor

    public static javax.xml.bind.JAXBElement<EndpointReferenceType> buildXmlJaxbEndpointDescriptor(com.ebmwebsourcing.addressing.descriptor.Endpoint epr)
                                                                                            throws AgreementDescriptorException
    Throws:
    AgreementDescriptorException

    buildXmlStringAgreementdescriptor

    public static java.lang.String buildXmlStringAgreementdescriptor(Agreement agreementDescriptor)
                                                              throws AgreementDescriptorException
    Build the XML String from the Agreement descriptor in Java classes form.

    Parameters:
    AgreementDescriptorClass - The Agreement Descriptor root class
    Returns:
    The String to fill with the Agreement descriptor XML
    Throws:
    AgreementDescriptorException - The exception raised during the marshaller creation or the exception raised during the build of the XML string.

    getMarshaller

    public static javax.xml.bind.Marshaller getMarshaller()
                                                   throws AgreementDescriptorException
    Get the marshaller instance.

    Returns:
    the marshaller instance
    Throws:
    AgreementDescriptorException - The exception raised during the marshaller creation.

    getUnmarshaller

    public static javax.xml.bind.Unmarshaller getUnmarshaller()
                                                       throws AgreementDescriptorException
    Returns:
    the unmarshaller
    Throws:
    AgreementDescriptorException

    setMarshaller

    public static void setMarshaller(javax.xml.bind.Marshaller marshaller)
    Parameters:
    marshaller - the marshaller to set

    getJaxbContext

    public static javax.xml.bind.JAXBContext getJaxbContext()
    Returns:
    the jaxbContext

    setJaxbContext

    public static void setJaxbContext(javax.xml.bind.JAXBContext jaxbContext)
    Parameters:
    jaxbContext - the jaxbContext to set


    Copyright © 2008 eBMWebsourcing. All Rights Reserved.