Search in sources :

Example 81 with RestLiDataValidator

use of com.linkedin.restli.common.validation.RestLiDataValidator in project parseq by linkedin.

the class NullGreetingUpdateRequestBuilder method validateInput.

public static ValidationResult validateInput(Greeting input) {
    Map<String, List<String>> annotations = new HashMap<String, List<String>>();
    RestLiDataValidator validator = new RestLiDataValidator(annotations, Greeting.class, ResourceMethod.UPDATE);
    return validator.validateInput(input);
}
Also used : HashMap(java.util.HashMap) RestLiDataValidator(com.linkedin.restli.common.validation.RestLiDataValidator) List(java.util.List)

Example 82 with RestLiDataValidator

use of com.linkedin.restli.common.validation.RestLiDataValidator in project parseq by linkedin.

the class StreamingGreetingsCreateBuilder method validateInput.

public static ValidationResult validateInput(Greeting input) {
    Map<String, List<String>> annotations = new HashMap<String, List<String>>();
    RestLiDataValidator validator = new RestLiDataValidator(annotations, Greeting.class, ResourceMethod.CREATE);
    return validator.validateInput(input);
}
Also used : HashMap(java.util.HashMap) RestLiDataValidator(com.linkedin.restli.common.validation.RestLiDataValidator) List(java.util.List)

Example 83 with RestLiDataValidator

use of com.linkedin.restli.common.validation.RestLiDataValidator in project parseq by linkedin.

the class StreamingGreetingsUpdateBuilder method validateInput.

public static ValidationResult validateInput(Greeting input) {
    Map<String, List<String>> annotations = new HashMap<String, List<String>>();
    RestLiDataValidator validator = new RestLiDataValidator(annotations, Greeting.class, ResourceMethod.UPDATE);
    return validator.validateInput(input);
}
Also used : HashMap(java.util.HashMap) RestLiDataValidator(com.linkedin.restli.common.validation.RestLiDataValidator) List(java.util.List)

Example 84 with RestLiDataValidator

use of com.linkedin.restli.common.validation.RestLiDataValidator in project parseq by linkedin.

the class StringKeysBatchCreateBuilder method validateInput.

public static ValidationResult validateInput(Message input) {
    Map<java.lang.String, List<java.lang.String>> annotations = new HashMap<java.lang.String, List<java.lang.String>>();
    RestLiDataValidator validator = new RestLiDataValidator(annotations, Message.class, ResourceMethod.BATCH_CREATE);
    return validator.validateInput(input);
}
Also used : HashMap(java.util.HashMap) RestLiDataValidator(com.linkedin.restli.common.validation.RestLiDataValidator) List(java.util.List)

Example 85 with RestLiDataValidator

use of com.linkedin.restli.common.validation.RestLiDataValidator in project parseq by linkedin.

the class StringKeysBatchPartialUpdateRequestBuilder method validateInput.

public static ValidationResult validateInput(PatchRequest<Message> patch) {
    Map<java.lang.String, List<java.lang.String>> annotations = new HashMap<java.lang.String, List<java.lang.String>>();
    RestLiDataValidator validator = new RestLiDataValidator(annotations, Message.class, ResourceMethod.BATCH_PARTIAL_UPDATE);
    return validator.validateInput(patch);
}
Also used : HashMap(java.util.HashMap) RestLiDataValidator(com.linkedin.restli.common.validation.RestLiDataValidator) List(java.util.List)

Aggregations

RestLiDataValidator (com.linkedin.restli.common.validation.RestLiDataValidator)229 HashMap (java.util.HashMap)224 List (java.util.List)223 DataMap (com.linkedin.data.DataMap)4 TemplateRuntimeException (com.linkedin.data.template.TemplateRuntimeException)3 ValidationDemo (com.linkedin.restli.examples.greetings.api.ValidationDemo)3 RestLiServiceException (com.linkedin.restli.server.RestLiServiceException)3 Test (org.testng.annotations.Test)3 ValidationResult (com.linkedin.data.schema.validation.ValidationResult)2 ResourceMethod (com.linkedin.restli.common.ResourceMethod)2 QueryParamsDataMap (com.linkedin.restli.internal.common.QueryParamsDataMap)2 Parameter (com.linkedin.restli.internal.server.model.Parameter)2 PagingContext (com.linkedin.restli.server.PagingContext)2 ResourceConfigException (com.linkedin.restli.server.ResourceConfigException)2 RoutingException (com.linkedin.restli.server.RoutingException)2 HeaderParam (com.linkedin.restli.server.annotations.HeaderParam)2 ByteString (com.linkedin.data.ByteString)1 Message (com.linkedin.data.message.Message)1 DataSchema (com.linkedin.data.schema.DataSchema)1 AbstractValidator (com.linkedin.data.schema.validator.AbstractValidator)1