use of com.thinkbiganalytics.policy.rest.model.PreconditionRuleBuilder in project kylo by Teradata.
the class PreconditionAnnotationTransformer method buildUiModel.
@Override
public PreconditionRule buildUiModel(PreconditionPolicy annotation, Precondition policy, List<FieldRuleProperty> properties) {
String desc = annotation.description();
String shortDesc = annotation.shortDescription();
if (StringUtils.isBlank(desc) && StringUtils.isNotBlank(shortDesc)) {
desc = shortDesc;
}
if (StringUtils.isBlank(shortDesc) && StringUtils.isNotBlank(desc)) {
shortDesc = desc;
}
PreconditionRule rule = new PreconditionRuleBuilder(annotation.name()).objectClassType(policy.getClass()).description(desc).shortDescription(shortDesc).addProperties(properties).build();
return rule;
}
Aggregations