All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.versionone.apiclient.SelectionBuilder Maven / Gradle / Ivy

Go to download

A library for custom Java development against the VersionOne Development Platform's REST API.

There is a newer version: 16.1.3
Show newest version
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