Package ch.aaap.harvestclient.impl
Class UserAssignmentsApiImpl
Object
ch.aaap.harvestclient.impl.UserAssignmentsApiImpl
- All Implemented Interfaces:
Api.GetNested<Project,
,UserAssignment> UserAssignmentsApi
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(Reference<Project> projectReference, UserAssignment creationInfo) Create a new UserAssignmentvoid
delete
(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.
-
Constructor Details
-
UserAssignmentsApiImpl
-
-
Method Details
-
list
- Specified by:
list
in interfaceUserAssignmentsApi
- Parameters:
projectReference
- the project containing the assignmentsfilter
- filtering options- Returns:
- a list of all UserAssignments in the project, sorted by creation date, newest first.
-
list
public Pagination<UserAssignment> list(Reference<Project> projectReference, UserAssignmentFilter filter, int page, int perPage) - Specified by:
list
in interfaceUserAssignmentsApi
- Parameters:
projectReference
- the project containing the assignmentsfilter
- filtering optionspage
- 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
public UserAssignment get(Reference<Project> projectReference, Reference<UserAssignment> userAssignmentReference) Description copied from interface:UserAssignmentsApi
Return an existing UserAssignment.- Specified by:
get
in interfaceApi.GetNested<Project,
UserAssignment> - Specified by:
get
in interfaceUserAssignmentsApi
- Parameters:
projectReference
- the project containing the assignmentuserAssignmentReference
- a reference to an existing UserAssignment- Returns:
- the full UserAssignment object
-
create
Description copied from interface:UserAssignmentsApi
Create a new UserAssignment- Specified by:
create
in interfaceUserAssignmentsApi
- Parameters:
projectReference
- the project that will contain the assignmentcreationInfo
- creation information- Returns:
- the created User
-
update
public UserAssignment update(Reference<Project> projectReference, Reference<UserAssignment> userAssignmentReference, UserAssignmentUpdateInfo updateInfo) Description copied from interface:UserAssignmentsApi
Updates the specific UserAssignment by setting the values of the parameters passed. Any parameters not provided will be left unchanged- Specified by:
update
in interfaceUserAssignmentsApi
- Parameters:
projectReference
- the project that contains the assignmentuserAssignmentReference
- An existing UserAssignment to be updatedupdateInfo
- the changes to be performed- Returns:
- the updated UserAssignment
-
delete
public void delete(Reference<Project> projectReference, Reference<UserAssignment> userAssignmentReference) Description copied from interface:UserAssignmentsApi
Delete an existing UserAssignment.- Specified by:
delete
in interfaceUserAssignmentsApi
- Parameters:
projectReference
- the project that contains the assignmentuserAssignmentReference
- An existing UserAssignment to be deleted
-