This is an automated email from the ASF dual-hosted git repository.
kdoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi-registry.git
The following commit(s) were added to refs/heads/master by this push:
new 3518490 NIFIREG-247 Adding ScheduleState enum and adding field to
processor, port, and remote port
3518490 is described below
commit 351849055efa2b95cf649f6c2e7192224f8790c9
Author: Bryan Bende <[email protected]>
AuthorDate: Mon Apr 1 14:11:32 2019 -0400
NIFIREG-247 Adding ScheduleState enum and adding field to processor, port,
and remote port
This closes #165.
Signed-off-by: Kevin Doran <[email protected]>
---
.../apache/nifi/registry/flow/ScheduledState.java | 22 ++++++++++++++++++++++
.../apache/nifi/registry/flow/VersionedPort.java | 10 ++++++++++
.../nifi/registry/flow/VersionedProcessor.java | 16 +++++++++++++---
.../registry/flow/VersionedRemoteGroupPort.java | 14 ++++++++++++--
4 files changed, 57 insertions(+), 5 deletions(-)
diff --git
a/nifi-registry-core/nifi-registry-data-model/src/main/java/org/apache/nifi/registry/flow/ScheduledState.java
b/nifi-registry-core/nifi-registry-data-model/src/main/java/org/apache/nifi/registry/flow/ScheduledState.java
new file mode 100644
index 0000000..e44f73d
--- /dev/null
+++
b/nifi-registry-core/nifi-registry-data-model/src/main/java/org/apache/nifi/registry/flow/ScheduledState.java
@@ -0,0 +1,22 @@
+/*
+ * 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;
+
+public enum ScheduledState {
+ ENABLED,
+ DISABLED;
+}
diff --git
a/nifi-registry-core/nifi-registry-data-model/src/main/java/org/apache/nifi/registry/flow/VersionedPort.java
b/nifi-registry-core/nifi-registry-data-model/src/main/java/org/apache/nifi/registry/flow/VersionedPort.java
index f24e386..2b7cccd 100644
---
a/nifi-registry-core/nifi-registry-data-model/src/main/java/org/apache/nifi/registry/flow/VersionedPort.java
+++
b/nifi-registry-core/nifi-registry-data-model/src/main/java/org/apache/nifi/registry/flow/VersionedPort.java
@@ -22,6 +22,7 @@ import io.swagger.annotations.ApiModelProperty;
public class VersionedPort extends VersionedComponent {
private PortType type;
private Integer concurrentlySchedulableTaskCount;
+ private ScheduledState scheduledState;
@ApiModelProperty("The number of tasks that should be concurrently
scheduled for the port.")
public Integer getConcurrentlySchedulableTaskCount() {
@@ -41,6 +42,15 @@ public class VersionedPort extends VersionedComponent {
this.type = type;
}
+ @ApiModelProperty("The scheduled state of the component")
+ public ScheduledState getScheduledState() {
+ return scheduledState;
+ }
+
+ public void setScheduledState(ScheduledState scheduledState) {
+ this.scheduledState = scheduledState;
+ }
+
@Override
public ComponentType getComponentType() {
if (type == PortType.OUTPUT_PORT) {
diff --git
a/nifi-registry-core/nifi-registry-data-model/src/main/java/org/apache/nifi/registry/flow/VersionedProcessor.java
b/nifi-registry-core/nifi-registry-data-model/src/main/java/org/apache/nifi/registry/flow/VersionedProcessor.java
index aef6dcc..416bf42 100644
---
a/nifi-registry-core/nifi-registry-data-model/src/main/java/org/apache/nifi/registry/flow/VersionedProcessor.java
+++
b/nifi-registry-core/nifi-registry-data-model/src/main/java/org/apache/nifi/registry/flow/VersionedProcessor.java
@@ -17,11 +17,11 @@
package org.apache.nifi.registry.flow;
+import io.swagger.annotations.ApiModelProperty;
+
import java.util.Map;
import java.util.Set;
-import io.swagger.annotations.ApiModelProperty;
-
public class VersionedProcessor extends VersionedComponent
implements VersionedConfigurableComponent, VersionedExtensionComponent
{
@@ -42,7 +42,7 @@ public class VersionedProcessor extends VersionedComponent
private Long runDurationMillis;
private Integer concurrentlySchedulableTaskCount;
private Set<String> autoTerminatedRelationships;
-
+ private ScheduledState scheduledState;
@ApiModelProperty("The frequency with which to schedule the processor. The
format of the value will depend on th value of schedulingStrategy.")
public String getSchedulingPeriod() {
@@ -190,8 +190,18 @@ public class VersionedProcessor extends VersionedComponent
this.style = style;
}
+ @ApiModelProperty("The scheduled state of the component")
+ public ScheduledState getScheduledState() {
+ return scheduledState;
+ }
+
+ public void setScheduledState(ScheduledState scheduledState) {
+ this.scheduledState = scheduledState;
+ }
+
@Override
public ComponentType getComponentType() {
return ComponentType.PROCESSOR;
}
+
}
diff --git
a/nifi-registry-core/nifi-registry-data-model/src/main/java/org/apache/nifi/registry/flow/VersionedRemoteGroupPort.java
b/nifi-registry-core/nifi-registry-data-model/src/main/java/org/apache/nifi/registry/flow/VersionedRemoteGroupPort.java
index ca85ce4..19f76df 100644
---
a/nifi-registry-core/nifi-registry-data-model/src/main/java/org/apache/nifi/registry/flow/VersionedRemoteGroupPort.java
+++
b/nifi-registry-core/nifi-registry-data-model/src/main/java/org/apache/nifi/registry/flow/VersionedRemoteGroupPort.java
@@ -17,10 +17,10 @@
package org.apache.nifi.registry.flow;
-import java.util.Objects;
-
import io.swagger.annotations.ApiModelProperty;
+import java.util.Objects;
+
public class VersionedRemoteGroupPort extends VersionedComponent {
private String remoteGroupId;
private Integer concurrentlySchedulableTaskCount;
@@ -28,6 +28,7 @@ public class VersionedRemoteGroupPort extends
VersionedComponent {
private BatchSize batchSize;
private ComponentType componentType;
private String targetId;
+ private ScheduledState scheduledState;
@ApiModelProperty("The number of task that may transmit flowfiles to the
target port concurrently.")
public Integer getConcurrentlySchedulableTaskCount() {
@@ -75,6 +76,15 @@ public class VersionedRemoteGroupPort extends
VersionedComponent {
this.targetId = targetId;
}
+ @ApiModelProperty("The scheduled state of the component")
+ public ScheduledState getScheduledState() {
+ return scheduledState;
+ }
+
+ public void setScheduledState(ScheduledState scheduledState) {
+ this.scheduledState = scheduledState;
+ }
+
@Override
public int hashCode() {
return 923847 + String.valueOf(getName()).hashCode();