Github user kevdoran commented on a diff in the pull request:
https://github.com/apache/nifi-minifi/pull/118#discussion_r175573944
--- Diff:
minifi-c2/minifi-c2-web-api/src/main/java/org/apache/nifi/minifi/c2/web/api/AgentClassResource.java
---
@@ -0,0 +1,132 @@
+/*
+ * 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.c2.web.api;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.apache.nifi.minifi.c2.model.AgentClass;
+import org.springframework.stereotype.Component;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.NotSupportedException;
+import javax.ws.rs.PATCH;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+@Component
+@Path("/agent-classes")
+@Api(value = "Agent Classes", description = "Register and manage agent
class definitions")
+public class AgentClassResource {
+
+ @POST
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ @ApiOperation(
+ value = "Register a MiNiFi agent class with this C2 server",
+ notes = "This can also be done with a heartbeat, which will
register a MiNiFi agent class the first time it is seen in a heartbeat.",
+ response = AgentClass.class
+ )
+ public Response createAgentClass(
+ @ApiParam(value = "The class to create", required = true)
+ AgentClass agentClass) {
+ throw new NotSupportedException("This method is not yet
implemented for this resource.");
+
+ }
+
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ @ApiOperation(
+ value = "Get all MiNiFi agent classes that are registered with
this C2 server",
+ response = AgentClass.class,
+ responseContainer = "List"
+ )
+ public Response getAgentClasses() {
--- End diff --
- [ ] Add ReadOnly NiFi Registry URL, Bucket, and Flow ID metadata when
retrieving Agent classes (so that the flow designer knows where to read/save a
flow)
---