From 41baf5410ff1336496f61023e810b7eb8c368607 Mon Sep 17 00:00:00 2001 From: Seth Lasky Date: Tue, 16 Feb 2021 14:01:33 -0500 Subject: [PATCH] Update annotations and documentation for attribute written by GetOidForPath (#57) (#58) Co-authored-by: SethLasky --- doc/GetOidForPath.md | 4 +++- .../greymatter/data/nifi/processors/GetOidForPath.scala | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/GetOidForPath.md b/doc/GetOidForPath.md index 5ec5fc9..f243e6c 100644 --- a/doc/GetOidForPath.md +++ b/doc/GetOidForPath.md @@ -53,7 +53,9 @@ Dynamic Properties allow the user to specify an arbitrary name and value of a pr ### Writes Attributes: -None specified. +| Name | Description | +| --- | --- | +| gmdata.parentoid | The object id of the parent folder created by the processor. | ### State Management: diff --git a/gmd-sdk/nifi-data-processors/src/main/scala/com/deciphernow/greymatter/data/nifi/processors/GetOidForPath.scala b/gmd-sdk/nifi-data-processors/src/main/scala/com/deciphernow/greymatter/data/nifi/processors/GetOidForPath.scala index 845874e..88bd759 100644 --- a/gmd-sdk/nifi-data-processors/src/main/scala/com/deciphernow/greymatter/data/nifi/processors/GetOidForPath.scala +++ b/gmd-sdk/nifi-data-processors/src/main/scala/com/deciphernow/greymatter/data/nifi/processors/GetOidForPath.scala @@ -3,10 +3,10 @@ package com.deciphernow.greymatter.data.nifi.processors import java.util.concurrent.Executors import cats.effect.concurrent.Ref -import cats.effect.{ Blocker, ContextShift, IO } +import cats.effect.{Blocker, ContextShift, IO} import cats.implicits._ import com.deciphernow.greymatter.data.nifi.processors.utils.GetOidForPathUtils -import org.apache.nifi.annotation.behavior.DynamicProperty +import org.apache.nifi.annotation.behavior.{DynamicProperty, WritesAttribute, WritesAttributes} import org.apache.nifi.expression.ExpressionLanguageScope import org.http4s.client.JavaNetClientBuilder @@ -24,6 +24,7 @@ import org.apache.nifi.processor._ @SeeAlso(Array()) @DynamicProperty(name = "Header Name", value = "Attribute Expression Language", expressionLanguageScope = ExpressionLanguageScope.FLOWFILE_ATTRIBUTES, description = "Send request header with a key matching the Dynamic Property Key and a value created by evaluating the Attribute Expression Language set in the value of the Dynamic Property.") @ReadsAttributes(Array(new ReadsAttribute(attribute = "path", description = """The path and filename. Only folders in the path will be created. E.g. a value of "X" would result in no folders being created, but for "X/Y" or "X/Y.pdf", a folder named "X" would be created."""))) +@WritesAttributes(Array(new WritesAttribute(attribute = "gmdata.parentoid", description="The status code returned by GM Data when calling the props endpoint."))) class GetOidForPath extends AbstractProcessor with GetOidForPathUtils { import scala.collection.JavaConverters._