http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ControllerStatusDTO.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ControllerStatusDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ControllerStatusDTO.java index bd2eca6..7afc7bc 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ControllerStatusDTO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ControllerStatusDTO.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.dto.status; +import com.wordnik.swagger.annotations.ApiModelProperty; import java.util.List; import javax.xml.bind.annotation.XmlType; import org.apache.nifi.web.api.dto.BulletinDTO; @@ -45,6 +46,9 @@ public class ControllerStatusDTO { * * @return The active thread count */ + @ApiModelProperty( + value = "The number of active threads in the NiFi." + ) public Integer getActiveThreadCount() { return activeThreadCount; } @@ -56,6 +60,9 @@ public class ControllerStatusDTO { /** * @return queue for the controller */ + @ApiModelProperty( + value = "The number of flowfilew queued in the NiFi." + ) public String getQueued() { return queued; } @@ -67,6 +74,9 @@ public class ControllerStatusDTO { /** * @return Used in clustering, will report the number of nodes connected vs the number of nodes in the cluster */ + @ApiModelProperty( + value = "When clustered, reports the number of nodes connected vs the number of nodes in the cluster." + ) public String getConnectedNodes() { return connectedNodes; } @@ -78,6 +88,9 @@ public class ControllerStatusDTO { /** * @return System bulletins to be reported to the user */ + @ApiModelProperty( + value = "System level bulletins to be reported to the user." + ) public List<BulletinDTO> getBulletins() { return bulletins; } @@ -89,6 +102,9 @@ public class ControllerStatusDTO { /** * @return whether or not there are pending user requests */ + @ApiModelProperty( + value = "Whether there are any pending user account requests." + ) public Boolean getHasPendingAccounts() { return hasPendingAccounts; } @@ -100,6 +116,9 @@ public class ControllerStatusDTO { /** * @return number of running components in this controller */ + @ApiModelProperty( + value = "The number of running components in the NiFi." + ) public Integer getRunningCount() { return runningCount; } @@ -111,6 +130,9 @@ public class ControllerStatusDTO { /** * @return number of stopped components in this controller */ + @ApiModelProperty( + value = "The number of stopped components in the NiFi." + ) public Integer getStoppedCount() { return stoppedCount; } @@ -122,6 +144,9 @@ public class ControllerStatusDTO { /** * @return number of invalid components in this controller */ + @ApiModelProperty( + value = "The number of invalid components in the NiFi." + ) public Integer getInvalidCount() { return invalidCount; } @@ -133,6 +158,9 @@ public class ControllerStatusDTO { /** * @return number of disabled components in this controller */ + @ApiModelProperty( + value = "The number of disabled components in the NiFi." + ) public Integer getDisabledCount() { return disabledCount; } @@ -144,6 +172,9 @@ public class ControllerStatusDTO { /** * @return number of active remote ports in this controller */ + @ApiModelProperty( + value = "The number of active remote ports in the NiFi." + ) public Integer getActiveRemotePortCount() { return activeRemotePortCount; } @@ -155,6 +186,9 @@ public class ControllerStatusDTO { /** * @return number of inactive remote ports in this controller */ + @ApiModelProperty( + value = "The number of inactive remote ports in the NiFi." + ) public Integer getInactiveRemotePortCount() { return inactiveRemotePortCount; }
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeConnectionStatusDTO.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeConnectionStatusDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeConnectionStatusDTO.java index 39fb5ce..bcc4045 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeConnectionStatusDTO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeConnectionStatusDTO.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.dto.status; +import com.wordnik.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlType; import org.apache.nifi.web.api.dto.NodeDTO; @@ -31,6 +32,9 @@ public class NodeConnectionStatusDTO { /** * @return the node */ + @ApiModelProperty( + value = "The node." + ) public NodeDTO getNode() { return node; } @@ -42,6 +46,9 @@ public class NodeConnectionStatusDTO { /** * @return connection's status */ + @ApiModelProperty( + value = "The connection status from the node." + ) public ConnectionStatusDTO getConnectionStatus() { return connectionStatus; } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodePortStatusDTO.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodePortStatusDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodePortStatusDTO.java index 91a6d01..3b37e9d 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodePortStatusDTO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodePortStatusDTO.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.dto.status; +import com.wordnik.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlType; import org.apache.nifi.web.api.dto.NodeDTO; @@ -31,6 +32,9 @@ public class NodePortStatusDTO { /** * @return the node */ + @ApiModelProperty( + value = "The node." + ) public NodeDTO getNode() { return node; } @@ -42,6 +46,9 @@ public class NodePortStatusDTO { /** * @return port status */ + @ApiModelProperty( + value = "The port status from the node." + ) public PortStatusDTO getPortStatus() { return portStatus; } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeProcessGroupStatusDTO.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeProcessGroupStatusDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeProcessGroupStatusDTO.java index 5f965b2..96c59fa 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeProcessGroupStatusDTO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeProcessGroupStatusDTO.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.dto.status; +import com.wordnik.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlType; import org.apache.nifi.web.api.dto.NodeDTO; @@ -33,6 +34,9 @@ public class NodeProcessGroupStatusDTO { * * @return The node DTO */ + @ApiModelProperty( + value = "The node." + ) public NodeDTO getNode() { return node; } @@ -46,6 +50,9 @@ public class NodeProcessGroupStatusDTO { * * @return The process group status */ + @ApiModelProperty( + value = "The process group status from the node." + ) public ProcessGroupStatusDTO getProcessGroupStatus() { return processGroupStatus; } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeProcessorStatusDTO.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeProcessorStatusDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeProcessorStatusDTO.java index 86d13d5..8c8f604 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeProcessorStatusDTO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeProcessorStatusDTO.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.dto.status; +import com.wordnik.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlType; import org.apache.nifi.web.api.dto.NodeDTO; @@ -31,6 +32,9 @@ public class NodeProcessorStatusDTO { /** * @return the node */ + @ApiModelProperty( + value = "The node." + ) public NodeDTO getNode() { return node; } @@ -42,6 +46,9 @@ public class NodeProcessorStatusDTO { /** * @return processor's status */ + @ApiModelProperty( + value = "The processor status from the node." + ) public ProcessorStatusDTO getProcessorStatus() { return processorStatus; } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeRemoteProcessGroupStatusDTO.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeRemoteProcessGroupStatusDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeRemoteProcessGroupStatusDTO.java index 12a0ca0..512b4c2 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeRemoteProcessGroupStatusDTO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeRemoteProcessGroupStatusDTO.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.dto.status; +import com.wordnik.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlType; import org.apache.nifi.web.api.dto.NodeDTO; @@ -31,6 +32,9 @@ public class NodeRemoteProcessGroupStatusDTO { /** * @return the node */ + @ApiModelProperty( + value = "The node." + ) public NodeDTO getNode() { return node; } @@ -42,6 +46,9 @@ public class NodeRemoteProcessGroupStatusDTO { /** * @return remote process group's status */ + @ApiModelProperty( + value = "The remote process group status from the node." + ) public RemoteProcessGroupStatusDTO getRemoteProcessGroupStatus() { return remoteProcessGroupStatus; } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeStatusDTO.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeStatusDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeStatusDTO.java index b770015..3f07f3d 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeStatusDTO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeStatusDTO.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.dto.status; +import com.wordnik.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlType; import org.apache.nifi.web.api.dto.NodeDTO; @@ -31,6 +32,9 @@ public class NodeStatusDTO { /** * @return the node */ + @ApiModelProperty( + value = "The node." + ) public NodeDTO getNode() { return node; } @@ -42,6 +46,9 @@ public class NodeStatusDTO { /** * @return the controller status */ + @ApiModelProperty( + value = "The controller status for each node." + ) public ProcessGroupStatusDTO getControllerStatus() { return controllerStatus; } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeStatusHistoryDTO.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeStatusHistoryDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeStatusHistoryDTO.java index 9a7cb16..5cf9f41 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeStatusHistoryDTO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/NodeStatusHistoryDTO.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.dto.status; +import com.wordnik.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlType; import org.apache.nifi.web.api.dto.NodeDTO; @@ -31,6 +32,9 @@ public class NodeStatusHistoryDTO { /** * @return the node */ + @ApiModelProperty( + value = "The node." + ) public NodeDTO getNode() { return node; } @@ -42,6 +46,9 @@ public class NodeStatusHistoryDTO { /** * @return processor status history */ + @ApiModelProperty( + value = "The processor status for each node." + ) public StatusHistoryDTO getStatusHistory() { return statusHistory; } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/PortStatusDTO.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/PortStatusDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/PortStatusDTO.java index e4cbd34..c1d95d0 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/PortStatusDTO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/PortStatusDTO.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.dto.status; +import com.wordnik.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlType; /** @@ -36,6 +37,9 @@ public class PortStatusDTO extends StatusDTO { /** * @return whether this port has incoming or outgoing connections to a remote NiFi */ + @ApiModelProperty( + value = "Whether the port has incoming or outgoing connections to a remote NiFi." + ) public Boolean isTransmitting() { return transmitting; } @@ -47,6 +51,9 @@ public class PortStatusDTO extends StatusDTO { /** * @return the active thread count for this port */ + @ApiModelProperty( + value = "The active thread count for the port." + ) public Integer getActiveThreadCount() { return activeThreadCount; } @@ -58,6 +65,9 @@ public class PortStatusDTO extends StatusDTO { /** * @return id of this port */ + @ApiModelProperty( + value = "The id of the port." + ) public String getId() { return id; } @@ -69,6 +79,9 @@ public class PortStatusDTO extends StatusDTO { /** * @return id of the group this port resides in */ + @ApiModelProperty( + value = "The id of the parent process group of the port." + ) public String getGroupId() { return groupId; } @@ -80,6 +93,9 @@ public class PortStatusDTO extends StatusDTO { /** * @return name of this port */ + @ApiModelProperty( + value = "The name of the port." + ) public String getName() { return name; } @@ -91,6 +107,9 @@ public class PortStatusDTO extends StatusDTO { /** * @return run status of this port */ + @ApiModelProperty( + value = "The run status of the port." + ) public String getRunStatus() { return runStatus; } @@ -102,6 +121,9 @@ public class PortStatusDTO extends StatusDTO { /** * @return The total count and size of flow files that have been accepted in the last five minutes */ + @ApiModelProperty( + value = "The count/size of flowfiles that have been accepted in the last 5 minutes." + ) public String getInput() { return input; } @@ -113,6 +135,9 @@ public class PortStatusDTO extends StatusDTO { /** * @return The total count and size of flow files that have been processed in the last five minutes */ + @ApiModelProperty( + value = "The count/size of flowfiles that have been processed in the last 5 minutes." + ) public String getOutput() { return output; } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessGroupStatusDTO.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessGroupStatusDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessGroupStatusDTO.java index 6aa445a..3ebae8f 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessGroupStatusDTO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessGroupStatusDTO.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.dto.status; +import com.wordnik.swagger.annotations.ApiModelProperty; import java.util.Collection; import java.util.Date; import javax.xml.bind.annotation.XmlType; @@ -55,6 +56,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { * * @return The id for the process group */ + @ApiModelProperty( + value = "The id of the process group." + ) public String getId() { return id; } @@ -66,6 +70,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { /** * @return name of this process group */ + @ApiModelProperty( + value = "The name of this process group." + ) public String getName() { return name; } @@ -77,6 +84,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { /** * @return active thread count for this process group */ + @ApiModelProperty( + value = "The active thread count for this process group." + ) public Integer getActiveThreadCount() { return activeThreadCount; } @@ -90,6 +100,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { * * @return The status of all connections */ + @ApiModelProperty( + value = "The status of all conenctions in the process group." + ) public Collection<ConnectionStatusDTO> getConnectionStatus() { return connectionStatus; } @@ -103,6 +116,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { * * @return The status of all process groups */ + @ApiModelProperty( + value = "The status of all process groups in the process group." + ) public Collection<ProcessGroupStatusDTO> getProcessGroupStatus() { return processGroupStatus; } @@ -116,6 +132,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { * * @return The status of all remote process groups */ + @ApiModelProperty( + value = "The status of all remote process groups in the process group.." + ) public Collection<RemoteProcessGroupStatusDTO> getRemoteProcessGroupStatus() { return remoteProcessGroupStatus; } @@ -129,6 +148,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { * * @return The status of all processors */ + @ApiModelProperty( + value = "The status of all processors in the process group." + ) public Collection<ProcessorStatusDTO> getProcessorStatus() { return processorStatus; } @@ -142,6 +164,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { * * @return The status of all input ports */ + @ApiModelProperty( + value = "The status of all input ports in the process group." + ) public Collection<PortStatusDTO> getInputPortStatus() { return inputPortStatus; } @@ -155,6 +180,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { * * @return The status of all output ports */ + @ApiModelProperty( + value = "The status of all output ports in the process group." + ) public Collection<PortStatusDTO> getOutputPortStatus() { return outputPortStatus; } @@ -168,6 +196,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { * * @return The output stats */ + @ApiModelProperty( + value = "The output count/size for the process group in the last 5 minutes." + ) public String getOutput() { return output; } @@ -181,6 +212,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { * * @return The transferred status for this process group */ + @ApiModelProperty( + value = "The count/size transferred to/frome queues in the process group in the last 5 minutes." + ) public String getTransferred() { return transferred; } @@ -194,6 +228,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { * * @return The received stats for this process group */ + @ApiModelProperty( + value = "The count/size sent to the process group in the last 5 minutes." + ) public String getReceived() { return received; } @@ -207,6 +244,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { * * @return The sent stats for this process group */ + @ApiModelProperty( + value = "The count/size sent from this process group in the last 5 minutes." + ) public String getSent() { return sent; } @@ -220,6 +260,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { * * @return The queued count for this process group */ + @ApiModelProperty( + value = "The count that is queued for the process group." + ) public String getQueuedCount() { return queuedCount; } @@ -233,6 +276,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { * * @return The queued size for this process group */ + @ApiModelProperty( + value = "The size that is queued for the process group." + ) public String getQueuedSize() { return queuedSize; } @@ -246,6 +292,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { * * @return The queued stats */ + @ApiModelProperty( + value = "The count/size that is queued in the the process group." + ) public String getQueued() { return queued; } @@ -259,6 +308,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { * * @return The read stats */ + @ApiModelProperty( + value = "The number of bytes read in the last 5 minutes." + ) public String getRead() { return read; } @@ -272,6 +324,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { * * @return The written stats */ + @ApiModelProperty( + value = "The number of bytes written in the last 5 minutes." + ) public String getWritten() { return written; } @@ -285,6 +340,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { * * @return The input stats */ + @ApiModelProperty( + value = "The input count/size for the process group in the last 5 minutes." + ) public String getInput() { return input; } @@ -299,6 +357,9 @@ public class ProcessGroupStatusDTO extends StatusDTO { * @return The the status was calculated */ @XmlJavaTypeAdapter(TimeAdapter.class) + @ApiModelProperty( + value = "The time the status for the process group was last refreshed." + ) public Date getStatsLastRefreshed() { return statsLastRefreshed; } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessorStatusDTO.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessorStatusDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessorStatusDTO.java index 21c3d44..1899418 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessorStatusDTO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessorStatusDTO.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.dto.status; +import com.wordnik.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlType; /** @@ -44,6 +45,9 @@ public class ProcessorStatusDTO extends StatusDTO { /** * @return The processor id */ + @ApiModelProperty( + value = "The id of the processor." + ) public String getId() { return id; } @@ -55,6 +59,9 @@ public class ProcessorStatusDTO extends StatusDTO { /** * @return The processor name */ + @ApiModelProperty( + value = "The name of the prcessor." + ) public String getName() { return name; } @@ -66,6 +73,9 @@ public class ProcessorStatusDTO extends StatusDTO { /** * @return The processor type */ + @ApiModelProperty( + value = "The type of the processor." + ) public String getType() { return type; } @@ -77,6 +87,10 @@ public class ProcessorStatusDTO extends StatusDTO { /** * @return run status of this processor */ + @ApiModelProperty( + value = "The state of the processor.", + allowableValues = "RUNNING, STOPPED, DISABLED, INVALID" + ) public String getRunStatus() { return runStatus; } @@ -88,6 +102,9 @@ public class ProcessorStatusDTO extends StatusDTO { /** * @return The total count and size of flow files that have been accepted in the last five minutes */ + @ApiModelProperty( + value = "The count/size of flowfiles that have been accepted in the last 5 minutes." + ) public String getInput() { return input; } @@ -99,6 +116,9 @@ public class ProcessorStatusDTO extends StatusDTO { /** * @return number of bytes read */ + @ApiModelProperty( + value = "The number of bytes read in the last 5 minutes." + ) public String getRead() { return read; } @@ -110,6 +130,9 @@ public class ProcessorStatusDTO extends StatusDTO { /** * @return number of bytes written */ + @ApiModelProperty( + value = "The number of bytes written in the last 5 minutes." + ) public String getWritten() { return written; } @@ -121,6 +144,9 @@ public class ProcessorStatusDTO extends StatusDTO { /** * @return the ID of the Process Group to which this processor belongs. */ + @ApiModelProperty( + value = "The id of the parent process group to which the processor belongs." + ) public String getGroupId() { return groupId; } @@ -132,6 +158,9 @@ public class ProcessorStatusDTO extends StatusDTO { /** * @return The total count and size of flow files that have been processed in the last five minutes */ + @ApiModelProperty( + value = "The count/size of flowfiles that have been processed in the last 5 minutes." + ) public String getOutput() { return output; } @@ -143,6 +172,9 @@ public class ProcessorStatusDTO extends StatusDTO { /** * @return number of threads currently running for this Processor */ + @ApiModelProperty( + value = "The number of threads currently executing in the processor." + ) public Integer getActiveThreadCount() { return activeThreadCount; } @@ -154,6 +186,9 @@ public class ProcessorStatusDTO extends StatusDTO { /** * @return number of task this connectable has had over the last 5 minutes */ + @ApiModelProperty( + value = "The total number of task this connectable has completed over the last 5 minutes." + ) public String getTasks() { return tasks; } @@ -165,6 +200,9 @@ public class ProcessorStatusDTO extends StatusDTO { /** * @return total duration of all tasks for this connectable over the last 5 minutes */ + @ApiModelProperty( + value = "The total duration of all tasks for this connectable over the last 5 minutes." + ) public String getTasksDuration() { return tasksDuration; } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/RemotePortStatusDTO.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/RemotePortStatusDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/RemotePortStatusDTO.java index 58f6161..6778b0d 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/RemotePortStatusDTO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/RemotePortStatusDTO.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.dto.status; +import com.wordnik.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlType; /** @@ -33,6 +34,9 @@ public class RemotePortStatusDTO { /** * @return id of the connection this remote port is connected to */ + @ApiModelProperty( + value = "The id of the conneciton the remote is connected to." + ) public String getConnectionId() { return connectionId; } @@ -44,6 +48,9 @@ public class RemotePortStatusDTO { /** * @return id of the remote port */ + @ApiModelProperty( + value = "The id of the remote port." + ) public String getId() { return id; } @@ -55,6 +62,9 @@ public class RemotePortStatusDTO { /** * @return name of the remote port */ + @ApiModelProperty( + value = "The name of the remote port." + ) public String getName() { return name; } @@ -66,6 +76,9 @@ public class RemotePortStatusDTO { /** * @return whether or not the remote port exists */ + @ApiModelProperty( + value = "Whether or not the remote port exists." + ) public Boolean getExists() { return exists; } @@ -77,6 +90,9 @@ public class RemotePortStatusDTO { /** * @return whether or not the remote port is running */ + @ApiModelProperty( + value = "Whether or not the remote port is running." + ) public Boolean getRunning() { return running; } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/RemoteProcessGroupStatusDTO.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/RemoteProcessGroupStatusDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/RemoteProcessGroupStatusDTO.java index 5f7c2c1..f556deb 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/RemoteProcessGroupStatusDTO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/RemoteProcessGroupStatusDTO.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.dto.status; +import com.wordnik.swagger.annotations.ApiModelProperty; import java.util.List; import javax.xml.bind.annotation.XmlType; @@ -40,6 +41,9 @@ public class RemoteProcessGroupStatusDTO extends StatusDTO { /** * @return The id for the remote process group */ + @ApiModelProperty( + value = "The id of the remote process group." + ) public String getId() { return id; } @@ -51,6 +55,9 @@ public class RemoteProcessGroupStatusDTO extends StatusDTO { /** * @return id of the group this remote process group is in */ + @ApiModelProperty( + value = "The id of the parent process group the remote process group resides in." + ) public String getGroupId() { return groupId; } @@ -62,6 +69,9 @@ public class RemoteProcessGroupStatusDTO extends StatusDTO { /** * @return URI of the target system */ + @ApiModelProperty( + value = "The URI of the target system." + ) public String getTargetUri() { return targetUri; } @@ -73,6 +83,9 @@ public class RemoteProcessGroupStatusDTO extends StatusDTO { /** * @return name of this remote process group */ + @ApiModelProperty( + value = "The name of the remote process group." + ) public String getName() { return name; } @@ -84,6 +97,9 @@ public class RemoteProcessGroupStatusDTO extends StatusDTO { /** * @return transmission status of this remote process group */ + @ApiModelProperty( + value = "The transmission status of the remote process group." + ) public String getTransmissionStatus() { return transmissionStatus; } @@ -95,6 +111,9 @@ public class RemoteProcessGroupStatusDTO extends StatusDTO { /** * @return number of active threads */ + @ApiModelProperty( + value = "The number of active threads for the remote process group." + ) public Integer getActiveThreadCount() { return activeThreadCount; } @@ -106,6 +125,9 @@ public class RemoteProcessGroupStatusDTO extends StatusDTO { /** * @return any remote authorization issues for this remote process group */ + @ApiModelProperty( + value = "Any remote authorization issues for the remote process group." + ) public List<String> getAuthorizationIssues() { return authorizationIssues; } @@ -117,6 +139,9 @@ public class RemoteProcessGroupStatusDTO extends StatusDTO { /** * @return Formatted description of the amount of data sent to this remote process group */ + @ApiModelProperty( + value = "The count/size of the flowfiles sent to the remote process group in the last 5 minutes." + ) public String getSent() { return sent; } @@ -128,6 +153,9 @@ public class RemoteProcessGroupStatusDTO extends StatusDTO { /** * @return Formatted description of the amount of data received from this remote process group */ + @ApiModelProperty( + value = "The count/size of the flowfiles received from the remote process group in the last 5 minutes." + ) public String getReceived() { return received; } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusDTO.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusDTO.java index e922b70..39b9c06 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusDTO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusDTO.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.dto.status; +import com.wordnik.swagger.annotations.ApiModelProperty; import java.util.List; import javax.xml.bind.annotation.XmlType; import org.apache.nifi.web.api.dto.BulletinDTO; @@ -31,6 +32,9 @@ public abstract class StatusDTO { /** * @return Bulletins for this component */ + @ApiModelProperty( + value = "The current bulletins for the component." + ) public List<BulletinDTO> getBulletins() { return bulletins; } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusDescriptorDTO.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusDescriptorDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusDescriptorDTO.java index 65823d5..0a3c418 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusDescriptorDTO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusDescriptorDTO.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.dto.status; +import com.wordnik.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlType; /** @@ -25,7 +26,6 @@ import javax.xml.bind.annotation.XmlType; public class StatusDescriptorDTO { public enum Formatter { - COUNT, DURATION, DATA_SIZE @@ -49,6 +49,9 @@ public class StatusDescriptorDTO { /** * @return name of this status field */ + @ApiModelProperty( + value = "The name of the status field." + ) public String getField() { return field; } @@ -60,6 +63,9 @@ public class StatusDescriptorDTO { /** * @return label of this status field */ + @ApiModelProperty( + value = "The label for the status field." + ) public String getLabel() { return label; } @@ -71,6 +77,9 @@ public class StatusDescriptorDTO { /** * @return description of this status field */ + @ApiModelProperty( + value = "The description of the status field." + ) public String getDescription() { return description; } @@ -82,6 +91,9 @@ public class StatusDescriptorDTO { /** * @return formatter for this descriptor */ + @ApiModelProperty( + value = "The formatter for the status descriptor." + ) public String getFormatter() { return formatter; } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusHistoryDTO.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusHistoryDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusHistoryDTO.java index a996365..c0ef33b 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusHistoryDTO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusHistoryDTO.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.dto.status; +import com.wordnik.swagger.annotations.ApiModelProperty; import java.util.Date; import java.util.LinkedHashMap; import java.util.List; @@ -40,6 +41,9 @@ public class StatusHistoryDTO { * @return when this status history was generated */ @XmlJavaTypeAdapter(TimeAdapter.class) + @ApiModelProperty( + value = "The timestamp when the status history was generated." + ) public Date getGenerated() { return generated; } @@ -51,6 +55,9 @@ public class StatusHistoryDTO { /** * @return The component details for this status history */ + @ApiModelProperty( + value = "The component details for the status history." + ) public LinkedHashMap<String, String> getDetails() { return details; } @@ -62,6 +69,9 @@ public class StatusHistoryDTO { /** * @return Descriptors for each supported status field */ + @ApiModelProperty( + value = "The descriptor for each support status field." + ) public List<StatusDescriptorDTO> getFieldDescriptors() { return fieldDescriptors; } @@ -73,6 +83,9 @@ public class StatusHistoryDTO { /** * @return The status snapshots */ + @ApiModelProperty( + value = "The status snapshots." + ) public List<StatusSnapshotDTO> getStatusSnapshots() { return statusSnapshots; } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusHistoryDetailDTO.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusHistoryDetailDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusHistoryDetailDTO.java index 4ebb5e3..e78641e 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusHistoryDetailDTO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusHistoryDetailDTO.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.dto.status; +import com.wordnik.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlType; /** @@ -30,6 +31,9 @@ public class StatusHistoryDetailDTO { /** * @return label for this status detail */ + @ApiModelProperty( + value = "The label for the status detail." + ) public String getLabel() { return label; } @@ -41,6 +45,9 @@ public class StatusHistoryDetailDTO { /** * @return value for this status detail */ + @ApiModelProperty( + value = "The value for the status detail." + ) public String getValue() { return value; } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusSnapshotDTO.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusSnapshotDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusSnapshotDTO.java index b39fd60..24d801f 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusSnapshotDTO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/StatusSnapshotDTO.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.dto.status; +import com.wordnik.swagger.annotations.ApiModelProperty; import java.util.Date; import java.util.Map; import javax.xml.bind.annotation.XmlType; @@ -32,6 +33,9 @@ public class StatusSnapshotDTO { /** * @return timestamp of this snapshot */ + @ApiModelProperty( + value = "The timestamp of the snapshot." + ) public Date getTimestamp() { return timestamp; } @@ -43,6 +47,9 @@ public class StatusSnapshotDTO { /** * @return status metrics */ + @ApiModelProperty( + value = "The status metrics." + ) public Map<String, Long> getStatusMetrics() { return statusMetrics; } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/Entity.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/Entity.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/Entity.java index e2bb3e7..ad3a7de 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/Entity.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/Entity.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.web.api.entity; +import com.wordnik.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlRootElement; import org.apache.nifi.web.api.dto.RevisionDTO; @@ -30,6 +31,9 @@ public class Entity { /** * @return revision for this request/response */ + @ApiModelProperty( + value = "The revision for this request/response. The revision is required for any mutable flow requests and is included in all responses." + ) public RevisionDTO getRevision() { return revision; } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml index 5a87ff8..20afb61 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml @@ -23,56 +23,6 @@ <groupId>org.apache.nifi</groupId> <artifactId>nifi-web-api</artifactId> <packaging>war</packaging> - <profiles> - <profile> - <id>docs</id> - <activation> - <activeByDefault>false</activeByDefault> - </activation> - <build> - <resources> - <resource> - <directory>src/main/enunciate/images</directory> - <targetPath>${project.build.directory}/${project.artifactId}-${project.version}/docs/rest-api/img</targetPath> - </resource> - </resources> - <plugins> - <plugin> - <groupId>org.codehaus.enunciate</groupId> - <artifactId>maven-enunciate-plugin</artifactId> - <version>1.28</version> - <configuration> - <configFile>src/main/enunciate/enunciate.xml</configFile> - </configuration> - <executions> - <execution> - <goals> - <goal>docs</goal> - </goals> - <configuration> - <docsDir>${project.build.directory}/${project.artifactId}-${project.version}/docs/rest-api</docsDir> - </configuration> - </execution> - </executions> - <!-- - Enunciate currently uses APT to process class annotations. APT - has been deprecated in Java 7. As a result, a direct dependency - must be added to tools.jar where APT is located. - --> - <dependencies> - <dependency> - <groupId>com.sun</groupId> - <artifactId>tools</artifactId> - <version>1.7.0</version> - <scope>system</scope> - <systemPath>${java.home}/../lib/tools.jar</systemPath> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - </profile> - </profiles> <build> <resources> <resource> @@ -89,6 +39,69 @@ <reuseForks>false</reuseForks> </configuration> </plugin> + <plugin> + <groupId>com.github.kongchen</groupId> + <artifactId>swagger-maven-plugin</artifactId> + <version>3.0-M1</version> + <executions> + <execution> + <phase>compile</phase> + <goals> + <goal>generate</goal> + </goals> + <configuration> + <apiSources> + <apiSource> + <locations>org.apache.nifi.web.api</locations> + <schemes>http,https</schemes> + <basePath>/nifi-api</basePath> + <info> + <title>NiFi Rest Api</title> + <version>${project.version}</version> + <description> + The Rest Api provides programmatic access to command and control a NiFi instance in real time. Start and + stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description, + definitions of the expected input and output, potential response codes, and the authorities required + to invoke each service. + </description> + <contact> + <email>d...@nifi.incubator.apache.org</email> + <url>https://nifi.incubator.apache.org</url> + </contact> + <license> + <url>http://www.apache.org/licenses/LICENSE-2.0.html</url> + <name>Apache 2.0</name> + </license> + </info> + <templatePath>classpath:/templates/index.html.hbs</templatePath> + <outputPath>${project.build.directory}/${project.artifactId}-${project.version}/docs/rest-api/index.html</outputPath> + <swaggerDirectory>${project.build.directory}/swagger-ui</swaggerDirectory> + </apiSource> + </apiSources> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-resources-plugin</artifactId> + <executions> + <execution> + <id>copy-resources</id> + <phase>validate</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}/docs/rest-api/images</outputDirectory> + <resources> + <resource> + <directory>src/main/resources/images</directory> + </resource> + </resources> + </configuration> + </execution> + </executions> + </plugin> </plugins> </build> <dependencies> @@ -113,21 +126,9 @@ <scope>provided</scope> </dependency> <dependency> - <groupId>org.codehaus.enunciate</groupId> - <artifactId>enunciate-core-annotations</artifactId> - <version>1.28</version> - </dependency> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>nifi-client-dto</artifactId> - <classifier>sources</classifier> - <scope>provided</scope> - <optional>true</optional> - <version>0.1.0-incubating-SNAPSHOT</version> - </dependency> - <dependency> <groupId>org.apache.nifi</groupId> <artifactId>nifi-data-provenance-utils</artifactId> + <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.nifi</groupId> @@ -198,6 +199,11 @@ <scope>provided</scope> </dependency> <dependency> + <groupId>com.wordnik</groupId> + <artifactId>swagger-annotations</artifactId> + <scope>provided</scope> + </dependency> + <dependency> <groupId>org.quartz-scheduler</groupId> <artifactId>quartz</artifactId> <scope>provided</scope> @@ -208,6 +214,11 @@ <scope>provided</scope> </dependency> <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + <scope>provided</scope> + </dependency> + <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <scope>provided</scope> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/enunciate/enunciate.xml ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/enunciate/enunciate.xml b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/enunciate/enunciate.xml deleted file mode 100644 index daaa553..0000000 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/enunciate/enunciate.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0"?> -<!-- - 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. ---> -<enunciate label="NiFi" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.28.xsd"> - - <disable-rule id="all.warnings"/> - - <modules> - <c disabled="true"/> - <obj-c disabled="true"/> - <csharp disabled="true"/> - <jaxws-client disabled="true"/> - <jaxws-ri disabled="true"/> - <jaxws-support disabled="true"/> - <xfire-client disabled="true"/> - <rest disabled="true"/> - <jersey useSubcontext="false" usePathBasedConneg="false"/> - <docs splashPackage="org.apache.nifi.web.api" includeDefaultDownloads="false"> - <additional-css file="override.css"/> - </docs> - </modules> -</enunciate> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/enunciate/images/home.png ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/enunciate/images/home.png b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/enunciate/images/home.png deleted file mode 100644 index be12052..0000000 Binary files a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/enunciate/images/home.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/enunciate/override.css ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/enunciate/override.css b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/enunciate/override.css deleted file mode 100644 index 1cd8e7f..0000000 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/enunciate/override.css +++ /dev/null @@ -1,178 +0,0 @@ -/* - 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. -*/ - -@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic|Noto+Serif:400,400italic,700,700italic|Droid+Sans+Mono:400"; - -html, html a { - -webkit-font-smoothing: antialiased; - text-shadow: 1px 1px 1px rgba(0,0,0,0.004); -} - -#site-name { - padding-left: 0; -} - -#site-name a { - font-variant: normal !important; - letter-spacing: 1px; -} - -#primary { - padding-right: 0; -} - -#primary li:hover { - border-bottom: 6px solid #7098ad; -} - -.xbreadcrumbs { - background-color: #7098ad !important; - color: #fff !important; -} - -.xbreadcrumbs li a, .xbreadcrumbs li.current a { - font-size: 13px !important; - color: #fff !important; -} - -.xbreadcrumbs li a.home { - background: url(img/home.png) no-repeat left center; - line-height: 16px; -} - -.xbreadcrumbs li ul { - top: 26px !important; - background-color: #e3ebee !important; -} - -.xbreadcrumbs li ul li a, .xbreadcrumbs li.current ul li a { - color: #444 !important; -} - -.home { - color: #444; - font-family: "Open Sans","DejaVu Sans",sans-serif !important; -} - -p { - font-family: 'Noto Serif', 'DejaVu Serif', serif; - font-size: 16px; -} - -p strong { - font-weight: bold; -} - -a { - color: #496878; -} - -a:hover { - color: #6a90a4; -} - -.container { - width: 940px !important; - padding: 0 10px; - background-color: #fff; -} - -#main h2, #main h3 { - border-width: 0; -} - -#main p.note { - background-color: #fefefe; - border: 1px solid #ccc; - border-left: 6px solid #ccc; - color: #555; - display: block; - margin-bottom: 12px; - padding: 5px 8px; - font-family: "Open Sans","DejaVu Sans",sans-serif; - font-size: 16px; -} - -ul.navigation li, ul.xbreadcrumbs li { - font-family: "Open Sans","DejaVu Sans",sans-serif; - font-size: 16px; -} - -ul li { - font-family: 'Noto Serif', 'DejaVu Serif', serif; - font-size: 16px; -} - -/* tables */ - -table { - background-color: #fefefe; - border: 1px solid #ccc; - border-left: 6px solid #ccc; - color: #555; - display: block; - margin-bottom: 12px; - padding: 5px 8px; -} - -table tbody tr td { - font-size: 14px; - vertical-align:top; - text-align:left; - padding: 4px; - border-width: 0; -} - -table tbody tr th { - font-size: 16px; - vertical-align:top; - text-align:left; - padding: 4px; - border-width: 0; -} - -/* code */ - -code { - font-size: 14px; - background-color: #fefefe; - border: 1px solid #ccc; - border-left: 6px solid #ccc; - color: #555; - margin-bottom: 10px; - padding: 5px 8px; - white-space: pre; -} - -h1, h2 { - font-weight: normal; - color: #ba3925; -} - -/* footer */ - -#footer { - border-top: 3px solid #eee; -} - -/* width */ - -.span-18 { - width: 921px !important; -} - -.span-20 { - width: 935px !important; -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/997ed946/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/BulletinBoardResource.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/BulletinBoardResource.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/BulletinBoardResource.java index 7c59cea..6197953 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/BulletinBoardResource.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/BulletinBoardResource.java @@ -16,8 +16,16 @@ */ package org.apache.nifi.web.api; +import com.wordnik.swagger.annotations.Api; +import com.wordnik.swagger.annotations.ApiOperation; +import com.wordnik.swagger.annotations.ApiParam; +import com.wordnik.swagger.annotations.ApiResponse; +import com.wordnik.swagger.annotations.ApiResponses; +import com.wordnik.swagger.annotations.Authorization; +import javax.ws.rs.Consumes; import javax.ws.rs.DefaultValue; import javax.ws.rs.GET; +import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; @@ -32,7 +40,6 @@ import org.apache.nifi.web.api.request.ClientIdParameter; import org.apache.nifi.web.api.request.IntegerParameter; import org.apache.nifi.web.api.request.LongParameter; import org.apache.commons.lang3.StringUtils; -import org.codehaus.enunciate.jaxrs.TypeHint; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.access.prepost.PreAuthorize; @@ -40,6 +47,7 @@ import org.springframework.security.access.prepost.PreAuthorize; /** * RESTful endpoint for managing a Template. */ +@Api(hidden = true) public class BulletinBoardResource extends ApplicationResource { private static final Logger logger = LoggerFactory.getLogger(BulletinBoardResource.class); @@ -49,8 +57,11 @@ public class BulletinBoardResource extends ApplicationResource { /** * Retrieves all the of templates in this NiFi. * - * @param clientId Optional client id. If the client id is not specified, a new one will be generated. This value (whether specified or generated) is included in the response. - * @param after Supporting querying for bulletins after a particular bulletin id. + * @param clientId Optional client id. If the client id is not specified, a + * new one will be generated. This value (whether specified or generated) is + * included in the response. + * @param after Supporting querying for bulletins after a particular + * bulletin id. * @param limit The max number of bulletins to return. * @param sourceName Source name filter. Supports a regular expression. * @param message Message filter. Supports a regular expression. @@ -59,13 +70,63 @@ public class BulletinBoardResource extends ApplicationResource { * @return A bulletinBoardEntity. */ @GET + @Consumes(MediaType.WILDCARD) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) + @Path("") // necessary due to bug in swagger @PreAuthorize("hasAnyRole('ROLE_MONITOR', 'ROLE_DFM', 'ROLE_ADMIN')") - @TypeHint(BulletinBoardEntity.class) - public Response getBulletinBoard(@QueryParam(CLIENT_ID) @DefaultValue(StringUtils.EMPTY) ClientIdParameter clientId, - @QueryParam("after") LongParameter after, @QueryParam("sourceName") BulletinBoardPatternParameter sourceName, - @QueryParam("message") BulletinBoardPatternParameter message, @QueryParam("sourceId") BulletinBoardPatternParameter sourceId, - @QueryParam("groupId") BulletinBoardPatternParameter groupId, @QueryParam("limit") IntegerParameter limit) { + @ApiOperation( + value = "Gets current bulletins", + response = BulletinBoardEntity.class, + authorizations = { + @Authorization(value = "Read Only", type = "ROLE_MONITOR"), + @Authorization(value = "Data Flow Manager", type = "ROLE_DFM"), + @Authorization(value = "Administrator", type = "ROLE_ADMIN") + } + ) + @ApiResponses( + value = { + @ApiResponse(code = 400, message = "NiFi was unable to complete the request because it was invalid. The request should not be retried without modification."), + @ApiResponse(code = 401, message = "Client could not be authenticated."), + @ApiResponse(code = 403, message = "Client is not authorized to make this request."), + @ApiResponse(code = 409, message = "The request was valid but NiFi was not in the appropriate state to process it. Retrying the same request later may be successful.") + } + ) + public Response getBulletinBoard( + @ApiParam( + value = "If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in the response.", + required = false + ) + @QueryParam(CLIENT_ID) @DefaultValue(StringUtils.EMPTY) ClientIdParameter clientId, + @ApiParam( + value = "Includes bulletins with an id after this value.", + required = false + ) + @QueryParam("after") LongParameter after, + @ApiParam( + value = "Includes bulletins originating from this sources whose name match this regular expression.", + required = false + ) + @QueryParam("sourceName") BulletinBoardPatternParameter sourceName, + @ApiParam( + value = "Includes bulletins whose message that match this regular expression.", + required = false + ) + @QueryParam("message") BulletinBoardPatternParameter message, + @ApiParam( + value = "Includes bulletins originating from this sources whose id match this regular expression.", + required = false + ) + @QueryParam("sourceId") BulletinBoardPatternParameter sourceId, + @ApiParam( + value = "Includes bulletins originating from this sources whose group id match this regular expression.", + required = false + ) + @QueryParam("groupId") BulletinBoardPatternParameter groupId, + @ApiParam( + value = "The number of bulletins to limit the response to.", + required = false + ) + @QueryParam("limit") IntegerParameter limit) { // build the bulletin query final BulletinQueryDTO query = new BulletinQueryDTO();