com.versionone.apiclient.SelectionBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of VersionOne.SDK.Java.APIClient Show documentation
Show all versions of VersionOne.SDK.Java.APIClient Show documentation
A library for custom Java development against the VersionOne Development Platform's REST API.
package com.versionone.apiclient;
import com.versionone.apiclient.services.BuildResult;
import com.versionone.apiclient.services.QueryBuilder;
public class SelectionBuilder extends QueryBuilder {
@Override
protected void doBuild(Query query, BuildResult result) {
if (query.getParentRelation() != null) {
query.getSelection().add(query.getParentRelation());
}
if (query.getSelection().size() == 1 && !query.getOid().isNull()) {
result.pathParts.add(query.getSelection().get(0).getName());
} else if (query.getSelection().size() > 0) {
result.querystringParts.add("sel=" + query.getSelection().getToken());
} else {
result.querystringParts.add("sel=");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy