Java Code Examples for org.apache.nifi.annotation.documentation.CapabilityDescription#value()
The following examples show how to use
org.apache.nifi.annotation.documentation.CapabilityDescription#value() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HtmlDocumentationWriter.java From localization_nifi with Apache License 2.0 | 5 votes |
/** * 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; }
Example 2
Source File: StandardProcessorNode.java From localization_nifi with Apache License 2.0 | 5 votes |
/** * @return the value of the processor's {@link CapabilityDescription} * annotation, if one exists, else <code>null</code>. */ public String getProcessorDescription() { final CapabilityDescription capDesc = processor.getClass().getAnnotation(CapabilityDescription.class); String description = null; if (capDesc != null) { description = capDesc.value(); } return description; }
Example 3
Source File: AbstractDocumentationWriter.java From nifi with Apache License 2.0 | 5 votes |
protected String getDescription(final ConfigurableComponent component) { final CapabilityDescription capabilityDescription = component.getClass().getAnnotation(CapabilityDescription.class); if (capabilityDescription == null) { return null; } return capabilityDescription.value(); }
Example 4
Source File: HtmlDocumentationWriter.java From nifi with Apache License 2.0 | 5 votes |
/** * 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; }
Example 5
Source File: StandardProcessorNode.java From nifi with Apache License 2.0 | 5 votes |
/** * @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; }
Example 6
Source File: DtoFactory.java From localization_nifi with Apache License 2.0 | 4 votes |
/** * Gets the capability description from the specified class. */ private String getCapabilityDescription(final Class<?> cls) { final CapabilityDescription capabilityDesc = cls.getAnnotation(CapabilityDescription.class); return capabilityDesc == null ? null : capabilityDesc.value(); }