use of com.thinkbiganalytics.feedmgr.sla.ServiceLevelAgreementActionUiConfigurationItem in project kylo by Teradata.
the class ServiceLevelAgreementRestController method getAvailableServiceLevelAgreementTemplateActionClasses.
@GET
@Path("/available-sla-template-actions")
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Gets the available SLA actions.")
@ApiResponses({ @ApiResponse(code = 200, message = "Returns the list of SLA actions used when creating/editing an SLA Email Template.", response = LabelValue.class, responseContainer = "List") })
public Set<LabelValue> getAvailableServiceLevelAgreementTemplateActionClasses() {
List<ServiceLevelAgreementActionUiConfigurationItem> actionItems = ServiceLevelAgreementActionConfigTransformer.instance().discoverActionConfigurations();
Set<LabelValue> set = new HashSet<>();
actionItems.stream().forEach(a -> {
a.getActionClasses().stream().forEach(c -> {
LabelValue labelValue = new LabelValue(a.getDisplayName(), c.getName());
set.add(labelValue);
});
});
return set;
}
Aggregations