use of com.cloud.api.response.ProjectAccountResponse in project CloudStack-archive by CloudStack-extras.
the class ListProjectAccountsCmd method execute.
/////////////////////////////////////////////////////
/////////////// API Implementation///////////////////
/////////////////////////////////////////////////////
@Override
public void execute() {
List<? extends ProjectAccount> projectAccounts = _projectService.listProjectAccounts(projectId, accountName, role, this.getStartIndex(), this.getPageSizeVal());
ListResponse<ProjectAccountResponse> response = new ListResponse<ProjectAccountResponse>();
List<ProjectAccountResponse> projectResponses = new ArrayList<ProjectAccountResponse>();
for (ProjectAccount projectAccount : projectAccounts) {
ProjectAccountResponse projectAccountResponse = _responseGenerator.createProjectAccountResponse(projectAccount);
projectResponses.add(projectAccountResponse);
}
response.setResponses(projectResponses);
response.setResponseName(getCommandName());
this.setResponseObject(response);
}
Aggregations