Re: [PR] NIFI-12644:Exported json flows does not match minifi json schema resolved by adding new method Transform to convert Nifi Flow json to MiNifi flow json [nifi]

2024-02-20 Thread via GitHub


briansolo1985 closed pull request #8393: NIFI-12644:Exported json flows does 
not match minifi json schema resolved by adding new method Transform to convert 
Nifi Flow json to MiNifi flow json
URL: https://github.com/apache/nifi/pull/8393


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] NIFI-12644:Exported json flows does not match minifi json schema resolved by adding new method Transform to convert Nifi Flow json to MiNifi flow json [nifi]

2024-02-19 Thread via GitHub


AjayPremarajan closed pull request #8393: NIFI-12644:Exported json flows does 
not match minifi json schema resolved by adding new method Transform to convert 
Nifi Flow json to MiNifi flow json
URL: https://github.com/apache/nifi/pull/8393


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] NIFI-12644:Exported json flows does not match minifi json schema resolved by adding new method Transform to convert Nifi Flow json to MiNifi flow json [nifi]

2024-02-14 Thread via GitHub


briansolo1985 commented on code in PR #8393:
URL: https://github.com/apache/nifi/pull/8393#discussion_r1489093457


##
minifi/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/json/TransformCommandFactory.java:
##
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.minifi.toolkit.configuration.json;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.apache.nifi.controller.flow.VersionedDataflow;
+import org.apache.nifi.minifi.toolkit.configuration.ConfigMain;
+import org.apache.nifi.minifi.toolkit.configuration.ConfigTransformException;
+import org.apache.nifi.minifi.toolkit.configuration.PathInputStreamFactory;
+import org.apache.nifi.minifi.toolkit.configuration.PathOutputStreamFactory;
+import org.apache.nifi.registry.flow.RegisteredFlowSnapshot;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import 
com.fasterxml.jackson.module.jakarta.xmlbind.JakartaXmlBindAnnotationIntrospector;
+
+public class TransformCommandFactory {
+
+public static final String TRANSFORM = "transform";
+
+private static final String COMMAND_DESCRIPTION = "Transform NiFi flow 
JSON format into MiNifi flow JSON format";
+private static final String PROPERTY_KEY_VALUE_DELIMITER = "=";

Review Comment:
   This member is not used, and can be safely removed.



##
minifi/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/json/TransformCommandFactory.java:
##
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.minifi.toolkit.configuration.json;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.apache.nifi.controller.flow.VersionedDataflow;
+import org.apache.nifi.minifi.toolkit.configuration.ConfigMain;
+import org.apache.nifi.minifi.toolkit.configuration.ConfigTransformException;
+import org.apache.nifi.minifi.toolkit.configuration.PathInputStreamFactory;
+import org.apache.nifi.minifi.toolkit.configuration.PathOutputStreamFactory;
+import org.apache.nifi.registry.flow.RegisteredFlowSnapshot;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import 
com.fasterxml.jackson.module.jakarta.xmlbind.JakartaXmlBindAnnotationIntrospector;
+
+public class TransformCommandFactory {
+
+public static final String TRANSFORM = "transform";
+
+private static final String COMMAND_DESCRIPTION = "Transform NiFi flow 
JSON format into MiNifi flow JSON format";
+private static final String PROPERTY_KEY_VALUE_DELIMITER = "=";
+
+private final PathInputStreamFactory pathInputStreamFactory;
+private final PathOutputStreamFactory pathOutputStreamFactory;
+
+public TransformCommandFactory(PathInputStreamFactory 
pathInputStreamFactory,
+PathOutputStreamFactory pathOutputStreamFactory) {
+this.pathInputStreamFactory = pathInputStreamFactory;
+this.pathOutputStreamFactory = pathOutputStreamFactory;
+}
+
+public ConfigMain.Command create() {
+return new ConfigMain.Command(this::transformToJson, 

Re: [PR] NIFI-12644:Exported json flows does not match minifi json schema resolved by adding new method Transform to convert Nifi Flow json to MiNifi flow json [nifi]

2024-02-12 Thread via GitHub


AjayPremarajan closed pull request #8393: NIFI-12644:Exported json flows does 
not match minifi json schema resolved by adding new method Transform to convert 
Nifi Flow json to MiNifi flow json
URL: https://github.com/apache/nifi/pull/8393


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] NIFI-12644:Exported json flows does not match minifi json schema resolved by adding new method Transform to convert Nifi Flow json to MiNifi flow json [nifi]

2024-02-12 Thread via GitHub


AjayPremarajan opened a new pull request, #8393:
URL: https://github.com/apache/nifi/pull/8393

   
   
   
   
   
   
   
   
   
   
   
   
   
   # Summary
   
   [NIFI-0](https://issues.apache.org/jira/browse/NIFI-0)
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [ ] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue 
created
   
   ### Pull Request Tracking
   
   - [ ] Pull Request title starts with Apache NiFi Jira issue number, such as 
`NIFI-0`
   - [ ] Pull Request commit message starts with Apache NiFi Jira issue number, 
as such `NIFI-0`
   
   ### Pull Request Formatting
   
   - [ ] Pull Request based on current revision of the `main` branch
   - [ ] Pull Request refers to a feature branch with one commit containing 
changes
   
   # Verification
   
   Please indicate the verification steps performed prior to pull request 
creation.
   
   ### Build
   
   - [ ] Build completed using `mvn clean install -P contrib-check`
 - [ ] JDK 21
   
   ### Licensing
   
   - [ ] New dependencies are compatible with the [Apache License 
2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License 
Policy](https://www.apache.org/legal/resolved.html)
   - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` 
files
   
   ### Documentation
   
   - [ ] Documentation formatting appears as expected in rendered files
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org