public class ProjectManager
extends java.lang.Object
Obtain it via RedmineManager:
RedmineManager redmineManager = RedmineManagerFactory.createWithUserAuth(redmineURI, login, password); ProjectManager projectManager = redmineManager.getProjectManager();
Sample usage:
projectManager.getProjectById(123); projects = projectManager.getProjects();
RedmineManager.getIssueManager()
Modifier and Type | Method and Description |
---|---|
Membership |
addGroupToProject(int projectId,
int groupId,
java.util.Collection<Role> roles)
Deprecated.
|
Membership |
addUserToProject(int projectId,
int userId,
java.util.Collection<Role> roles)
Deprecated.
|
Project |
createProject(Project project)
Deprecated.
|
Version |
createVersion(Version version)
Deprecated.
|
void |
deleteProject(java.lang.String projectKey)
Deprecated.
|
void |
deleteProjectMembership(int membershipId)
Deprecated.
|
void |
deleteProjectMembership(Membership membership)
Deprecated.
|
void |
deleteVersion(Version version)
Deprecated.
|
java.util.List<News> |
getNews(java.lang.String projectKey) |
Project |
getProjectById(int id) |
Project |
getProjectByKey(java.lang.String projectKey) |
Membership |
getProjectMember(int membershipId) |
java.util.List<Membership> |
getProjectMembers(int projectId) |
java.util.List<Membership> |
getProjectMembers(java.lang.String projectKey) |
java.util.List<Project> |
getProjects()
Load the list of projects available to the user, which is represented by the API access key.
|
Version |
getVersionById(int versionId) |
java.util.List<Version> |
getVersions(int projectID)
|
void |
update(Project object)
Deprecated.
|
void |
update(Version object)
Deprecated.
|
void |
updateProjectMembership(Membership membership)
Deprecated.
|
@Deprecated public Project createProject(Project project) throws RedmineException
RedmineException
public java.util.List<Project> getProjects() throws RedmineException
Redmine ignores "get trackers info" parameter for "get projects" request. see bug http://www.redmine.org/issues/8545 The field is already accessible for a specific project for a long time (GET /projects/:id) but in the projects list (GET /projects) it's only on the svn trunk for now (Sep 8, 2014). It will be included in Redmine 2.6.0 which isn't out yet.
RedmineAuthenticationException
- invalid or no API access key is used with the server, which
requires authorization. Check the constructor arguments.RedmineException
public Project getProjectByKey(java.lang.String projectKey) throws RedmineException
projectKey
- string key like "project-ABC", NOT a database numeric IDRedmineAuthenticationException
- invalid or no API access key is used with the server, which
requires authorization. Check the constructor arguments.NotFoundException
- the project with the given key is not foundRedmineException
public Project getProjectById(int id) throws RedmineException
id
- project database Id, like 123. this is not a string "key" like "myproject".RedmineAuthenticationException
- invalid or no API access key is used with the server, which
requires authorization.NotFoundException
- the project with the given id is not foundRedmineException
@Deprecated public void deleteProject(java.lang.String projectKey) throws RedmineException
RedmineException
@Deprecated public Version createVersion(Version version) throws RedmineException
RedmineException
@Deprecated public void deleteVersion(Version version) throws RedmineException
RedmineException
public java.util.List<Version> getVersions(int projectID) throws RedmineException
projectID
- the ID of the Project
Version
s of the Project
RedmineAuthenticationException
- thrown in case something went wrong while trying to loginRedmineException
- thrown in case something went wrong in RedmineNotFoundException
- thrown in case an object can not be foundpublic Version getVersionById(int versionId) throws RedmineException
RedmineException
@Deprecated public void update(Project object) throws RedmineException
RedmineException
@Deprecated public void update(Version object) throws RedmineException
RedmineException
public java.util.List<News> getNews(java.lang.String projectKey) throws RedmineException
projectKey
- ignored if NULLRedmineException
News
@Deprecated public Membership addUserToProject(int projectId, int userId, java.util.Collection<Role> roles) throws RedmineException
RedmineException
@Deprecated public Membership addGroupToProject(int projectId, int groupId, java.util.Collection<Role> roles) throws RedmineException
RedmineException
public java.util.List<Membership> getProjectMembers(java.lang.String projectKey) throws RedmineException
projectKey
- string-based project key (like "TEST")RedmineException
public java.util.List<Membership> getProjectMembers(int projectId) throws RedmineException
projectId
- database ID of the project (like 123)RedmineException
public Membership getProjectMember(int membershipId) throws RedmineException
RedmineException
@Deprecated public void deleteProjectMembership(int membershipId) throws RedmineException
RedmineException
@Deprecated public void deleteProjectMembership(Membership membership) throws RedmineException
RedmineException
@Deprecated public void updateProjectMembership(Membership membership) throws RedmineException
RedmineException