bbende commented on a change in pull request #181: NIFIREG-267 Updating data 
model to capture parameter contexts
URL: https://github.com/apache/nifi-registry/pull/181#discussion_r283915771
 
 

 ##########
 File path: 
nifi-registry-core/nifi-registry-data-model/src/main/java/org/apache/nifi/registry/flow/VersionedParameterContext.java
 ##########
 @@ -0,0 +1,45 @@
+/*
+ * 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.registry.flow;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Set;
+
+public class VersionedParameterContext {
+
 
 Review comment:
   I think since the context on the registry side is just a template of the 
parameters (i.e. not a version controlled thing on its own), that we are ok 
with just a name. The NiFi side will definitely have an id so that contexts can 
be renamed, but that id is only relevant to the local NiFi. 
   
   When you save a flow with a param context, and import to the next 
environment for the first time, it would create a new context with a new local 
id and the same name from the flow snapshot.
   
   Lets say you then went back to the first environment and renamed the context 
and saved v2. When you go to the second environment and upgrade the flow to v2, 
there is already a context selected, so you would have the options of:
   
   1) Select an existing local context
   2) Create new context, with values initially populated from the values saved 
in Flow Registry
   3) Create new context, by copying values from an existing local context

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to