com.taskadapter.redmineapi.CustomFieldManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redmine-java-api Show documentation
Show all versions of redmine-java-api Show documentation
Free open-source Java API for Redmine and Chiliproject bug/task management systems.
This project was originally a part of Task Adapter application (http://www.taskadapter.com)
and then was open-sourced.
The newest version!
package com.taskadapter.redmineapi;
import com.taskadapter.redmineapi.bean.CustomFieldDefinition;
import com.taskadapter.redmineapi.internal.Transport;
import java.util.List;
/**
* Works with Custom Field Definitions (read-only at this moment).
* Obtain it via RedmineManager:
*
RedmineManager mgr = RedmineManagerFactory.createWithUserAuth(redmineURI, login, password);
CustomFieldManager customFieldManager = mgr.getCustomFieldManager();
List list = customFieldManager.getCustomFieldDefinitions();
*
*
* The current version only allows loading custom fields definition from the server (Redmine v. 1 through 3).
* You cannot create new Custom Field definitions through Redmine REST API. Please see http://www.redmine.org/issues/9664 for details.
*
* Sample usage:
*
definitions = customFieldManager.getCustomFieldDefinitions();
*
*
* @see RedmineManager
*/
public class CustomFieldManager {
private final Transport transport;
CustomFieldManager(Transport transport) {
this.transport = transport;
}
/**
* Fetch custom field definitions from server.
*
* @throws com.taskadapter.redmineapi.RedmineException
* @since Redmine 2.4
* @return List of custom field definitions
*/
public List getCustomFieldDefinitions()
throws RedmineException {
return transport.getObjectsList(CustomFieldDefinition.class);
}
}