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 voidwriteAllowableValue(AllowableValue allowableValue) private <T> voidwriteArray(String tagName, Collection<T> values, XmlDocumentationWriter.ElementWriter<T> writer) private voidwriteBooleanElement(String name, boolean value) protected voidwriteDefaultSchedule(DefaultSchedule defaultSchedule) protected voidwriteDefaultSettings(DefaultSettings defaultSettings) private voidwriteDependencies(PropertyDescriptor propertyDescriptor) private voidwriteDeprecationNotice(String reason, Set<String> alternatives) protected voidwriteDeprecationNotice(DeprecationNotice deprecationNotice) protected voidwriteDescription(String description) protected voidwriteDynamicProperties(List<DynamicProperty> dynamicProperties) private voidwriteDynamicProperty(DynamicProperty property) protected voidwriteDynamicRelationship(DynamicRelationship dynamicRelationship) private voidwriteEmptyElement(String elementName) private voidprotected voidwriteExtensionName(String extensionName) protected voidwriteExtensionType(ExtensionType extensionType) protected voidwriteFooter(ConfigurableComponent component) protected voidwriteHeader(ConfigurableComponent component) protected voidwriteInputRequirementInfo(InputRequirement.Requirement requirement) private voidprotected voidwriteMultiProcessorUseCases(List<MultiProcessorUseCase> multiProcessorUseCases) protected voidwritePrimaryNodeOnly(PrimaryNodeOnly primaryNodeOnly) protected voidwriteProperties(List<PropertyDescriptor> properties, Map<String, ServiceAPI> propertyServices) private voidwriteProperty(PropertyDescriptor property, Map<String, ServiceAPI> propertyServices) private voidwriteProvidedService(ServiceAPI service) protected voidwriteProvidedServices(Collection<ServiceAPI> providedServices) private voidwriteReadsAttribute(ReadsAttribute attribute) protected voidwriteReadsAttributes(List<ReadsAttribute> attributes) protected voidwriteRelationships(Set<Relationship> relationships) private voidwriteResourceDefinition(ResourceDefinition resourceDefinition) private voidwriteResourceType(ResourceType resourceType) protected voidwriteRestrictedInfo(Restricted restricted) private voidwriteRestriction(Restriction restriction) protected voidwriteSeeAlso(SeeAlso seeAlso) protected voidwriteSideEffectFree(SideEffectFree sideEffectFree) private voidwriteStartElement(String elementName) protected voidwriteStatefulInfo(Stateful stateful) protected voidwriteSupportsBatching(SupportsBatching supportsBatching) protected voidwriteSupportsSensitiveDynamicProperties(SupportsSensitiveDynamicProperties supportsSensitiveDynamicProperties) private voidwriteSystemResourceConsideration(SystemResourceConsideration consideration) protected voidwriteSystemResourceConsiderationInfo(List<SystemResourceConsideration> considerations) protected voidprivate voidprivate voidwriteTextArray(String outerTagName, String elementTagName, Collection<String> values) private <T> voidwriteTextArray(String outerTagName, String elementTagName, Collection<T> values, Function<T, String> transform) private voidwriteTextElement(String name, String text) protected voidwriteTriggerSerially(TriggerSerially triggerSerially) protected voidwriteTriggerWhenAnyDestinationAvailable(TriggerWhenAnyDestinationAvailable triggerWhenAnyDestinationAvailable) protected voidwriteTriggerWhenEmpty(TriggerWhenEmpty triggerWhenEmpty) private voidwriteUseCase(UseCase useCase) private voidwriteUseCaseComponent(ProcessorConfiguration processorConfig) protected voidwriteUseCases(List<UseCase> useCases) private voidwriteWritesAttribute(WritesAttribute attribute) protected voidwriteWritesAttributes(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:
writeHeaderin classAbstractDocumentationWriter- Throws:
IOException
-
writeExtensionName
- Specified by:
writeExtensionNamein classAbstractDocumentationWriter- Throws:
IOException
-
writeExtensionType
- Specified by:
writeExtensionTypein classAbstractDocumentationWriter- Throws:
IOException
-
writeDeprecationNotice
- Specified by:
writeDeprecationNoticein classAbstractDocumentationWriter- Throws:
IOException
-
writeDeprecationNotice
- Throws:
IOException
-
writeDescription
- Specified by:
writeDescriptionin classAbstractDocumentationWriter- Throws:
IOException
-
writeTags
- Specified by:
writeTagsin classAbstractDocumentationWriter- Throws:
IOException
-
writeProperties
protected void writeProperties(List<PropertyDescriptor> properties, Map<String, ServiceAPI> propertyServices) throws IOException- Specified by:
writePropertiesin 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:
writeDynamicPropertiesin classAbstractDocumentationWriter- Throws:
IOException
-
writeDynamicProperty
- Throws:
IOException
-
writeStatefulInfo
- Specified by:
writeStatefulInfoin classAbstractDocumentationWriter- Throws:
IOException
-
writeRestrictedInfo
- Specified by:
writeRestrictedInfoin classAbstractDocumentationWriter- Throws:
IOException
-
writeRestriction
- Throws:
IOException
-
writeInputRequirementInfo
protected void writeInputRequirementInfo(InputRequirement.Requirement requirement) throws IOException - Specified by:
writeInputRequirementInfoin classAbstractDocumentationWriter- Throws:
IOException
-
writeSystemResourceConsiderationInfo
protected void writeSystemResourceConsiderationInfo(List<SystemResourceConsideration> considerations) throws IOException - Specified by:
writeSystemResourceConsiderationInfoin classAbstractDocumentationWriter- Throws:
IOException
-
writeSystemResourceConsideration
private void writeSystemResourceConsideration(SystemResourceConsideration consideration) throws IOException - Throws:
IOException
-
writeSeeAlso
- Specified by:
writeSeeAlsoin classAbstractDocumentationWriter- Throws:
IOException
-
writeUseCases
- Specified by:
writeUseCasesin classAbstractDocumentationWriter- Throws:
IOException
-
writeUseCase
- Throws:
IOException
-
writeMultiProcessorUseCases
protected void writeMultiProcessorUseCases(List<MultiProcessorUseCase> multiProcessorUseCases) throws IOException - Specified by:
writeMultiProcessorUseCasesin classAbstractDocumentationWriter- Throws:
IOException
-
writeMultiProcessorUseCase
- Throws:
IOException
-
writeUseCaseComponent
- Throws:
IOException
-
writeRelationships
- Specified by:
writeRelationshipsin classAbstractDocumentationWriter- Throws:
IOException
-
writeDynamicRelationship
- Specified by:
writeDynamicRelationshipin classAbstractDocumentationWriter- Throws:
IOException
-
writeReadsAttributes
- Specified by:
writeReadsAttributesin classAbstractDocumentationWriter- Throws:
IOException
-
writeReadsAttribute
- Throws:
IOException
-
writeWritesAttributes
- Specified by:
writeWritesAttributesin classAbstractDocumentationWriter- Throws:
IOException
-
writeWritesAttribute
- Throws:
IOException
-
writeTriggerSerially
- Specified by:
writeTriggerSeriallyin classAbstractDocumentationWriter- Throws:
IOException
-
writeTriggerWhenEmpty
- Specified by:
writeTriggerWhenEmptyin classAbstractDocumentationWriter- Throws:
IOException
-
writeTriggerWhenAnyDestinationAvailable
protected void writeTriggerWhenAnyDestinationAvailable(TriggerWhenAnyDestinationAvailable triggerWhenAnyDestinationAvailable) throws IOException - Specified by:
writeTriggerWhenAnyDestinationAvailablein classAbstractDocumentationWriter- Throws:
IOException
-
writeSupportsBatching
- Specified by:
writeSupportsBatchingin classAbstractDocumentationWriter- Throws:
IOException
-
writeSupportsSensitiveDynamicProperties
protected void writeSupportsSensitiveDynamicProperties(SupportsSensitiveDynamicProperties supportsSensitiveDynamicProperties) throws IOException - Specified by:
writeSupportsSensitiveDynamicPropertiesin classAbstractDocumentationWriter- Throws:
IOException
-
writePrimaryNodeOnly
- Specified by:
writePrimaryNodeOnlyin classAbstractDocumentationWriter- Throws:
IOException
-
writeSideEffectFree
- Specified by:
writeSideEffectFreein classAbstractDocumentationWriter- Throws:
IOException
-
writeDefaultSchedule
- Specified by:
writeDefaultSchedulein classAbstractDocumentationWriter- Throws:
IOException
-
writeDefaultSettings
- Specified by:
writeDefaultSettingsin classAbstractDocumentationWriter- Throws:
IOException
-
writeProvidedServices
- Specified by:
writeProvidedServicesin 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
-