File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
src/main/java/org/apache/nifi/registry/flow Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,27 @@ default FlowRegistryBranch getDefaultBranch(final FlowRegistryClientConfiguratio
119119 return branch ;
120120 }
121121
122+ /**
123+ * Creates a new branch in the Flow Registry for the specified flow.
124+ *
125+ * Implementations that do not support branching should rely on this default method, which throws an
126+ * {@link UnsupportedOperationException}. Implementations that support branching must override this method
127+ * and perform any required validation to ensure that the new branch can be created.
128+ *
129+ * @param context Configuration context
130+ * @param sourceLocation The location of the flow version that will act as the source for the new branch. The version may be {@code null}
131+ * to indicate that the registry implementation should select a default, such as the latest version on the source branch.
132+ * @param branchName The name of the branch to create
133+ *
134+ * @throws FlowRegistryException If an issue happens during processing the request.
135+ * @throws IOException If there is issue with the communication between NiFi and the Flow Registry.
136+ * @throws UnsupportedOperationException If the registry does not support branching.
137+ */
138+ default void createBranch (FlowRegistryClientConfigurationContext context , FlowVersionLocation sourceLocation , String branchName )
139+ throws FlowRegistryException , IOException {
140+ throw new UnsupportedOperationException ("Branch creation is not supported by this Flow Registry Client" );
141+ }
142+
122143 /**
123144 * Gets the buckets for the specified user.
124145 *
You can’t perform that action at this time.
0 commit comments