public Builder addActionImport(ActionImport actionImport) { this.actionImportsBuilder.put(actionImport.getName(), actionImport); return this; }
private Object parseActionImport(String actionImportName) throws ODataException { ActionImport actionImport = checkNotNull(entityDataModel.getEntityContainer().getActionImport(actionImportName), "Not able to get the action import {} from entity container", actionImportName); Action action = actionImport.getAction(); Object actionObject; try { actionObject = action.getJavaClass().newInstance(); } catch (ReflectiveOperationException e) { throw new ODataUnmarshallingException("Error during instantiation of action: " + action.getName()); } Set<Parameter> actionParameters = action.getParameters(); Map<String, Object> bodyParameters; try { bodyParameters = parseRequestBody(requestContext.getRequest().getBodyText(UTF_8.name())); } catch (IOException e) { throw new ODataUnmarshallingException("Error during request body parsing", e); } assignParametersToAction(bodyParameters, actionParameters, actionObject); return actionObject; } }
private Object parseActionImport(String actionImportName) throws ODataException { ActionImport actionImport = checkNotNull(entityDataModel.getEntityContainer().getActionImport(actionImportName), "Not able to get the action import {} from entity container", actionImportName); Action action = actionImport.getAction(); Object actionObject; try { actionObject = action.getJavaClass().newInstance(); } catch (ReflectiveOperationException e) { throw new ODataUnmarshallingException("Error during instantiation of action: " + action.getName()); } Set<Parameter> actionParameters = action.getParameters(); Map<String, Object> bodyParameters; try { bodyParameters = parseRequestBody(requestContext.getRequest().getBodyText(UTF_8.name())); } catch (IOException e) { throw new ODataUnmarshallingException("Error during request body parsing", e); } assignParametersToAction(bodyParameters, actionParameters, actionObject); return actionObject; } }
public Builder addActionImport(ActionImport actionImport) { this.actionImportsBuilder.put(actionImport.getName(), actionImport); return this; }