|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.jredmine.DefaultRedmineService
public class DefaultRedmineService
Default RedmineService implementation base on a RestClient
|
| Field Summary | |
|---|---|
protected boolean |
init
internal state to known if service was init |
protected static org.apache.commons.logging.Log |
log
|
protected org.nuiton.io.rest.RestClient |
session
client Rest |
protected RedmineXpp3Helper |
xpp3Helper
xpp3 xpp3Helper to transform xml stream to pojo |
| Fields inherited from interface org.nuiton.jredmine.RedmineService |
|---|
ROLE |
| Constructor Summary | |
|---|---|
DefaultRedmineService()
|
|
| Method Summary | ||
|---|---|---|
Attachment |
addAttachment(java.lang.String projectId,
java.lang.String versionId,
Attachment attachement)
Add a attachment for a given version of a given project. |
|
News |
addNews(java.lang.String projectId,
News news)
Add a news for a given project. |
|
Version |
addVersion(java.lang.String projectId,
Version version)
Add a version for a given project. |
|
protected void |
checkInit()
|
|
void |
destroy()
Close the service and destroy any connexions to the redmine service. |
|
Attachment[] |
getAttachments(java.lang.String projectId,
java.lang.String versionId)
Obtain all attachments for a specific version on a given project |
|
|
getData(java.lang.Class<T> type,
java.lang.Object... args)
Generic method to obtain a single data from a redmine server. |
|
protected
|
getDataFromStream(java.lang.Class<T> type,
java.io.InputStream stream)
|
|
|
getDatas(java.lang.Class<T> type,
java.lang.Object... args)
Generic method to obtain a array of data from a redmine server. |
|
protected
|
getDatasFromStream(java.lang.Class<T> type,
java.io.InputStream stream)
|
|
|
getDatasStream(java.lang.Class<T> type,
java.lang.Object... args)
Generic method to obtain an input stream of an array of data from a redmine server. |
|
protected
|
getDataStream(java.lang.Class<T> type,
boolean array,
java.lang.Object... args)
|
|
|
getDataStream(java.lang.Class<T> type,
java.lang.Object... args)
Generic method to obtain an input stream of a data from a redmine server. |
|
IssueCategory[] |
getIssueCategories(java.lang.String projectId)
Obtain all categories defined on issues for a given project. |
|
IssuePriority[] |
getIssuePriorities()
Obtain all the priorities defined on a Issue. |
|
Issue[] |
getIssues(java.lang.String projectId,
java.lang.String versionId)
Obtain all issues for a specific version on a given project |
|
IssueStatus[] |
getIssueStatuses()
Obtain all the statuses defined on a Issue. |
|
News[] |
getNews(java.lang.String projectId)
Obtain all news defined on a given project. |
|
Project |
getProject(java.lang.String projectId)
Obtain a project given his name. |
|
Project[] |
getProjects()
Obtain all accessible projets for the loggued user. |
|
protected org.nuiton.io.rest.RestRequest |
getRequest(java.lang.String requestName,
java.lang.Object... args)
|
|
Tracker[] |
getTrackers(java.lang.String projectId)
Obtain all trackers defined on a given project. |
|
User[] |
getUsers(java.lang.String projectId)
Obtain all users defined on a given project. |
|
Version |
getVersion(java.lang.String projectId,
java.lang.String versionId)
Obtain a specific version for a given project. |
|
Version[] |
getVersions(java.lang.String projectId)
Obtain all versions defined on a given project. |
|
RedmineServiceImplementor |
init(org.nuiton.io.rest.RestClient session)
Initialize the service given a redmine client already initialized. |
|
RedmineServiceImplementor |
init(org.nuiton.io.rest.RestClientConfiguration configuration)
Initialize the service given a client configuration. |
|
boolean |
isInit()
Tests if the service is loogued to the redmine service. |
|
Version |
nextVersion(java.lang.String projectId,
java.lang.String oldVersionId,
Version newVersion)
Prepare a new version (create it or update it). |
|
Version |
updateVersion(java.lang.String projectId,
Version version)
Update a version for a given project. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log log
protected org.nuiton.io.rest.RestClient session
|
protected final RedmineXpp3Helper xpp3Helper
protected boolean init
| Constructor Detail |
|---|
public DefaultRedmineService()
| Method Detail |
|---|
public Version addVersion(java.lang.String projectId,
Version version)
throws RedmineServiceException
RedmineService
addVersion in interface RedmineServiceprojectId - the name of the projectversion - the version to add
RedmineServiceExceptionVersion
public Attachment addAttachment(java.lang.String projectId,
java.lang.String versionId,
Attachment attachement)
throws RedmineServiceException
RedmineService
addAttachment in interface RedmineServiceprojectId - the name of the projectversionId - the name of the versionattachement - the attachment to add
RedmineServiceExceptionAttachment
public News addNews(java.lang.String projectId,
News news)
throws RedmineServiceException
RedmineService
addNews in interface RedmineServiceprojectId - the name of the projectnews - the news to add
RedmineServiceExceptionNews
public Version updateVersion(java.lang.String projectId,
Version version)
throws RedmineServiceException
RedmineService
updateVersion in interface RedmineServiceprojectId - the name of the projectversion - the version to update
RedmineServiceExceptionVersion
public Version nextVersion(java.lang.String projectId,
java.lang.String oldVersionId,
Version newVersion)
throws RedmineServiceException
RedmineServiceoldVersionName is given, then all issues unclosed from this
old version will be move to the new version.
nextVersion in interface RedmineServiceprojectId - the name of the projectoldVersionId - the name of the old version (optional)newVersion - the newVersion to create or update
RedmineServiceExceptionVersion
public IssueStatus[] getIssueStatuses()
throws RedmineServiceException
RedmineServiceIssue.
Note : The statuses are common for all projects.
getIssueStatuses in interface RedmineServiceRedmineServiceExceptionIssueStatus
public IssuePriority[] getIssuePriorities()
throws RedmineServiceException
RedmineServiceIssue.
Note : The priorities are common for all projects.
getIssuePriorities in interface RedmineServiceRedmineServiceExceptionIssuePriority
public Project[] getProjects()
throws RedmineServiceException
RedmineService
getProjects in interface RedmineServiceRedmineServiceException - if any pbProject
public IssueCategory[] getIssueCategories(java.lang.String projectId)
throws RedmineServiceException
RedmineService
getIssueCategories in interface RedmineServiceprojectId - the name of the project
RedmineServiceExceptionIssueCategory
public Project getProject(java.lang.String projectId)
throws RedmineServiceException
RedmineService
getProject in interface RedmineServiceprojectId - the name of the project
RedmineServiceExceptionProject
public Tracker[] getTrackers(java.lang.String projectId)
throws RedmineServiceException
RedmineService
getTrackers in interface RedmineServiceprojectId - the name of the project
RedmineServiceExceptionTracker
public News[] getNews(java.lang.String projectId)
throws RedmineServiceException
RedmineService
getNews in interface RedmineServiceprojectId - the name of the project
RedmineServiceExceptionNews
public User[] getUsers(java.lang.String projectId)
throws RedmineServiceException
RedmineService
getUsers in interface RedmineServiceprojectId - the name of the project
RedmineServiceExceptionUser
public Version[] getVersions(java.lang.String projectId)
throws RedmineServiceException
RedmineService
getVersions in interface RedmineServiceprojectId - the name of the project
RedmineServiceExceptionVersion
public Version getVersion(java.lang.String projectId,
java.lang.String versionId)
throws RedmineServiceException
RedmineService
getVersion in interface RedmineServiceprojectId - the name of the projectversionId - the name of the version
RedmineServiceExceptionVersion
public Attachment[] getAttachments(java.lang.String projectId,
java.lang.String versionId)
throws RedmineServiceException
RedmineService
getAttachments in interface RedmineServiceprojectId - the name of the projectversionId - the name of the version
RedmineServiceExceptionAttachment
public Issue[] getIssues(java.lang.String projectId,
java.lang.String versionId)
throws RedmineServiceException
RedmineService
getIssues in interface RedmineServiceprojectId - the name of the projectversionId - the name of the version
RedmineServiceExceptionIssuepublic boolean isInit()
RedmineServiceImplementor
isInit in interface RedmineServiceImplementortrue is service is init and loggued to Redmine service,
false otherwise.
public RedmineServiceImplementor init(org.nuiton.io.rest.RestClientConfiguration configuration)
throws RedmineServiceException
RedmineServiceImplementor
init in interface RedmineServiceImplementorconfiguration - the configuration to be used to init the internal redmine client
RedmineServiceException
public RedmineServiceImplementor init(org.nuiton.io.rest.RestClient session)
throws RedmineServiceException
RedmineServiceImplementor
init in interface RedmineServiceImplementorsession - the redmine client to be used by the service
RedmineServiceExceptionRedmineRestClient
public void destroy()
throws RedmineServiceException
RedmineServiceImplementor
destroy in interface RedmineServiceImplementorRedmineServiceException
public <T> T getData(java.lang.Class<T> type,
java.lang.Object... args)
throws RedmineServiceException
RedmineServiceImplementor
getData in interface RedmineServiceImplementorT - the type of data to obtaintype - the type of data to obtainargs - the parameters to obtain the data
RedmineServiceException
public <T> T[] getDatas(java.lang.Class<T> type,
java.lang.Object... args)
throws RedmineServiceException
RedmineServiceImplementor
getDatas in interface RedmineServiceImplementorT - the type of data to obtaintype - the type of data to obtainargs - the parameters to obtain the datas
RedmineServiceException
public <T> java.io.InputStream getDataStream(java.lang.Class<T> type,
java.lang.Object... args)
throws RedmineServiceException
RedmineServiceImplementor
getDataStream in interface RedmineServiceImplementorT - the type of data to obtaintype - the type of data to obtainargs - the parameters to obtain the data
RedmineServiceException
public <T> java.io.InputStream getDatasStream(java.lang.Class<T> type,
java.lang.Object... args)
throws RedmineServiceException
RedmineServiceImplementor
getDatasStream in interface RedmineServiceImplementorT - the type of data to obtaintype - the type of data to obtainargs - the parameters to obtain the datas
RedmineServiceException
protected <T> java.io.InputStream getDataStream(java.lang.Class<T> type,
boolean array,
java.lang.Object... args)
throws RedmineServiceException
RedmineServiceException
protected org.nuiton.io.rest.RestRequest getRequest(java.lang.String requestName,
java.lang.Object... args)
throws RedmineServiceException
RedmineServiceException
protected <T> T getDataFromStream(java.lang.Class<T> type,
java.io.InputStream stream)
throws RedmineServiceException
RedmineServiceException
protected <T> T[] getDatasFromStream(java.lang.Class<T> type,
java.io.InputStream stream)
throws RedmineServiceException
RedmineServiceException
protected void checkInit()
throws java.lang.IllegalStateException
java.lang.IllegalStateException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||