Search in sources :

Example 1 with UpdateResponseBuilder

use of com.linkedin.restli.internal.server.response.UpdateResponseBuilder in project rest.li by linkedin.

the class MethodAdapterRegistry method buildResponseBuilders.

private Map<ResourceMethod, RestLiResponseBuilder> buildResponseBuilders(ErrorResponseBuilder errorResponseBuilder) {
    Map<ResourceMethod, RestLiResponseBuilder> result = new HashMap<ResourceMethod, RestLiResponseBuilder>(ResourceMethod.values().length);
    result.put(ResourceMethod.GET, new GetResponseBuilder());
    result.put(ResourceMethod.BATCH_GET, new BatchGetResponseBuilder(errorResponseBuilder));
    result.put(ResourceMethod.FINDER, new CollectionResponseBuilder());
    result.put(ResourceMethod.CREATE, new CreateResponseBuilder());
    result.put(ResourceMethod.PARTIAL_UPDATE, new UpdateResponseBuilder());
    result.put(ResourceMethod.UPDATE, new UpdateResponseBuilder());
    result.put(ResourceMethod.DELETE, new UpdateResponseBuilder());
    result.put(ResourceMethod.ACTION, new ActionResponseBuilder());
    result.put(ResourceMethod.BATCH_UPDATE, new BatchUpdateResponseBuilder(errorResponseBuilder));
    result.put(ResourceMethod.BATCH_PARTIAL_UPDATE, new BatchUpdateResponseBuilder(errorResponseBuilder));
    result.put(ResourceMethod.BATCH_CREATE, new BatchCreateResponseBuilder(errorResponseBuilder));
    result.put(ResourceMethod.BATCH_DELETE, new BatchUpdateResponseBuilder(errorResponseBuilder));
    result.put(ResourceMethod.GET_ALL, new CollectionResponseBuilder());
    return Collections.unmodifiableMap(result);
}
Also used : BatchGetResponseBuilder(com.linkedin.restli.internal.server.response.BatchGetResponseBuilder) ActionResponseBuilder(com.linkedin.restli.internal.server.response.ActionResponseBuilder) HashMap(java.util.HashMap) BatchUpdateResponseBuilder(com.linkedin.restli.internal.server.response.BatchUpdateResponseBuilder) UpdateResponseBuilder(com.linkedin.restli.internal.server.response.UpdateResponseBuilder) BatchUpdateResponseBuilder(com.linkedin.restli.internal.server.response.BatchUpdateResponseBuilder) CollectionResponseBuilder(com.linkedin.restli.internal.server.response.CollectionResponseBuilder) BatchCreateResponseBuilder(com.linkedin.restli.internal.server.response.BatchCreateResponseBuilder) CreateResponseBuilder(com.linkedin.restli.internal.server.response.CreateResponseBuilder) BatchCreateResponseBuilder(com.linkedin.restli.internal.server.response.BatchCreateResponseBuilder) BatchGetResponseBuilder(com.linkedin.restli.internal.server.response.BatchGetResponseBuilder) GetResponseBuilder(com.linkedin.restli.internal.server.response.GetResponseBuilder) RestLiResponseBuilder(com.linkedin.restli.internal.server.response.RestLiResponseBuilder) ResourceMethod(com.linkedin.restli.common.ResourceMethod)

Aggregations

ResourceMethod (com.linkedin.restli.common.ResourceMethod)1 ActionResponseBuilder (com.linkedin.restli.internal.server.response.ActionResponseBuilder)1 BatchCreateResponseBuilder (com.linkedin.restli.internal.server.response.BatchCreateResponseBuilder)1 BatchGetResponseBuilder (com.linkedin.restli.internal.server.response.BatchGetResponseBuilder)1 BatchUpdateResponseBuilder (com.linkedin.restli.internal.server.response.BatchUpdateResponseBuilder)1 CollectionResponseBuilder (com.linkedin.restli.internal.server.response.CollectionResponseBuilder)1 CreateResponseBuilder (com.linkedin.restli.internal.server.response.CreateResponseBuilder)1 GetResponseBuilder (com.linkedin.restli.internal.server.response.GetResponseBuilder)1 RestLiResponseBuilder (com.linkedin.restli.internal.server.response.RestLiResponseBuilder)1 UpdateResponseBuilder (com.linkedin.restli.internal.server.response.UpdateResponseBuilder)1 HashMap (java.util.HashMap)1