public class LinkContentTypeConstraint extends Constraint
Link's
mime type (Link.mMimeType
).Modifier and Type | Field and Description |
---|---|
static String |
ALL_MIMETYPES |
mErrorMessage
Constructor and Description |
---|
LinkContentTypeConstraint(String pErrorMessage,
Set<String> pAllowedContentTypes)
Creates a new Constraint for checking a @
Link's mime types. |
Modifier and Type | Method and Description |
---|---|
String |
describeError(Object pValue) |
Set<MIMEType> |
getAllowedContentTypes() |
boolean |
isValid(Object pValue)
Check if the given Link's
Link.mMimeType (/mime type) is allowed. |
equals, hashCode, toString
public static final String ALL_MIMETYPES
public boolean isValid(Object pValue)
Link.mMimeType
(/mime type) is allowed.isValid
in class Constraint
pValue
- the Link. May be null
.Link.mMimeType
is among the allowed mime types.public String describeError(Object pValue)
describeError
in class Constraint
© 1998- 2018 Stibo DX