/** * Creates a new instance of this ID which is identical, but refers to the specific version of this resource ID noted by theVersion. * * @param theVersion The actual version string, e.g. "1". If theVersion is blank or null, returns the same as {@link #toVersionless()}} * @return A new instance of IdDt which is identical, but refers to the specific version of this resource ID noted by theVersion. */ @Override public IdDt withVersion(String theVersion) { if (isBlank(theVersion)) { return toVersionless(); } if (isLocal() || isUrn()) { return new IdDt(getValueAsString()); } String existingValue = getValue(); int i = existingValue.indexOf(Constants.PARAM_HISTORY); String value; if (i > 1) { value = existingValue.substring(0, i - 1); } else { value = existingValue; } return new IdDt(value + '/' + Constants.PARAM_HISTORY + '/' + theVersion); }
private void populateBundleEntryFullUrl(IResource next, Entry entry) { if (next.getId().hasBaseUrl()) { entry.setFullUrl(next.getId().toVersionless().getValue()); } else { if (isNotBlank(myBase) && next.getId().hasIdPart()) { IdDt id = next.getId().toVersionless(); id = id.withServerBase(myBase, myContext.getResourceDefinition(next).getName()); entry.setFullUrl(id.getValue()); } } }
IBaseResource resource = dao.read(resourceTable.getIdDt().toVersionless(), null, true); if (resource == null) { throw new InternalErrorException("Could not find resource version " + resourceTable.getIdDt().toUnqualified().getValue() + " in database");
theDeleteConflicts.removeIf(next -> theDeletedResources.contains(next.getTargetId().toVersionless())); validateDeleteConflictsEmptyOrThrowException(theDeleteConflicts);
/** * Creates a new instance of this ID which is identical, but refers to the specific version of this resource ID noted by theVersion. * * @param theVersion The actual version string, e.g. "1". If theVersion is blank or null, returns the same as {@link #toVersionless()}} * @return A new instance of IdDt which is identical, but refers to the specific version of this resource ID noted by theVersion. */ @Override public IdDt withVersion(String theVersion) { if (isBlank(theVersion)) { return toVersionless(); } if (isLocal() || isUrn()) { return new IdDt(getValueAsString()); } String existingValue = getValue(); int i = existingValue.indexOf(Constants.PARAM_HISTORY); String value; if (i > 1) { value = existingValue.substring(0, i - 1); } else { value = existingValue; } return new IdDt(value + '/' + Constants.PARAM_HISTORY + '/' + theVersion); }
private void populateBundleEntryFullUrl(IResource next, Entry entry) { if (next.getId().hasBaseUrl()) { entry.setFullUrl(next.getId().toVersionless().getValue()); } else { if (isNotBlank(myBase) && next.getId().hasIdPart()) { IdDt id = next.getId().toVersionless(); id = id.withServerBase(myBase, myContext.getResourceDefinition(next).getName()); entry.setFullUrl(id.getValue()); } } }
IBaseResource resource = dao.read(resourceTable.getIdDt().toVersionless(), null, true); if (resource == null) { throw new InternalErrorException("Could not find resource version " + resourceTable.getIdDt().toUnqualified().getValue() + " in database");
theDeleteConflicts.removeIf(next -> theDeletedResources.contains(next.getTargetId().toVersionless())); validateDeleteConflictsEmptyOrThrowException(theDeleteConflicts);