fix return url

This commit is contained in:
petervanhoute 2015-10-29 15:55:37 +01:00
parent a262bf64d0
commit 367163c46a
3 changed files with 6 additions and 1 deletions

View File

@ -62,6 +62,10 @@ public abstract class RequestDetails {
return myCompleteUrl;
}
/**
* The fhir server base url, independant of the query being executed
* @return the fhir server base url
*/
public String getFhirServerBase() {
return myFhirServerBase;
}

View File

@ -657,7 +657,7 @@ public class RestfulServerUtils {
}
static Integer tryToExtractNamedParameter(RequestDetails theRequest, String name) {
public static Integer tryToExtractNamedParameter(RequestDetails theRequest, String name) {
String[] countString = theRequest.getParameters().get(name);
Integer count = null;
if (countString != null && countString.length > 0 && isNotBlank(countString[0])) {

View File

@ -382,6 +382,7 @@ public class Dstu2BundleFactory implements IVersionSpecificBundleFactory {
addRootPropertiesToBundle(null, theServerBase, theCompleteUrl, theResult.size(), theBundleType, theResult.getPublished());
if (theServer.getPagingProvider() != null) {
theServerBase = theCompleteUrl.contains("?") ? theCompleteUrl.substring(0, theCompleteUrl.indexOf("?")) : theCompleteUrl;
int limit;
limit = theLimit != null ? theLimit : theServer.getPagingProvider().getDefaultPageSize();
limit = Math.min(limit, theServer.getPagingProvider().getMaximumPageSize());