Class XmlDocumentationWriter
java.lang.Object
org.apache.nifi.documentation.AbstractDocumentationWriter
org.apache.nifi.documentation.xml.XmlDocumentationWriter
- All Implemented Interfaces:
ExtensionDocumentationWriter
XML-based implementation of DocumentationWriter
Please note that while this class lives within the nifi-api, it is provided primarily as a means for documentation components within
the NiFi NAR Maven Plugin. Its home is the nifi-api, however, because the API is needed in order to extract the relevant information and
the NAR Maven Plugin cannot have a direct dependency on nifi-api (doing so would cause a circular dependency). By having this homed within
the nifi-api, the Maven plugin is able to discover the class dynamically and invoke the one or two methods necessary to create the documentation.
This is a new capability in 1.9.0 in preparation for the Extension Registry and therefore, you should
NOTE WELL: At this time, while this class is part of nifi-api, it is still evolving and may change in a non-backward-compatible manner or even be
removed from one incremental release to the next. Use at your own risk!
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interface
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprivate void
writeAllowableValue
(AllowableValue allowableValue) private <T> void
writeArray
(String tagName, Collection<T> values, XmlDocumentationWriter.ElementWriter<T> writer) private void
writeBooleanElement
(String name, boolean value) protected void
writeDefaultSchedule
(DefaultSchedule defaultSchedule) protected void
writeDefaultSettings
(DefaultSettings defaultSettings) private void
writeDependencies
(PropertyDescriptor propertyDescriptor) private void
writeDeprecationNotice
(String reason, Set<String> alternatives) protected void
writeDeprecationNotice
(DeprecationNotice deprecationNotice) protected void
writeDescription
(String description) protected void
writeDynamicProperties
(List<DynamicProperty> dynamicProperties) private void
writeDynamicProperty
(DynamicProperty property) protected void
writeDynamicRelationship
(DynamicRelationship dynamicRelationship) private void
writeEmptyElement
(String elementName) private void
protected void
writeExtensionName
(String extensionName) protected void
writeExtensionType
(ExtensionType extensionType) protected void
writeFooter
(ConfigurableComponent component) protected void
writeHeader
(ConfigurableComponent component) protected void
writeInputRequirementInfo
(InputRequirement.Requirement requirement) private void
protected void
writeMultiProcessorUseCases
(List<MultiProcessorUseCase> multiProcessorUseCases) protected void
writePrimaryNodeOnly
(PrimaryNodeOnly primaryNodeOnly) protected void
writeProperties
(List<PropertyDescriptor> properties, Map<String, ServiceAPI> propertyServices) private void
writeProperty
(PropertyDescriptor property, Map<String, ServiceAPI> propertyServices) private void
writeProvidedService
(ServiceAPI service) protected void
writeProvidedServices
(Collection<ServiceAPI> providedServices) private void
writeReadsAttribute
(ReadsAttribute attribute) protected void
writeReadsAttributes
(List<ReadsAttribute> attributes) protected void
writeRelationships
(Set<Relationship> relationships) private void
writeResourceDefinition
(ResourceDefinition resourceDefinition) private void
writeResourceType
(ResourceType resourceType) protected void
writeRestrictedInfo
(Restricted restricted) private void
writeRestriction
(Restriction restriction) protected void
writeSeeAlso
(SeeAlso seeAlso) protected void
writeSideEffectFree
(SideEffectFree sideEffectFree) private void
writeStartElement
(String elementName) protected void
writeStatefulInfo
(Stateful stateful) protected void
writeSupportsBatching
(SupportsBatching supportsBatching) protected void
writeSupportsSensitiveDynamicProperties
(SupportsSensitiveDynamicProperties supportsSensitiveDynamicProperties) private void
writeSystemResourceConsideration
(SystemResourceConsideration consideration) protected void
writeSystemResourceConsiderationInfo
(List<SystemResourceConsideration> considerations) protected void
private void
private void
writeTextArray
(String outerTagName, String elementTagName, Collection<String> values) private <T> void
writeTextArray
(String outerTagName, String elementTagName, Collection<T> values, Function<T, String> transform) private void
writeTextElement
(String name, String text) protected void
writeTriggerSerially
(TriggerSerially triggerSerially) protected void
writeTriggerWhenAnyDestinationAvailable
(TriggerWhenAnyDestinationAvailable triggerWhenAnyDestinationAvailable) protected void
writeTriggerWhenEmpty
(TriggerWhenEmpty triggerWhenEmpty) private void
writeUseCase
(UseCase useCase) private void
writeUseCaseComponent
(ProcessorConfiguration processorConfig) protected void
writeUseCases
(List<UseCase> useCases) private void
writeWritesAttribute
(WritesAttribute attribute) protected void
writeWritesAttributes
(List<WritesAttribute> attributes) Methods inherited from class org.apache.nifi.documentation.AbstractDocumentationWriter
getDescription, getDynamicProperties, getExtensionType, getTags, initialize, initialize, initialize, initialize, initialize, initialize, write, write, writeBody
-
Field Details
-
writer
-
-
Constructor Details
-
XmlDocumentationWriter
- Throws:
XMLStreamException
-
XmlDocumentationWriter
-
-
Method Details
-
writeHeader
- Specified by:
writeHeader
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeExtensionName
- Specified by:
writeExtensionName
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeExtensionType
- Specified by:
writeExtensionType
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeDeprecationNotice
- Specified by:
writeDeprecationNotice
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeDeprecationNotice
- Throws:
IOException
-
writeDescription
- Specified by:
writeDescription
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeTags
- Specified by:
writeTags
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeProperties
protected void writeProperties(List<PropertyDescriptor> properties, Map<String, ServiceAPI> propertyServices) throws IOException- Specified by:
writeProperties
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeProperty
private void writeProperty(PropertyDescriptor property, Map<String, ServiceAPI> propertyServices) throws IOException- Throws:
IOException
-
writeResourceDefinition
- Throws:
IOException
-
writeResourceType
- Throws:
IOException
-
writeAllowableValue
- Throws:
IOException
-
writeDependencies
- Throws:
IOException
-
writeDynamicProperties
- Specified by:
writeDynamicProperties
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeDynamicProperty
- Throws:
IOException
-
writeStatefulInfo
- Specified by:
writeStatefulInfo
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeRestrictedInfo
- Specified by:
writeRestrictedInfo
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeRestriction
- Throws:
IOException
-
writeInputRequirementInfo
protected void writeInputRequirementInfo(InputRequirement.Requirement requirement) throws IOException - Specified by:
writeInputRequirementInfo
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeSystemResourceConsiderationInfo
protected void writeSystemResourceConsiderationInfo(List<SystemResourceConsideration> considerations) throws IOException - Specified by:
writeSystemResourceConsiderationInfo
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeSystemResourceConsideration
private void writeSystemResourceConsideration(SystemResourceConsideration consideration) throws IOException - Throws:
IOException
-
writeSeeAlso
- Specified by:
writeSeeAlso
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeUseCases
- Specified by:
writeUseCases
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeUseCase
- Throws:
IOException
-
writeMultiProcessorUseCases
protected void writeMultiProcessorUseCases(List<MultiProcessorUseCase> multiProcessorUseCases) throws IOException - Specified by:
writeMultiProcessorUseCases
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeMultiProcessorUseCase
- Throws:
IOException
-
writeUseCaseComponent
- Throws:
IOException
-
writeRelationships
- Specified by:
writeRelationships
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeDynamicRelationship
- Specified by:
writeDynamicRelationship
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeReadsAttributes
- Specified by:
writeReadsAttributes
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeReadsAttribute
- Throws:
IOException
-
writeWritesAttributes
- Specified by:
writeWritesAttributes
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeWritesAttribute
- Throws:
IOException
-
writeTriggerSerially
- Specified by:
writeTriggerSerially
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeTriggerWhenEmpty
- Specified by:
writeTriggerWhenEmpty
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeTriggerWhenAnyDestinationAvailable
protected void writeTriggerWhenAnyDestinationAvailable(TriggerWhenAnyDestinationAvailable triggerWhenAnyDestinationAvailable) throws IOException - Specified by:
writeTriggerWhenAnyDestinationAvailable
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeSupportsBatching
- Specified by:
writeSupportsBatching
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeSupportsSensitiveDynamicProperties
protected void writeSupportsSensitiveDynamicProperties(SupportsSensitiveDynamicProperties supportsSensitiveDynamicProperties) throws IOException - Specified by:
writeSupportsSensitiveDynamicProperties
in classAbstractDocumentationWriter
- Throws:
IOException
-
writePrimaryNodeOnly
- Specified by:
writePrimaryNodeOnly
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeSideEffectFree
- Specified by:
writeSideEffectFree
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeDefaultSchedule
- Specified by:
writeDefaultSchedule
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeDefaultSettings
- Specified by:
writeDefaultSettings
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeProvidedServices
- Specified by:
writeProvidedServices
in classAbstractDocumentationWriter
- Throws:
IOException
-
writeProvidedService
- Throws:
IOException
-
writeArray
private <T> void writeArray(String tagName, Collection<T> values, XmlDocumentationWriter.ElementWriter<T> writer) throws IOException - Throws:
IOException
-
writeTextArray
private void writeTextArray(String outerTagName, String elementTagName, Collection<String> values) throws IOException - Throws:
IOException
-
writeTextArray
private <T> void writeTextArray(String outerTagName, String elementTagName, Collection<T> values, Function<T, String> transform) throws IOException- Throws:
IOException
-
writeText
- Throws:
IOException
-
writeEmptyElement
- Throws:
IOException
-
writeStartElement
- Throws:
IOException
-
writeEndElement
- Throws:
IOException
-
writeTextElement
- Throws:
IOException
-
writeBooleanElement
- Throws:
IOException
-