use of com.cloud.api.response.EventTypeResponse in project cosmic by MissionCriticalCloud.
the class ListEventTypesCmd method execute.
@Override
public void execute() {
final String[] result = _mgr.listEventTypes();
final ListResponse<EventTypeResponse> response = new ListResponse<>();
final ArrayList<EventTypeResponse> responses = new ArrayList<>();
if (result != null) {
for (final String eventType : result) {
final EventTypeResponse eventTypeResponse = new EventTypeResponse();
eventTypeResponse.setName(eventType);
eventTypeResponse.setObjectName("eventtype");
responses.add(eventTypeResponse);
}
}
response.setResponses(responses);
response.setResponseName(getCommandName());
this.setResponseObject(response);
}
use of com.cloud.api.response.EventTypeResponse in project CloudStack-archive by CloudStack-extras.
the class ListEventTypesCmd method execute.
@Override
public void execute() {
String[] result = _mgr.listEventTypes();
ListResponse<EventTypeResponse> response = new ListResponse<EventTypeResponse>();
ArrayList<EventTypeResponse> responses = new ArrayList<EventTypeResponse>();
if (result != null) {
for (String eventType : result) {
EventTypeResponse eventTypeResponse = new EventTypeResponse();
eventTypeResponse.setName(eventType);
eventTypeResponse.setObjectName("eventtype");
responses.add(eventTypeResponse);
}
}
response.setResponses(responses);
response.setResponseName(getCommandName());
this.setResponseObject(response);
}
Aggregations