Class SMPExtension

java.lang.Object
com.helger.smpclient.extension.SMPExtension

@NotThreadSafe @MustImplementEqualsAndHashcode public class SMPExtension extends Object
This class contains a generic extension that works for Peppol SMP, OASIS BDXR SMP v1 and OASIS BDXR SMP v2.
Since:
8.7.3
Author:
Philip Helger
  • Field Details

  • Constructor Details

    • SMPExtension

      public SMPExtension()
  • Method Details

    • getExtensionID

      @Nullable public String getExtensionID()
      Returns:
      the value of the extensionID property. May be null.
    • setExtensionID

      @Nonnull public SMPExtension setExtensionID(@Nullable String value)
      Sets the value of the extensionID property.
      Parameters:
      value - May be null.
      Returns:
      this for chaining
    • getExtensionName

      @Nullable public String getExtensionName()
      Returns:
      the value of the extensionName property.
    • setExtensionName

      @Nonnull public SMPExtension setExtensionName(@Nullable String value)
      Sets the value of the extensionName property.
      Parameters:
      value - May be null.
      Returns:
      this for chaining
    • getExtensionAgencyID

      @Nullable public String getExtensionAgencyID()
      Returns:
      the value of the extensionAgencyID property.
    • setExtensionAgencyID

      @Nonnull public SMPExtension setExtensionAgencyID(@Nullable String value)
      Sets the value of the extensionAgencyID property.
      Parameters:
      value - May be null.
      Returns:
      this for chaining
    • getExtensionAgencyName

      @Nullable public String getExtensionAgencyName()
      Returns:
      the value of the extensionAgencyName property.
    • setExtensionAgencyName

      @Nonnull public SMPExtension setExtensionAgencyName(@Nullable String value)
      Sets the value of the extensionAgencyName property.
      Parameters:
      value - May be null.
      Returns:
      this for chaining
    • getExtensionAgencyURI

      @Nullable public String getExtensionAgencyURI()
      Returns:
      the value of the extensionAgencyURI property.
    • setExtensionAgencyURI

      @Nonnull public SMPExtension setExtensionAgencyURI(@Nullable String value)
      Sets the value of the extensionAgencyURI property.
      Parameters:
      value - May be null.
      Returns:
      this for chaining
    • getExtensionVersionID

      @Nullable public String getExtensionVersionID()
      Returns:
      the value of the extensionVersionID property.
    • setExtensionVersionID

      @Nonnull public SMPExtension setExtensionVersionID(@Nullable String value)
      Sets the value of the extensionVersionID property.
      Parameters:
      value - May be null.
      Returns:
      this for chaining
    • getExtensionURI

      @Nullable public String getExtensionURI()
      Returns:
      the value of the extensionURI property.
    • setExtensionURI

      @Nonnull public SMPExtension setExtensionURI(@Nullable String value)
      Sets the value of the extensionURI property.
      Parameters:
      value - May be null.
      Returns:
      this for chaining
    • getExtensionReasonCode

      @Nullable public String getExtensionReasonCode()
      Returns:
      the value of the extensionReasonCode property.
    • setExtensionReasonCode

      @Nonnull public SMPExtension setExtensionReasonCode(@Nullable String value)
      Sets the value of the extensionReasonCode property.
      Parameters:
      value - May be null.
      Returns:
      this for chaining
    • getExtensionReason

      @Nullable public String getExtensionReason()
      Returns:
      the value of the extensionReason property.
    • setExtensionReason

      @Nonnull public SMPExtension setExtensionReason(@Nullable String value)
      Sets the value of the extensionReason property.
      Parameters:
      value - May be null.
      Returns:
      this for chaining
    • getAny

      @Nullable public Element getAny()
      Returns:
      the value of the any property.
    • setAny

      @Nonnull public SMPExtension setAny(@Nullable Element value)
      Sets the value of the any property.
      Parameters:
      value - May be null.
      Returns:
      this for chaining
    • getAsJsonObject

      @Nullable public com.helger.json.IJsonObject getAsJsonObject()
      Returns:
      A JSON representation of the extension object or null if no property is set.
    • getAsPeppolExtension

      @Nullable @ReturnsMutableCopy public com.helger.xsds.peppol.smp1.ExtensionType getAsPeppolExtension()
    • getAsBDXRExtension

      @Nonnull public com.helger.xsds.bdxr.smp1.ExtensionType getAsBDXRExtension()
    • getAsBDXR2Extension

      @Nonnull public com.helger.xsds.bdxr.smp2.ec.SMPExtensionType getAsBDXR2Extension()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • ofJson

      @Nullable public static SMPExtension ofJson(@Nullable com.helger.json.IJsonObject aObject)
    • ofXML

      @Nullable public static SMPExtension ofXML(@Nullable String sXML)
    • ofBDXR1

      @Nullable public static SMPExtension ofBDXR1(@Nullable com.helger.xsds.bdxr.smp1.ExtensionType aExt)
    • ofBDXR2

      @Nullable public static SMPExtension ofBDXR2(@Nullable com.helger.xsds.bdxr.smp2.ec.SMPExtensionType aExt)