@Override protected void populateActionRequestDetailsForInterceptor(RequestDetails theRequestDetails, ActionRequestDetails theDetails, Object[] theMethodParams) { super.populateActionRequestDetailsForInterceptor(theRequestDetails, theDetails, theMethodParams); /* * If the method has no parsed resource parameter, we parse here in order to have something for the interceptor. */ if (myResourceParameterIndex != -1) { theDetails.setResource((IBaseResource) theMethodParams[myResourceParameterIndex]); } else { theDetails.setResource(ResourceParameter.parseResourceFromRequest(theRequestDetails, this, myResourceType)); } }
@Override public Object translateQueryParametersIntoServerArgument(RequestDetails theRequest, BaseMethodBinding<?> theMethodBinding) throws InternalErrorException, InvalidRequestException { switch (myMode) { case BODY: try { return IOUtils.toString(createRequestReader(theRequest)); } catch (IOException e) { // Shouldn't happen since we're reading from a byte array throw new InternalErrorException("Failed to load request", e); } case BODY_BYTE_ARRAY: return theRequest.loadRequestContents(); case ENCODING: return RestfulServerUtils.determineRequestEncodingNoDefault(theRequest); case RESOURCE: default: Class<? extends IBaseResource> resourceTypeToParse = myResourceType; if (myMethodIsOperation) { // Operations typically have a Parameters resource as the body resourceTypeToParse = null; } return parseResourceFromRequest(theRequest, theMethodBinding, resourceTypeToParse); } // } }
@Override protected void populateActionRequestDetailsForInterceptor(RequestDetails theRequestDetails, ActionRequestDetails theDetails, Object[] theMethodParams) { super.populateActionRequestDetailsForInterceptor(theRequestDetails, theDetails, theMethodParams); /* * If the method has no parsed resource parameter, we parse here in order to have something for the interceptor. */ if (myTransactionParamIndex != -1) { theDetails.setResource((IBaseResource) theMethodParams[myTransactionParamIndex]); } else { Class<? extends IBaseResource> resourceType = getContext().getResourceDefinition("Bundle").getImplementingClass(); theDetails.setResource(ResourceParameter.parseResourceFromRequest(theRequestDetails, this, resourceType)); } }
@Override protected void populateActionRequestDetailsForInterceptor(RequestDetails theRequestDetails, ActionRequestDetails theDetails, Object[] theMethodParams) { super.populateActionRequestDetailsForInterceptor(theRequestDetails, theDetails, theMethodParams); /* * If the method has no parsed resource parameter, we parse here in order to have something for the interceptor. */ if (myResourceParameterIndex != -1) { theDetails.setResource((IBaseResource) theMethodParams[myResourceParameterIndex]); } else { theDetails.setResource(ResourceParameter.parseResourceFromRequest(theRequestDetails, this, myResourceType)); } }
@Override public Object translateQueryParametersIntoServerArgument(RequestDetails theRequest, BaseMethodBinding<?> theMethodBinding) throws InternalErrorException, InvalidRequestException { switch (myMode) { case BODY: try { return IOUtils.toString(createRequestReader(theRequest)); } catch (IOException e) { // Shouldn't happen since we're reading from a byte array throw new InternalErrorException("Failed to load request", e); } case BODY_BYTE_ARRAY: return theRequest.loadRequestContents(); case ENCODING: return RestfulServerUtils.determineRequestEncodingNoDefault(theRequest); case RESOURCE: default: Class<? extends IBaseResource> resourceTypeToParse = myResourceType; if (myMethodIsOperation) { // Operations typically have a Parameters resource as the body resourceTypeToParse = null; } return parseResourceFromRequest(theRequest, theMethodBinding, resourceTypeToParse); } // } }
@Override protected void populateActionRequestDetailsForInterceptor(RequestDetails theRequestDetails, ActionRequestDetails theDetails, Object[] theMethodParams) { super.populateActionRequestDetailsForInterceptor(theRequestDetails, theDetails, theMethodParams); /* * If the method has no parsed resource parameter, we parse here in order to have something for the interceptor. */ if (myTransactionParamIndex != -1) { theDetails.setResource((IBaseResource) theMethodParams[myTransactionParamIndex]); } else { Class<? extends IBaseResource> resourceType = getContext().getResourceDefinition("Bundle").getImplementingClass(); theDetails.setResource(ResourceParameter.parseResourceFromRequest(theRequestDetails, this, resourceType)); } }