public class ContentTypeConstraint extends Constraint
mErrorMessage
Constructor and Description |
---|
ContentTypeConstraint(String pErrorMessage,
Set<String> pAllowedContentTypes)
Creates a new Constraint for checking a allowed content-types
|
Modifier and Type | Method and Description |
---|---|
Set<String> |
getAllowedContentTypes() |
boolean |
isValid(Object pValue)
Check if the given content-type is allowed.
|
describeError, equals, hashCode, toString
public boolean isValid(Object pValue)
isValid
in class Constraint
pValue
- the content-type. May be null
.© 1998- 2018 Stibo DX