use of com.cloud.event.EventTypes in project cloudstack by apache.
the class ManagementServerImpl method listEventTypes.
@Override
public String[] listEventTypes() {
final Object eventObj = new EventTypes();
final Class<EventTypes> c = EventTypes.class;
final Field[] fields = c.getFields();
final String[] eventTypes = new String[fields.length];
try {
int i = 0;
for (final Field field : fields) {
eventTypes[i++] = field.get(eventObj).toString();
}
return eventTypes;
} catch (final IllegalArgumentException e) {
s_logger.error("Error while listing Event Types", e);
} catch (final IllegalAccessException e) {
s_logger.error("Error while listing Event Types", e);
}
return null;
}
Aggregations