Package com.helger.commons.thirdparty
Class ThirdPartyModule
- java.lang.Object
-
- com.helger.commons.thirdparty.ThirdPartyModule
-
- All Implemented Interfaces:
IHasDisplayName,IThirdPartyModule,IHasVersion
@Immutable public final class ThirdPartyModule extends Object implements IThirdPartyModule
The default implementation of theIThirdPartyModuleinterface.- Author:
- Philip Helger
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_OPTIONALBy default a third-party module is not optional
-
Constructor Summary
Constructors Constructor Description ThirdPartyModule(IThirdPartyModule aOther, boolean bOptional)ThirdPartyModule(String sDisplayName, String sCopyrightOwner, ILicense aLicense)ThirdPartyModule(String sDisplayName, String sCopyrightOwner, ILicense aLicense, boolean bOptional)ThirdPartyModule(String sDisplayName, String sCopyrightOwner, ILicense aLicense, Version aVersion, String sWebsiteURL)ThirdPartyModule(String sDisplayName, String sCopyrightOwner, ILicense aLicense, Version aVersion, String sWebsiteURL, boolean bOptional)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)ThirdPartyModulegetAsNonOptionalCopy()ThirdPartyModulegetAsOptionalCopy()StringgetCopyrightOwner()StringgetDisplayName()ILicensegetLicense()VersiongetVersion()StringgetWebSiteURL()inthashCode()booleanisOptional()StringtoString()
-
-
-
Field Detail
-
DEFAULT_OPTIONAL
public static final boolean DEFAULT_OPTIONAL
By default a third-party module is not optional- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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)
-
-
Method Detail
-
getDisplayName
@Nonnull @Nonempty public String getDisplayName()
- Specified by:
getDisplayNamein interfaceIHasDisplayName- Returns:
- The display name of this object. Should never be
null.
-
getCopyrightOwner
@Nonnull @Nonempty public String getCopyrightOwner()
- Specified by:
getCopyrightOwnerin interfaceIThirdPartyModule- Returns:
- The copyright owner of this module. May not be
null.
-
getLicense
@Nonnull public ILicense getLicense()
- Specified by:
getLicensein interfaceIThirdPartyModule- Returns:
- The license used by this module. May not be
null.
-
getVersion
@Nullable public Version getVersion()
- Specified by:
getVersionin interfaceIHasVersion- Specified by:
getVersionin interfaceIThirdPartyModule- Returns:
- The optional version of this product. May be
nullbecause this means another place where the version number needs to be maintained.
-
getWebSiteURL
@Nullable public String getWebSiteURL()
- Specified by:
getWebSiteURLin interfaceIThirdPartyModule- Returns:
- The optional web site of the module. May be
null.
-
isOptional
public boolean isOptional()
- Specified by:
isOptionalin interfaceIThirdPartyModule- Returns:
trueif this is an optional thirdparty module,falseif it is required.
-
getAsOptionalCopy
@Nonnull public ThirdPartyModule getAsOptionalCopy()
- Specified by:
getAsOptionalCopyin interfaceIThirdPartyModule- Returns:
- A copy of this module but being optional. If this module is already
optional,
thisis returned.
-
getAsNonOptionalCopy
@Nonnull public ThirdPartyModule getAsNonOptionalCopy()
- Specified by:
getAsNonOptionalCopyin interfaceIThirdPartyModule- Returns:
- A copy of this module but without being optional. If this module is
not optional,
thisis returned.
-
-