use of com.cloud.api.response.ProjectInvitationResponse in project CloudStack-archive by CloudStack-extras.
the class ListProjectInvitationsCmd method execute.
// ///////////////////////////////////////////////////
// ///////////// API Implementation///////////////////
// ///////////////////////////////////////////////////
@Override
public void execute() {
List<? extends ProjectInvitation> invites = _projectService.listProjectInvitations(id, projectId, this.getAccountName(), this.getDomainId(), state, activeOnly, this.getStartIndex(), this.getPageSizeVal(), this.isRecursive(), this.listAll());
ListResponse<ProjectInvitationResponse> response = new ListResponse<ProjectInvitationResponse>();
List<ProjectInvitationResponse> projectInvitationResponses = new ArrayList<ProjectInvitationResponse>();
for (ProjectInvitation invite : invites) {
ProjectInvitationResponse projectResponse = _responseGenerator.createProjectInvitationResponse(invite);
projectInvitationResponses.add(projectResponse);
}
response.setResponses(projectInvitationResponses);
response.setResponseName(getCommandName());
this.setResponseObject(response);
}
use of com.cloud.api.response.ProjectInvitationResponse in project cosmic by MissionCriticalCloud.
the class ProjectInvitationJoinDaoImpl method newProjectInvitationResponse.
@Override
public ProjectInvitationResponse newProjectInvitationResponse(final ProjectInvitationJoinVO invite) {
final ProjectInvitationResponse response = new ProjectInvitationResponse();
response.setId(invite.getUuid());
response.setProjectId(invite.getProjectUuid());
response.setProjectName(invite.getProjectName());
if (invite.getState() != null) {
response.setInvitationState(invite.getState().toString());
}
if (invite.getAccountName() != null) {
response.setAccountName(invite.getAccountName());
} else {
response.setEmail(invite.getEmail());
}
response.setDomainId(invite.getDomainUuid());
response.setDomainName(invite.getDomainName());
response.setObjectName("projectinvitation");
return response;
}
Aggregations