public class ModelProcessorUtil extends Object
model processors.| Modifier and Type | Class and Description |
|---|---|
static class |
ModelProcessorUtil.Method
Method bean containing basic information about enhancing resource method.
|
| Constructor and Description |
|---|
ModelProcessorUtil() |
| Modifier and Type | Method and Description |
|---|---|
static ResourceModel.Builder |
enhanceResourceModel(ResourceModel resourceModel,
boolean subResourceModel,
List<ModelProcessorUtil.Method> methods)
Enhance
resourceModel by list of methods. |
static Set<String> |
getAllowedMethods(RuntimeResource resource)
Return allowed methods for the given
resource. |
public static Set<String> getAllowedMethods(RuntimeResource resource)
resource. OPTIONS and HEAD are always returned in the result.resource - Resource for which resource methods should be found.public static ResourceModel.Builder enhanceResourceModel(ResourceModel resourceModel, boolean subResourceModel, List<ModelProcessorUtil.Method> methods)
resourceModel by list of methods. The resourceModel is traversed and for each available endpoint
URI in the model methods are added. In case of method conflicts currently existing methods will
never be 'overriden' by any method from methods. Overriding check takes into account media types of methods so
that new resource methods with same HTTP method can define only more specific media type.resourceModel - Resource model to be enhanced.subResourceModel - true if the resourceModel to be enhanced is a sub resource model, false
if it is application resource model.methods - List of enhancing methods.methods.Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.