|
||||||||||
| 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 projectName,
java.lang.String versionName,
Attachment attachement)
Add a attachment for a given version of a given project. |
|
News |
addNews(java.lang.String projectName,
News news)
Add a news for a given project. |
|
Version |
addVersion(java.lang.String projectName,
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 projectName,
java.lang.String versionName)
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 projectName)
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 projectName,
java.lang.String versionName)
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 projectName)
Obtain all news defined on a given project. |
|
Project |
getProject(java.lang.String projectName)
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 projectName)
Obtain all trackers defined on a given project. |
|
User[] |
getUsers(java.lang.String projectName)
Obtain all users defined on a given project. |
|
Version |
getVersion(java.lang.String projectName,
java.lang.String versionName)
Obtain a specific version for a given project. |
|
Version[] |
getVersions(java.lang.String projectName)
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 projectName,
java.lang.String oldVersionName,
Version newVersion)
Prepare a new version (create it or update it). |
|
Version |
updateVersion(java.lang.String projectName,
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 projectName,
Version version)
throws RedmineServiceException
RedmineService
addVersion in interface RedmineServiceprojectName - the name of the projectversion - the version to add
RedmineServiceException - if any pb while sending and retriving datas to redmine serverVersion
public Attachment addAttachment(java.lang.String projectName,
java.lang.String versionName,
Attachment attachement)
throws RedmineServiceException
RedmineService
addAttachment in interface RedmineServiceprojectName - the name of the projectversionName - the name of the versionattachement - the attachment to add
RedmineServiceException - if any pb while sending and retriving datas to redmine serverAttachment
public News addNews(java.lang.String projectName,
News news)
throws RedmineServiceException
RedmineService
addNews in interface RedmineServiceprojectName - the name of the projectnews - the news to add
RedmineServiceException - if any pb while sending and retriving datas to redmine serverNews
public Version updateVersion(java.lang.String projectName,
Version version)
throws RedmineServiceException
RedmineService
updateVersion in interface RedmineServiceprojectName - the name of the projectversion - the version to update
RedmineServiceException - if any pb while sending and retriving datas to redmine serverVersion
public Version nextVersion(java.lang.String projectName,
java.lang.String oldVersionName,
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 RedmineServiceprojectName - the name of the projectoldVersionName - the name of the old version (optional)newVersion - the newVersion to create or update
RedmineServiceException - if any pb while sending and retriving datas to redmine serverVersion
public IssueStatus[] getIssueStatuses()
throws RedmineServiceException
RedmineServiceIssue.
Note : The statuses are common for all projects.
getIssueStatuses in interface RedmineServiceRedmineServiceException - if any pb while retriving datasIssueStatus
public IssuePriority[] getIssuePriorities()
throws RedmineServiceException
RedmineServiceIssue.
Note : The priorities are common for all projects.
getIssuePriorities in interface RedmineServiceRedmineServiceException - if any pb while retriving datasIssuePriority
public Project[] getProjects()
throws RedmineServiceException
RedmineService
getProjects in interface RedmineServiceRedmineServiceException - if any pb while retriving datasProject
public IssueCategory[] getIssueCategories(java.lang.String projectName)
throws RedmineServiceException
RedmineService
getIssueCategories in interface RedmineServiceprojectName - the name of the project
RedmineServiceException - if any pb while retriving datasIssueCategory
public Project getProject(java.lang.String projectName)
throws RedmineServiceException
RedmineService
getProject in interface RedmineServiceprojectName - the name of the project
RedmineServiceException - if any pb while retriving datasProject
public Tracker[] getTrackers(java.lang.String projectName)
throws RedmineServiceException
RedmineService
getTrackers in interface RedmineServiceprojectName - the name of the project
RedmineServiceException - if any pb while retriving datasTracker
public News[] getNews(java.lang.String projectName)
throws RedmineServiceException
RedmineService
getNews in interface RedmineServiceprojectName - the name of the project
RedmineServiceException - if any pb while retriving datasNews
public User[] getUsers(java.lang.String projectName)
throws RedmineServiceException
RedmineService
getUsers in interface RedmineServiceprojectName - the name of the project
RedmineServiceException - if any pb while retriving datasUser
public Version[] getVersions(java.lang.String projectName)
throws RedmineServiceException
RedmineService
getVersions in interface RedmineServiceprojectName - the name of the project
RedmineServiceException - if any pb while retriving datasVersion
public Version getVersion(java.lang.String projectName,
java.lang.String versionName)
throws RedmineServiceException
RedmineService
getVersion in interface RedmineServiceprojectName - the name of the projectversionName - the name of the version
RedmineServiceException - if any pb while retriving datasVersion
public Attachment[] getAttachments(java.lang.String projectName,
java.lang.String versionName)
throws RedmineServiceException
RedmineService
getAttachments in interface RedmineServiceprojectName - the name of the projectversionName - the name of the version
RedmineServiceException - if any pb while retriving datasAttachment
public Issue[] getIssues(java.lang.String projectName,
java.lang.String versionName)
throws RedmineServiceException
RedmineService
getIssues in interface RedmineServiceprojectName - the name of the projectversionName - the name of the version
RedmineServiceException - if any pb while retriving datasIssuepublic 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 | |||||||||