use of com.cloud.api.response.ProjectResponse in project cosmic by MissionCriticalCloud.
the class ActivateProjectCmd method execute.
// ///////////////////////////////////////////////////
// ///////////////// Accessors ///////////////////////
// ///////////////////////////////////////////////////
@Override
public void execute() {
CallContext.current().setEventDetails("Project id: " + getId());
final Project project = _projectService.activateProject(getId());
if (project != null) {
final ProjectResponse response = _responseGenerator.createProjectResponse(project);
response.setResponseName(getCommandName());
this.setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to activate a project");
}
}
Aggregations