javax.validation.Payload Java Examples

The following examples show how to use javax.validation.Payload. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MockConstraintViolation.java    From lastaflute with Apache License 2.0 4 votes vote down vote up
@Required
@Override
public ConstraintDescriptor<?> getConstraintDescriptor() {
    String methodName = "getConstraintDescriptor";
    Method method;
    try {
        method = MockConstraintViolation.class.getMethod(methodName, new Class<?>[] {});
    } catch (NoSuchMethodException | SecurityException e) {
        throw new IllegalStateException("Failed to get the method: " + methodName, e);
    }
    Required annotation = method.getAnnotation(Required.class);
    return new ConstraintDescriptor<Annotation>() {

        @Override
        public Annotation getAnnotation() {
            return annotation;
        }

        @Override
        public String getMessageTemplate() {
            return null;
        }

        @Override
        public Set<Class<?>> getGroups() {
            return DfCollectionUtil.newHashSet(ClientError.class);
        }

        @Override
        public Set<Class<? extends Payload>> getPayload() {
            return null;
        }

        @Override
        public ConstraintTarget getValidationAppliesTo() {
            return null;
        }

        @Override
        public List<Class<? extends ConstraintValidator<Annotation, ?>>> getConstraintValidatorClasses() {
            return null;
        }

        @Override
        public Map<String, Object> getAttributes() {
            return null;
        }

        @Override
        public Set<ConstraintDescriptor<?>> getComposingConstraints() {
            return null;
        }

        @Override
        public boolean isReportAsSingleViolation() {
            return false;
        }

        @Override
        public ValidateUnwrappedValue getValueUnwrapping() {
            return null;
        }

        @Override
        public <U> U unwrap(Class<U> type) {
            return null;
        }
    };
}
 
Example #2
Source File: AbstractValidatorTest.java    From cloudbreak with Apache License 2.0 4 votes vote down vote up
@Override
public Set<Class<? extends Payload>> getPayload() {
    return Collections.emptySet();
}
 
Example #3
Source File: NetworkConfigurationValidatorTest.java    From cloudbreak with Apache License 2.0 4 votes vote down vote up
@Override
public Set<Class<? extends Payload>> getPayload() {
    return Collections.emptySet();
}
 
Example #4
Source File: UpdateStackRequestValidatorTest.java    From cloudbreak with Apache License 2.0 4 votes vote down vote up
@Override
public Set<Class<? extends Payload>> getPayload() {
    return Collections.emptySet();
}