use of org.apache.nifi.annotation.documentation.CapabilityDescription in project nifi by apache.
the class StandardProcessorNode method getProcessorDescription.
/**
* @return the value of the processor's {@link CapabilityDescription}
* annotation, if one exists, else <code>null</code>.
*/
public String getProcessorDescription() {
final Processor processor = processorRef.get().getProcessor();
final CapabilityDescription capDesc = processor.getClass().getAnnotation(CapabilityDescription.class);
String description = null;
if (capDesc != null) {
description = capDesc.value();
}
return description;
}
use of org.apache.nifi.annotation.documentation.CapabilityDescription in project nifi by apache.
the class HtmlDocumentationWriter method getDescription.
/**
* Gets a description of the ConfigurableComponent using the
* CapabilityDescription annotation.
*
* @param configurableComponent the component to describe
* @return a description of the configurableComponent
*/
protected String getDescription(final ConfigurableComponent configurableComponent) {
final CapabilityDescription capabilityDescription = configurableComponent.getClass().getAnnotation(CapabilityDescription.class);
final String description;
if (capabilityDescription != null) {
description = capabilityDescription.value();
} else {
description = "No description provided.";
}
return description;
}
Aggregations