Package com.taskadapter.redmineapi
Class TimeEntryManager
- java.lang.Object
-
- com.taskadapter.redmineapi.TimeEntryManager
-
public final class TimeEntryManager extends java.lang.Object
Class to operate on Time Entry instances.Sample usage:
RedmineManager redmineManager = RedmineManagerFactory.createWithUserAuth(redmineURI, login, password); redmineManager.getTimeEntryManager();
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TimeEntry
createTimeEntry(TimeEntry obj)
void
deleteTimeEntry(java.lang.Integer id)
java.util.List<TimeEntry>
getTimeEntries()
ResultsWrapper<TimeEntry>
getTimeEntries(java.util.Map<java.lang.String,java.lang.String> parameters)
Direct method to search for objects using any Redmine REST API parameters you want.java.util.List<TimeEntry>
getTimeEntriesForIssue(java.lang.Integer issueId)
TimeEntry
getTimeEntry(java.lang.Integer id)
java.util.List<TimeEntryActivity>
getTimeEntryActivities()
void
update(TimeEntry obj)
-
-
-
Method Detail
-
getTimeEntries
public java.util.List<TimeEntry> getTimeEntries() throws RedmineException
- Throws:
RedmineException
-
getTimeEntry
public TimeEntry getTimeEntry(java.lang.Integer id) throws RedmineException
- Parameters:
id
- the database Id of the TimeEntry record- Throws:
RedmineException
-
getTimeEntriesForIssue
public java.util.List<TimeEntry> getTimeEntriesForIssue(java.lang.Integer issueId) throws RedmineException
- Throws:
RedmineException
-
getTimeEntries
public ResultsWrapper<TimeEntry> getTimeEntries(java.util.Map<java.lang.String,java.lang.String> parameters) throws RedmineException
Direct method to search for objects using any Redmine REST API parameters you want.Unlike other getXXXObjects() methods in this library, this one does NOT handle paging for you so you have to provide "offset" and "limit" parameters if you want to control paging.
Sample usage:
final Map
see other possible parameters on Redmine REST doc page: http://www.redmine.org/projects/redmine/wiki/Rest_TimeEntries#Listing-time-entriesparams = new HashMap (); params.put("project_id", projectId); params.put("activity_id", activityId); final List elements = issueManager.getTimeEntries(params); - Parameters:
parameters
- the http parameters key/value pairs to append to the rest api request- Returns:
- resultsWrapper with raw response from Redmine REST API
- Throws:
RedmineAuthenticationException
- invalid or no API access key is used with the server, which requires authorization. Check the constructor arguments.RedmineException
-
createTimeEntry
public TimeEntry createTimeEntry(TimeEntry obj) throws RedmineException
- Throws:
RedmineException
-
deleteTimeEntry
public void deleteTimeEntry(java.lang.Integer id) throws RedmineException
- Throws:
RedmineException
-
getTimeEntryActivities
public java.util.List<TimeEntryActivity> getTimeEntryActivities() throws RedmineException
- Throws:
RedmineException
-
update
public void update(TimeEntry obj) throws RedmineException
- Throws:
RedmineException
-
-