Class SMLInfo

java.lang.Object
com.helger.peppol.sml.SMLInfo
All Implemented Interfaces:
com.helger.base.clone.ICloneable<SMLInfo>, com.helger.base.id.IHasID<String>, com.helger.base.name.IHasDisplayName, com.helger.base.type.IHasObjectType, com.helger.base.type.ITypedObject<String>, ISMLInfo, Serializable

@Immutable public class SMLInfo extends Object implements ISMLInfo, com.helger.base.clone.ICloneable<SMLInfo>
Use instances of this class if you're not happy with the ESML enumeration value but need an instance of ISMLInfo.
Author:
Philip Helger
See Also:
  • Field Details

    • DEFAULT_SUFFIX_MANAGE_SMP

      public static final String DEFAULT_SUFFIX_MANAGE_SMP
      See Also:
    • DEFAULT_SUFFIX_MANAGE_PARTICIPANT

      public static final String DEFAULT_SUFFIX_MANAGE_PARTICIPANT
      See Also:
    • DEFAULT_CLIENT_CERTIFICATE_REQUIRED

      public static final boolean DEFAULT_CLIENT_CERTIFICATE_REQUIRED
      See Also:
    • OT

      public static final com.helger.base.type.ObjectType OT
  • Constructor Details

    • SMLInfo

      @Deprecated(forRemoval=true, since="12.1.0") public SMLInfo(@NonNull ISMLInfo aOther)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use the build instead
      Copy constructor.
      Parameters:
      aOther - The object to copy from. May not be null.
    • SMLInfo

      @Deprecated(forRemoval=true, since="12.1.0") public SMLInfo(@Nonempty @NonNull @Nonempty String sDisplayName, @Nonempty @NonNull @Nonempty String sDNSZone, @Nonempty @NonNull @Nonempty String sManagementServiceURL, boolean bClientCertificateRequired)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use the builder instead
      Parameters:
      sDisplayName - The "shorthand" display name like "SML" or "SMK". May neither be null nor empty.
      sDNSZone - The DNS zone on which this SML is operating. May not be null. It must be ensured that the value consists only of lower case characters for comparability! Example: sml.peppolcentral.org
      sManagementServiceURL - The service URL where the management application is running on incl. the host name. May not be null. The difference to the host name is the eventually present context path.
      bClientCertificateRequired - true if this SML requires a client certificate for access, false otherwise. Both production SML and SMK require a client certificate. Only a locally running SML software may not require a client certificate.
    • SMLInfo

      @Deprecated(forRemoval=true, since="12.1.0") public SMLInfo(@Nonempty @NonNull @Nonempty String sID, @Nonempty @NonNull @Nonempty String sDisplayName, @Nonempty @NonNull @Nonempty String sDNSZone, @Nonempty @NonNull @Nonempty String sManagementServiceURL, boolean bClientCertificateRequired)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use the builder instead
      Parameters:
      sID - Object ID. May neither be null nor empty.
      sDisplayName - The "shorthand" display name like "SML" or "SMK". May neither be null nor empty.
      sDNSZone - The DNS zone on which this SML is operating. May not be null. It must be ensured that the value consists only of lower case characters for comparability! Example: sml.peppolcentral.org
      sManagementServiceURL - The service URL where the management application is running on incl. the host name. May not be null. The difference to the host name is the eventually present context path.
      bClientCertificateRequired - true if this SML requires a client certificate for access, false otherwise. Both production SML and SMK require a client certificate. Only a locally running SML software may not require a client certificate.
    • SMLInfo

      protected SMLInfo(@Nonempty @NonNull @Nonempty String sID, @Nonempty @NonNull @Nonempty String sDisplayName, @Nonempty @NonNull @Nonempty String sDNSZone, @Nonempty @NonNull @Nonempty String sManagementServiceURL, @NonNull String sURLSuffixManageSMP, @NonNull String sURLSuffixManageParticipant, boolean bClientCertificateRequired)
      Parameters:
      sID - Object ID. May neither be null nor empty.
      sDisplayName - The "shorthand" display name like "SML" or "SMK". May neither be null nor empty.
      sDNSZone - The DNS zone on which this SML is operating. May not be null. It must be ensured that the value consists only of lower case characters for comparability! Example: sml.peppolcentral.org
      sManagementServiceURL - The service URL where the management application is running on incl. the host name. May not be null. The difference to the host name is the eventually present context path.
      sURLSuffixManageSMP - The sub-path to be used for managing SMP data in the SML. May not be null, may be empty. If not empty it must start with a slash ("/").
      sURLSuffixManageParticipant - The sub-path to be used for managing participant data in the SML. May not be null, may be empty. If not empty it must start with a slash ("/").
      bClientCertificateRequired - true if this SML requires a client certificate for access, false otherwise. Both production SML and SMK require a client certificate. Only a locally running SML software may not require a client certificate.
      Throws:
      IllegalArgumentException - If the manage service URLs cannot be created
  • Method Details

    • getObjectType

      public @NonNull com.helger.base.type.ObjectType getObjectType()
      Specified by:
      getObjectType in interface com.helger.base.type.IHasObjectType
    • getID

      @Nonempty public @NonNull @Nonempty String getID()
      Specified by:
      getID in interface com.helger.base.id.IHasID<String>
    • getDisplayName

      @Nonempty public @NonNull @Nonempty String getDisplayName()
      Specified by:
      getDisplayName in interface com.helger.base.name.IHasDisplayName
      Specified by:
      getDisplayName in interface ISMLInfo
      Returns:
      The "shorthand" display name like "SML" or "SMK".
    • getDNSZone

      @Nonempty public @NonNull @Nonempty String getDNSZone()
      Specified by:
      getDNSZone in interface ISMLInfo
      Returns:
      The DNS zone on which this SML is operating. Never null. It must be ensured that the value consists only of lower case characters!
      Example: sml.peppolcentral.org
    • getManagementServiceURL

      @Nonempty public @NonNull @Nonempty String getManagementServiceURL()
      Specified by:
      getManagementServiceURL in interface ISMLInfo
      Returns:
      The service URL where the management application is running on including the host name. Never null. The difference to the host name is the eventually present context path. This path may never end with a slash.
    • getURLSuffixManageSMP

      public @NonNull String getURLSuffixManageSMP()
      Specified by:
      getURLSuffixManageSMP in interface ISMLInfo
      Returns:
      The relative sub path for managing the service metadata on the SML server. If not empty, it must start with a slash ('/'). May not be null but maybe empty.
    • getManageServiceMetaDataEndpointAddress

      public @NonNull URL getManageServiceMetaDataEndpointAddress()
      Specified by:
      getManageServiceMetaDataEndpointAddress in interface ISMLInfo
      Returns:
      The service endpoint URL to manage SMP meta data. Never null. This is usually the URL corresponding to ISMLInfo.getManagementServiceURL() + ISMLInfo.getURLSuffixManageSMP()
    • getURLSuffixManageParticipant

      public @NonNull String getURLSuffixManageParticipant()
      Specified by:
      getURLSuffixManageParticipant in interface ISMLInfo
      Returns:
      The relative sub path for managing the participants on the SML server. If not empty, it must start with a slash ('/'). May not be null but maybe empty.
    • getManageParticipantIdentifierEndpointAddress

      public @NonNull URL getManageParticipantIdentifierEndpointAddress()
      Specified by:
      getManageParticipantIdentifierEndpointAddress in interface ISMLInfo
      Returns:
      The service endpoint URL to manage participant identifiers. Never null. This is usually the URL corresponding to ISMLInfo.getManagementServiceURL() + ISMLInfo.getURLSuffixManageParticipant()
    • isClientCertificateRequired

      public boolean isClientCertificateRequired()
      Specified by:
      isClientCertificateRequired in interface ISMLInfo
      Returns:
      true if this SML requires a client certificate for access, false otherwise. Both PEPPOL production SML and SMK require a client certificate. Only a locally running SML software may not require a client certificate.
    • getClone

      @ReturnsMutableCopy public @NonNull SMLInfo getClone()
      Specified by:
      getClone in interface com.helger.base.clone.ICloneable<SMLInfo>
    • 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
    • builder

      public static @NonNull SMLInfo.SMLInfoBuilder builder()
      Returns:
      A new empty builder. Never null.
      Since:
      12.1.0
    • builder

      public static @NonNull SMLInfo.SMLInfoBuilder builder(@NonNull ISMLInfo aInfo)
      Parameters:
      aInfo - The object to use as the basis for the builder. May not be null.
      Returns:
      A new builder that is prefilled with the data of the parameter object. Never null.
      Since:
      12.1.0
    • isValidURLSuffix

      public static boolean isValidURLSuffix(@NonNull String s)