// ModelProvider to use for de-typed models
ModelProvider modelProvider = DmrModelProvider.INSTANCE;
// Execute operation for given registered operation handler
BasicResultHandler resultHandler = new BasicResultHandler();
operationHandler.execute(new OperationContextImpl(request, root, runtimeContext, externalContext, bindingProvider, modelProvider), resultHandler);
if (resultHandler.getFailureDescription() != null)
{
return new FailureResponse(modelProvider.newModel().set(resultHandler.getFailureDescription()));
}
else if (resultHandler.getFailure() != null)
{
return new FailureResponse(resultHandler.getFailure());
}
else
{
Object result = resultHandler.getResult();
// Set descriptions based on the ManagedResource so 'dynamic' extensions don't have to.
if (result instanceof ReadResourceModel)
{
ReadResourceModel readResource = (ReadResourceModel) result;