Search in sources :

Example 66 with RestLiDataValidator

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

the class GreetingsTaskBatchCreateBuilder 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.BATCH_CREATE);
    return validator.validateInput(input);
}
Also used : HashMap(java.util.HashMap) RestLiDataValidator(com.linkedin.restli.common.validation.RestLiDataValidator) List(java.util.List)

Example 67 with RestLiDataValidator

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

the class GreetingsTaskBatchPartialUpdateBuilder method validateInput.

public static ValidationResult validateInput(PatchRequest<Greeting> patch) {
    Map<String, List<String>> annotations = new HashMap<String, List<String>>();
    RestLiDataValidator validator = new RestLiDataValidator(annotations, Greeting.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)

Example 68 with RestLiDataValidator

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

the class GreetingsTaskBatchPartialUpdateRequestBuilder method validateInput.

public static ValidationResult validateInput(PatchRequest<Greeting> patch) {
    Map<String, List<String>> annotations = new HashMap<String, List<String>>();
    RestLiDataValidator validator = new RestLiDataValidator(annotations, Greeting.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)

Example 69 with RestLiDataValidator

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

the class GreetingsTaskBatchUpdateBuilder 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.BATCH_UPDATE);
    return validator.validateInput(input);
}
Also used : HashMap(java.util.HashMap) RestLiDataValidator(com.linkedin.restli.common.validation.RestLiDataValidator) List(java.util.List)

Example 70 with RestLiDataValidator

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

the class GreetingsTaskCreateRequestBuilder 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)

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