@Override protected void addParametersForServerRequest(RequestDetails theRequest, Object[] theParams) { if (myIdParamIndex != null) { theParams[myIdParamIndex] = ParameterUtil.convertIdToType(theRequest.getId(), myIdParamType); } if (myResourceParameterIndex != -1) { IBaseResource resource = ((IBaseResource) theParams[myResourceParameterIndex]); String resourceId = resource.getIdElement().getIdPart(); String urlId = theRequest.getId() != null ? theRequest.getId().getIdPart() : null; if (getContext().getVersion().getVersion().isOlderThan(FhirVersionEnum.DSTU3) == false) { resource.setId(theRequest.getId()); } String matchUrl = null; if (myConditionalUrlIndex != -1) { matchUrl = (String) theParams[myConditionalUrlIndex]; matchUrl = defaultIfBlank(matchUrl, null); } validateResourceIdAndUrlIdForNonConditionalOperation(resource, resourceId, urlId, matchUrl); } }
for (IParameter next : getParameters()) { if (next instanceof ResourceParameter) { resourceParameter = (ResourceParameter) next; myIdParamIndex = ParameterUtil.findIdParameterIndex(theMethod, getContext()); if (myIdParamIndex != null) { myIdParamType = (Class<? extends IIdType>) theMethod.getParameterTypes()[myIdParamIndex];
super.addParametersForServerRequest(theRequest, theParams);
super.addParametersForServerRequest(theRequest, theParams);
@Override protected void addParametersForServerRequest(RequestDetails theRequest, Object[] theParams) { if (myIdParamIndex != null) { theParams[myIdParamIndex] = ParameterUtil.convertIdToType(theRequest.getId(), myIdParamType); } if (myResourceParameterIndex != -1) { IBaseResource resource = ((IBaseResource) theParams[myResourceParameterIndex]); String resourceId = resource.getIdElement().getIdPart(); String urlId = theRequest.getId() != null ? theRequest.getId().getIdPart() : null; if (getContext().getVersion().getVersion().isOlderThan(FhirVersionEnum.DSTU3) == false) { resource.setId(theRequest.getId()); } String matchUrl = null; if (myConditionalUrlIndex != -1) { matchUrl = (String) theParams[myConditionalUrlIndex]; matchUrl = defaultIfBlank(matchUrl, null); } validateResourceIdAndUrlIdForNonConditionalOperation(resource, resourceId, urlId, matchUrl); } }
for (IParameter next : getParameters()) { if (next instanceof ResourceParameter) { resourceParameter = (ResourceParameter) next; myIdParamIndex = ParameterUtil.findIdParameterIndex(theMethod, getContext()); if (myIdParamIndex != null) { myIdParamType = (Class<? extends IIdType>) theMethod.getParameterTypes()[myIdParamIndex];