Package ch.aaap.harvestclient.api
Interface UserAssignmentsApi
- All Superinterfaces:
Api.GetNested<Project,UserAssignment>
- All Known Implementing Classes:
UserAssignmentsApiImpl
API for UserAssignments. All methods are specific to a given project
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreate(Reference<Project> projectReference, UserAssignment creationInfo) Create a new UserAssignmentvoiddelete(Reference<Project> projectReference, Reference<UserAssignment> userAssignmentReference) Delete an existing UserAssignment.get(Reference<Project> projectReference, Reference<UserAssignment> userAssignmentReference) Return an existing UserAssignment.list(Reference<Project> projectReference, UserAssignmentFilter filter) list(Reference<Project> projectReference, UserAssignmentFilter filter, int page, int perPage) update(Reference<Project> projectReference, Reference<UserAssignment> userAssignmentReference, UserAssignmentUpdateInfo updateInfo) Updates the specific UserAssignment by setting the values of the parameters passed.
-
Method Details
-
list
- Parameters:
filter- filtering optionsprojectReference- the project containing the assignments- Returns:
- a list of all UserAssignments in the project, sorted by creation date, newest first.
-
list
Pagination<UserAssignment> list(Reference<Project> projectReference, UserAssignmentFilter filter, int page, int perPage) - Parameters:
filter- filtering optionsprojectReference- the project containing the assignmentspage- the page numberperPage- how many results to return for one page. Max 100- Returns:
- a list of all UserAssignments in the project, sorted by creation date, newest first.
-
get
UserAssignment get(Reference<Project> projectReference, Reference<UserAssignment> userAssignmentReference) Return an existing UserAssignment.- Specified by:
getin interfaceApi.GetNested<Project,UserAssignment> - Parameters:
projectReference- the project containing the assignmentuserAssignmentReference- a reference to an existing UserAssignment- Returns:
- the full UserAssignment object
-
create
Create a new UserAssignment- Parameters:
projectReference- the project that will contain the assignmentcreationInfo- creation information- Returns:
- the created User
-
update
UserAssignment update(Reference<Project> projectReference, Reference<UserAssignment> userAssignmentReference, UserAssignmentUpdateInfo updateInfo) Updates the specific UserAssignment by setting the values of the parameters passed. Any parameters not provided will be left unchanged- Parameters:
projectReference- the project that contains the assignmentuserAssignmentReference- An existing UserAssignment to be updatedupdateInfo- the changes to be performed- Returns:
- the updated UserAssignment
-
delete
Delete an existing UserAssignment.- Parameters:
projectReference- the project that contains the assignmentuserAssignmentReference- An existing UserAssignment to be deleted
-