remove "profile" from tx operations

This commit is contained in:
Grahame Grieve 2023-10-28 06:35:52 +11:00
parent a327f0312e
commit 83f0009f2d
2 changed files with 16 additions and 3 deletions

View File

@ -1375,7 +1375,8 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
if (valueSet != null) { if (valueSet != null) {
pIn.addParameter().setName("valueSet").setResource(valueSet); pIn.addParameter().setName("valueSet").setResource(valueSet);
} }
pIn.addParameter().setName("profile").setResource(expParameters);
pIn.addParameters(expParameters);
return pIn; return pIn;
} }
@ -1388,7 +1389,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
if (vsUrl != null) { if (vsUrl != null) {
pIn.addParameter().setName("url").setValue(new CanonicalType(vsUrl)); pIn.addParameter().setName("url").setValue(new CanonicalType(vsUrl));
} }
pIn.addParameter().setName("profile").setResource(expParameters); pIn.addParameters(expParameters);
return pIn; return pIn;
} }
@ -1548,7 +1549,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
if (expParameters == null) { if (expParameters == null) {
throw new Error(formatMessage(I18nConstants.NO_EXPANSIONPROFILE_PROVIDED)); throw new Error(formatMessage(I18nConstants.NO_EXPANSIONPROFILE_PROVIDED));
} }
pin.addParameter().setName("profile").setResource(expParameters); pin.addParameters(expParameters);
if (options.isDisplayWarningMode()) { if (options.isDisplayWarningMode()) {
pin.addParameter("mode","lenient-display-validation"); pin.addParameter("mode","lenient-display-validation");

View File

@ -1856,6 +1856,18 @@ public String toString() {
getParameter().removeIf(p -> name.equals(p.getName())); getParameter().removeIf(p -> name.equals(p.getName()));
} }
public void addParameters(Parameters expParameters) {
addParameters(expParameters.getParameter());
}
private void addParameters(List<ParametersParameterComponent> parameters) {
for (ParametersParameterComponent p : parameters) {
if (!hasParameter(p.getName())) {
addParameter(p);
}
}
}
// end addition // end addition
} }