
backlog4j.api.GetVersions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of backlog4j Show documentation
Show all versions of backlog4j Show documentation
A Java library for Backlog API
package backlog4j.api;
import backlog4j.BacklogClient;
import backlog4j.BacklogException;
import backlog4j.Version;
import backlog4j.VersionList;
import backlog4j.impl.VersionImpl;
import backlog4j.impl.VersionListImpl;
import backlog4j.util.XmlRpcUtil;
import java.util.List;
/**
* @author eguchi
*/
public class GetVersions implements BacklogCommand {
private final BacklogClient client;
private Integer projectId;
public GetVersions(BacklogClient client) {
this.client = client;
}
public Integer getProjectId() {
return projectId;
}
public GetVersions setProjectId(Integer projectId) {
this.projectId = projectId;
return this;
}
private void checkParameters() {
if (getProjectId() == null) {
throw new BacklogException("projectId is required");
}
}
public VersionList execute() {
checkParameters();
Object res = client.execute(BACKLOG_GET_VERSIONS, projectId);
List versionList = XmlRpcUtil.toList(VersionImpl.class, res);
return new VersionListImpl(versionList);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy