Package org.apache.creadur.whisker.model
Class LicenseTemplateException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.creadur.whisker.model.LicenseTemplateException
- All Implemented Interfaces:
Serializable
Indicates that generating an instance of a license
from the template (for the license family) has failed.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionGets the name of the erroneous license.static LicenseTemplateException
notLicenseTemplate
(Map<String, String> parameters, String licenseName) Builds an instance.static LicenseTemplateException
parameterMismatch
(Collection<String> expectedParameters, Collection<String> actualParameters, String licenseName) Builds an exception indicating that parameter passed do not fulfill expectations.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
parameterMismatch
public static LicenseTemplateException parameterMismatch(Collection<String> expectedParameters, Collection<String> actualParameters, String licenseName) Builds an exception indicating that parameter passed do not fulfill expectations.- Parameters:
expectedParameters
- not nullactualParameters
- not nulllicenseName
- not null- Returns:
- not null
-
notLicenseTemplate
public static LicenseTemplateException notLicenseTemplate(Map<String, String> parameters, String licenseName) Builds an instance.- Parameters:
parameters
- not nulllicenseName
- not null- Returns:
- not null
-
getLicenseName
Gets the name of the erroneous license.- Returns:
- license name, not null
-