public void setTargetResourceUrl(IIdType theTargetResourceUrl) { Validate.isTrue(theTargetResourceUrl.hasBaseUrl()); Validate.isTrue(theTargetResourceUrl.hasResourceType()); if (theTargetResourceUrl.hasIdPart()) { // do nothing } else { // Must have set an url like http://example.org/something // We treat 'something' as the resource type because of fix for #659. Prior to #659 fix, 'something' was // treated as the id and 'example.org' was treated as the resource type // TODO: log a warning? } myTargetResourceType = theTargetResourceUrl.getResourceType(); myTargetResourceUrl = theTargetResourceUrl.getValue(); }
IIdType dt = new IdDt(ref.getBaseUrl(), ref.getResourceType(), ref.getIdPart(), null); if (dt.hasBaseUrl()) { if (myDaoConfig.getTreatBaseUrlsAsLocal().contains(dt.getBaseUrl())) { dt = dt.toUnqualified();
private void populateBundleEntryFullUrl(IBaseResource next, BundleEntryComponent entry) { if (next.getIdElement().hasBaseUrl()) { entry.setFullUrl(next.getIdElement().toVersionless().getValue()); } else { if (isNotBlank(myBase) && next.getIdElement().hasIdPart()) { IIdType id = next.getIdElement().toVersionless(); id = id.withServerBase(myBase, myContext.getResourceDefinition(next).getName()); entry.setFullUrl(id.getValue()); } } }
private IIdType populateBundleEntryFullUrl(IBaseResource next, BundleEntryComponent entry) { IIdType idElement = null; if (next.getIdElement().hasBaseUrl()) { idElement = next.getIdElement(); entry.setFullUrl(idElement.toVersionless().getValue()); } else { if (isNotBlank(myBase) && next.getIdElement().hasIdPart()) { idElement = next.getIdElement(); idElement = idElement.withServerBase(myBase, myContext.getResourceDefinition(next).getName()); entry.setFullUrl(idElement.toVersionless().getValue()); } } return idElement; }
private IIdType populateBundleEntryFullUrl(IBaseResource next, BundleEntryComponent entry) { IIdType idElement = null; if (next.getIdElement().hasBaseUrl()) { idElement = next.getIdElement(); entry.setFullUrl(idElement.toVersionless().getValue()); } else { if (isNotBlank(myBase) && next.getIdElement().hasIdPart()) { idElement = next.getIdElement(); idElement = idElement.withServerBase(myBase, myContext.getResourceDefinition(next).getName()); entry.setFullUrl(idElement.toVersionless().getValue()); } } return idElement; }
@Override public MethodOutcome invokeClient(String theResponseMimeType, InputStream theResponseInputStream, int theResponseStatusCode, Map<String, List<String>> theHeaders) throws BaseServerResponseException { MethodOutcome response = MethodUtil.process2xxResponse(myContext, theResponseStatusCode, theResponseMimeType, theResponseInputStream, theHeaders); response.setCreatedUsingStatusCode(theResponseStatusCode); if (myPrefer == PreferReturnEnum.REPRESENTATION) { if (response.getResource() == null) { if (response.getId() != null && isNotBlank(response.getId().getValue()) && response.getId().hasBaseUrl()) { ourLog.info("Server did not return resource for Prefer-representation, going to fetch: {}", response.getId().getValue()); IBaseResource resource = read().resource(response.getId().getResourceType()).withUrl(response.getId()).execute(); response.setResource(resource); } } } response.setResponseHeaders(theHeaders); return response; } }
Entry entry = myBundle.addEntry(); entry.setResource((IResource) next).getSearch().setMode(SearchEntryModeEnum.INCLUDE); if (next.getIdElement().hasBaseUrl()) { entry.setFullUrl(next.getIdElement().getValue());
BundleEntryComponent entry = myBundle.addEntry(); entry.setResource((Resource) next).getSearch().setMode(SearchEntryMode.INCLUDE); if (next.getIdElement().hasBaseUrl()) { entry.setFullUrl(next.getIdElement().getValue());
BundleEntryComponent entry = myBundle.addEntry(); entry.setResource((Resource) next).getSearch().setMode(SearchEntryMode.INCLUDE); if (next.getIdElement().hasBaseUrl()) { entry.setFullUrl(next.getIdElement().getValue());
String resName = toResourceName(theType); IIdType id = theId; if (!id.hasBaseUrl()) { id = new IdDt(resName, id.getIdPart(), id.getVersionIdPart()); if (id.hasBaseUrl()) { if (theVRead) { invocation = ReadMethodBinding.createAbsoluteVReadInvocation(getFhirContext(), id);
for (ResourceReferenceInfo nextRef : refs) { IIdType refId = nextRef.getResourceReference().getReferenceElement(); if (refId != null && refId.hasBaseUrl()) { if (getConfig().getTreatBaseUrlsAsLocal().contains(refId.getBaseUrl())) { IIdType newRefId = refId.toUnqualified();
private void populateBundleEntryFullUrl(IBaseResource next, BundleEntryComponent entry) { if (next.getIdElement().hasBaseUrl()) { entry.setFullUrl(next.getIdElement().toVersionless().getValue()); } else { if (isNotBlank(myBase) && next.getIdElement().hasIdPart()) { IIdType id = next.getIdElement().toVersionless(); id = id.withServerBase(myBase, myContext.getResourceDefinition(next).getName()); entry.setFullUrl(id.getValue()); } } }
private IIdType populateBundleEntryFullUrl(IBaseResource next, BundleEntryComponent entry) { IIdType idElement = null; if (next.getIdElement().hasBaseUrl()) { idElement = next.getIdElement(); entry.setFullUrl(idElement.toVersionless().getValue()); } else { if (isNotBlank(myBase) && next.getIdElement().hasIdPart()) { idElement = next.getIdElement(); idElement = idElement.withServerBase(myBase, myContext.getResourceDefinition(next).getName()); entry.setFullUrl(idElement.toVersionless().getValue()); } } return idElement; }
private IIdType populateBundleEntryFullUrl(IBaseResource next, BundleEntryComponent entry) { IIdType idElement = null; if (next.getIdElement().hasBaseUrl()) { idElement = next.getIdElement(); entry.setFullUrl(idElement.toVersionless().getValue()); } else { if (isNotBlank(myBase) && next.getIdElement().hasIdPart()) { idElement = next.getIdElement(); idElement = idElement.withServerBase(myBase, myContext.getResourceDefinition(next).getName()); entry.setFullUrl(idElement.toVersionless().getValue()); } } return idElement; }
private IIdType populateBundleEntryFullUrl(IBaseResource next, BundleEntryComponent entry) { IIdType idElement = null; if (next.getIdElement().hasBaseUrl()) { idElement = next.getIdElement(); entry.setFullUrl(idElement.toVersionless().getValue()); } else { if (isNotBlank(myBase) && next.getIdElement().hasIdPart()) { idElement = next.getIdElement(); idElement = idElement.withServerBase(myBase, myContext.getResourceDefinition(next).getName()); entry.setFullUrl(idElement.toVersionless().getValue()); } } return idElement; }
@Override public MethodOutcome invokeClient(String theResponseMimeType, InputStream theResponseInputStream, int theResponseStatusCode, Map<String, List<String>> theHeaders) throws BaseServerResponseException { MethodOutcome response = MethodUtil.process2xxResponse(myContext, theResponseStatusCode, theResponseMimeType, theResponseInputStream, theHeaders); response.setCreatedUsingStatusCode(theResponseStatusCode); if (myPrefer == PreferReturnEnum.REPRESENTATION) { if (response.getResource() == null) { if (response.getId() != null && isNotBlank(response.getId().getValue()) && response.getId().hasBaseUrl()) { ourLog.info("Server did not return resource for Prefer-representation, going to fetch: {}", response.getId().getValue()); IBaseResource resource = read().resource(response.getId().getResourceType()).withUrl(response.getId()).execute(); response.setResource(resource); } } } response.setResponseHeaders(theHeaders); return response; } }
BundleEntryComponent entry = myBundle.addEntry(); entry.setResource((Resource) next).getSearch().setMode(SearchEntryMode.INCLUDE); if (next.getIdElement().hasBaseUrl()) { entry.setFullUrl(next.getIdElement().getValue());
Entry entry = myBundle.addEntry(); entry.setResource((IResource) next).getSearch().setMode(SearchEntryModeEnum.INCLUDE); if (next.getIdElement().hasBaseUrl()) { entry.setFullUrl(next.getIdElement().getValue());
String resName = toResourceName(theType); IIdType id = theId; if (!id.hasBaseUrl()) { id = new IdDt(resName, id.getIdPart(), id.getVersionIdPart()); if (id.hasBaseUrl()) { if (theVRead) { invocation = ReadMethodBinding.createAbsoluteVReadInvocation(getFhirContext(), id);
for (ResourceReferenceInfo nextRef : refs) { IIdType refId = nextRef.getResourceReference().getReferenceElement(); if (refId != null && refId.hasBaseUrl()) { if (getConfig().getTreatBaseUrlsAsLocal().contains(refId.getBaseUrl())) { IIdType newRefId = refId.toUnqualified();