Search in sources :

Example 36 with RestLiDataValidator

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

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

Example 37 with RestLiDataValidator

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

the class GreetingUpdateBuilder 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 38 with RestLiDataValidator

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

the class GreetingsAuthCreateBuilder method validateInput.

public static ValidationResult validateInput(Greeting input) {
    Map<java.lang.String, List<java.lang.String>> annotations = new HashMap<java.lang.String, List<java.lang.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 39 with RestLiDataValidator

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

the class GreetingsCallbackCreateBuilder 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 40 with RestLiDataValidator

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

the class GreetingsCallbackPartialUpdateRequestBuilder 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.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