Class ThirdPartyModule

java.lang.Object
com.helger.base.thirdparty.ThirdPartyModule
All Implemented Interfaces:
IHasDisplayName, IThirdPartyModule, IHasVersion

@Immutable public final class ThirdPartyModule extends Object implements IThirdPartyModule
The default implementation of the IThirdPartyModule interface.
Author:
Philip Helger
  • Field Details

    • DEFAULT_OPTIONAL

      public static final boolean DEFAULT_OPTIONAL
      By default a third-party module is not optional
      See Also:
  • Constructor Details

    • ThirdPartyModule

      public ThirdPartyModule(@Nonnull IThirdPartyModule aOther, boolean bOptional)
    • ThirdPartyModule

      public ThirdPartyModule(@Nonnull @Nonempty String sDisplayName, @Nonnull @Nonempty String sCopyrightOwner, @Nonnull ILicense aLicense)
    • ThirdPartyModule

      public ThirdPartyModule(@Nonnull @Nonempty String sDisplayName, @Nonnull @Nonempty String sCopyrightOwner, @Nonnull ILicense aLicense, boolean bOptional)
    • ThirdPartyModule

      public ThirdPartyModule(@Nonnull @Nonempty String sDisplayName, @Nonnull @Nonempty String sCopyrightOwner, @Nonnull ILicense aLicense, @Nullable Version aVersion, @Nullable String sWebsiteURL)
    • ThirdPartyModule

      public ThirdPartyModule(@Nonnull @Nonempty String sDisplayName, @Nonnull @Nonempty String sCopyrightOwner, @Nonnull ILicense aLicense, @Nullable Version aVersion, @Nullable String sWebsiteURL, boolean bOptional)
  • Method Details

    • getDisplayName

      @Nonnull @Nonempty public String getDisplayName()
      Specified by:
      getDisplayName in interface IHasDisplayName
      Returns:
      The display name of this object. Should never be null.
    • getCopyrightOwner

      @Nonnull @Nonempty public String getCopyrightOwner()
      Specified by:
      getCopyrightOwner in interface IThirdPartyModule
      Returns:
      The copyright owner of this module. May not be null.
    • getLicense

      @Nonnull public ILicense getLicense()
      Specified by:
      getLicense in interface IThirdPartyModule
      Returns:
      The license used by this module. May not be null.
    • getVersion

      @Nullable public Version getVersion()
      Specified by:
      getVersion in interface IHasVersion
      Specified by:
      getVersion in interface IThirdPartyModule
      Returns:
      The optional version of this product. May be null because this means another place where the version number needs to be maintained.
    • getWebSiteURL

      @Nullable public String getWebSiteURL()
      Specified by:
      getWebSiteURL in interface IThirdPartyModule
      Returns:
      The optional web site of the module. May be null.
    • isOptional

      public boolean isOptional()
      Specified by:
      isOptional in interface IThirdPartyModule
      Returns:
      true if this is an optional thirdparty module, false if it is required.
    • getAsOptionalCopy

      @Nonnull public ThirdPartyModule getAsOptionalCopy()
      Specified by:
      getAsOptionalCopy in interface IThirdPartyModule
      Returns:
      A copy of this module but being optional. If this module is already optional, this is returned.
    • getAsNonOptionalCopy

      @Nonnull public ThirdPartyModule getAsNonOptionalCopy()
      Specified by:
      getAsNonOptionalCopy in interface IThirdPartyModule
      Returns:
      A copy of this module but without being optional. If this module is not optional, this is returned.
    • 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