summaryrefslogtreecommitdiffstats
path: root/mod/designtool/designtool-web/src/main/java/org/apache/nifi/web/api
diff options
context:
space:
mode:
authorAndrew Gauld <agauld@att.com>2020-02-26 15:48:32 +0000
committerAndrew Gauld <agauld@att.com>2020-03-20 12:33:47 +0000
commit2d1528b34c45a650e2407bbc90737cc4ca6ec042 (patch)
tree76bebbb36a444963353dee17cc294c40fa8cb0d0 /mod/designtool/designtool-web/src/main/java/org/apache/nifi/web/api
parent45341fa5e6e64e86286254d49ca951c43726ab94 (diff)
Link DCAE MOD design tool to Acumos Adapter
Add import item to global menu with choices of import models, component specs, and data formats. Add prefix to acumos adapter API for consistency with rest of DCAE MOD and to allow adding acumos adapter to k8s/rancher ingress or other reverse proxy mechanism so it can be accessed by browser javascript in the design tool. Remove dcae mod hostname mechanism for callbacks from browser javascript since browser security only allows javascript to call back to the originating host port. Clean up indentation only differences between original NiFi code and ONAP versions. Remove 3 ONAP java files that are now identical to original NiFi versions. Change-Id: I23bbd98d5b171d624ef35088cd821aff2918fc1b Issue-ID: DCAEGEN2-1860 Signed-off-by: Andrew Gauld <agauld@att.com>
Diffstat (limited to 'mod/designtool/designtool-web/src/main/java/org/apache/nifi/web/api')
-rw-r--r--mod/designtool/designtool-web/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java156
-rw-r--r--mod/designtool/designtool-web/src/main/java/org/apache/nifi/web/api/dto/FlowConfigurationDTO.java182
2 files changed, 76 insertions, 262 deletions
diff --git a/mod/designtool/designtool-web/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java b/mod/designtool/designtool-web/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java
index 2943e10..ad45f30 100644
--- a/mod/designtool/designtool-web/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java
+++ b/mod/designtool/designtool-web/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java
@@ -282,8 +282,7 @@ public final class DtoFactory {
public FlowConfigurationDTO createFlowConfigurationDto(final String autoRefreshInterval,
final Long defaultBackPressureObjectThreshold,
- final String defaultBackPressureDataSizeThreshold,
- final String dcaeDistributorApiHostname) {
+ final String defaultBackPressureDataSizeThreshold) {
final FlowConfigurationDTO dto = new FlowConfigurationDTO();
// get the refresh interval
@@ -293,9 +292,6 @@ public final class DtoFactory {
dto.setSupportsConfigurableUsersAndGroups(AuthorizerCapabilityDetection.isConfigurableUserGroupProvider(authorizer));
dto.setSupportsConfigurableAuthorizer(AuthorizerCapabilityDetection.isConfigurableAccessPolicyProvider(authorizer));
- /* Renu - getting host IP */
- dto.setDcaeDistributorApiHostname(dcaeDistributorApiHostname);
-
final Date now = new Date();
dto.setTimeOffset(TimeZone.getDefault().getOffset(now.getTime()));
dto.setCurrentTime(now);
@@ -2042,8 +2038,8 @@ public final class DtoFactory {
final RevisionDTO revision = createRevisionDTO(revisionManager.getRevision(connection.getIdentifier()));
final PermissionsDTO accessPolicy = createPermissionsDto(connection);
final ConnectionStatusDTO status = getComponentStatus(
- () -> groupStatus.getConnectionStatus().stream().filter(connectionStatus -> connection.getIdentifier().equals(connectionStatus.getId())).findFirst().orElse(null),
- connectionStatus -> createConnectionStatusDto(connectionStatus)
+ () -> groupStatus.getConnectionStatus().stream().filter(connectionStatus -> connection.getIdentifier().equals(connectionStatus.getId())).findFirst().orElse(null),
+ connectionStatus -> createConnectionStatusDto(connectionStatus)
);
flow.getConnections().add(entityFactory.createConnectionEntity(dto, revision, accessPolicy, status));
}
@@ -2067,8 +2063,8 @@ public final class DtoFactory {
final PermissionsDTO permissions = createPermissionsDto(inputPort);
final PermissionsDTO operatePermissions = createPermissionsDto(new OperationAuthorizable(inputPort));
final PortStatusDTO status = getComponentStatus(
- () -> groupStatus.getInputPortStatus().stream().filter(inputPortStatus -> inputPort.getIdentifier().equals(inputPortStatus.getId())).findFirst().orElse(null),
- inputPortStatus -> createPortStatusDto(inputPortStatus)
+ () -> groupStatus.getInputPortStatus().stream().filter(inputPortStatus -> inputPort.getIdentifier().equals(inputPortStatus.getId())).findFirst().orElse(null),
+ inputPortStatus -> createPortStatusDto(inputPortStatus)
);
final List<BulletinDTO> bulletins = createBulletinDtos(bulletinRepository.findBulletinsForSource(inputPort.getIdentifier()));
final List<BulletinEntity> bulletinEntities = bulletins.stream().map(bulletin -> entityFactory.createBulletinEntity(bulletin, permissions.getCanRead())).collect(Collectors.toList());
@@ -2084,8 +2080,8 @@ public final class DtoFactory {
final PermissionsDTO permissions = createPermissionsDto(outputPort);
final PermissionsDTO operatePermissions = createPermissionsDto(new OperationAuthorizable(outputPort));
final PortStatusDTO status = getComponentStatus(
- () -> groupStatus.getOutputPortStatus().stream().filter(outputPortStatus -> outputPort.getIdentifier().equals(outputPortStatus.getId())).findFirst().orElse(null),
- outputPortStatus -> createPortStatusDto(outputPortStatus)
+ () -> groupStatus.getOutputPortStatus().stream().filter(outputPortStatus -> outputPort.getIdentifier().equals(outputPortStatus.getId())).findFirst().orElse(null),
+ outputPortStatus -> createPortStatusDto(outputPortStatus)
);
final List<BulletinDTO> bulletins = createBulletinDtos(bulletinRepository.findBulletinsForSource(outputPort.getIdentifier()));
final List<BulletinEntity> bulletinEntities = bulletins.stream().map(bulletin -> entityFactory.createBulletinEntity(bulletin, permissions.getCanRead())).collect(Collectors.toList());
@@ -2110,8 +2106,8 @@ public final class DtoFactory {
final RevisionDTO revision = createRevisionDTO(revisionManager.getRevision(processGroup.getIdentifier()));
final PermissionsDTO permissions = createPermissionsDto(processGroup);
final ProcessGroupStatusDTO status = getComponentStatus(
- () -> groupStatus.getProcessGroupStatus().stream().filter(processGroupStatus -> processGroup.getIdentifier().equals(processGroupStatus.getId())).findFirst().orElse(null),
- processGroupStatus -> createConciseProcessGroupStatusDto(processGroupStatus)
+ () -> groupStatus.getProcessGroupStatus().stream().filter(processGroupStatus -> processGroup.getIdentifier().equals(processGroupStatus.getId())).findFirst().orElse(null),
+ processGroupStatus -> createConciseProcessGroupStatusDto(processGroupStatus)
);
final List<BulletinEntity> bulletins = getProcessGroupBulletins.apply(processGroup);
flow.getProcessGroups().add(entityFactory.createProcessGroupEntity(dto, revision, permissions, status, bulletins));
@@ -2126,8 +2122,8 @@ public final class DtoFactory {
final PermissionsDTO permissions = createPermissionsDto(processor);
final PermissionsDTO operatePermissions = createPermissionsDto(new OperationAuthorizable(processor));
final ProcessorStatusDTO status = getComponentStatus(
- () -> groupStatus.getProcessorStatus().stream().filter(processorStatus -> processor.getIdentifier().equals(processorStatus.getId())).findFirst().orElse(null),
- processorStatus -> createProcessorStatusDto(processorStatus)
+ () -> groupStatus.getProcessorStatus().stream().filter(processorStatus -> processor.getIdentifier().equals(processorStatus.getId())).findFirst().orElse(null),
+ processorStatus -> createProcessorStatusDto(processorStatus)
);
final List<BulletinDTO> bulletins = createBulletinDtos(bulletinRepository.findBulletinsForSource(processor.getIdentifier()));
final List<BulletinEntity> bulletinEntities = bulletins.stream().map(bulletin -> entityFactory.createBulletinEntity(bulletin, permissions.getCanRead())).collect(Collectors.toList());
@@ -2143,8 +2139,8 @@ public final class DtoFactory {
final PermissionsDTO permissions = createPermissionsDto(remoteProcessGroup);
final PermissionsDTO operatePermissions = createPermissionsDto(new OperationAuthorizable(remoteProcessGroup));
final RemoteProcessGroupStatusDTO status = getComponentStatus(
- () -> groupStatus.getRemoteProcessGroupStatus().stream().filter(rpgStatus -> remoteProcessGroup.getIdentifier().equals(rpgStatus.getId())).findFirst().orElse(null),
- remoteProcessGroupStatus -> createRemoteProcessGroupStatusDto(remoteProcessGroup, remoteProcessGroupStatus)
+ () -> groupStatus.getRemoteProcessGroupStatus().stream().filter(rpgStatus -> remoteProcessGroup.getIdentifier().equals(rpgStatus.getId())).findFirst().orElse(null),
+ remoteProcessGroupStatus -> createRemoteProcessGroupStatusDto(remoteProcessGroup, remoteProcessGroupStatus)
);
final List<BulletinDTO> bulletins = createBulletinDtos(bulletinRepository.findBulletinsForSource(remoteProcessGroup.getIdentifier()));
final List<BulletinEntity> bulletinEntities = bulletins.stream().map(bulletin -> entityFactory.createBulletinEntity(bulletin, permissions.getCanRead())).collect(Collectors.toList());
@@ -2174,8 +2170,8 @@ public final class DtoFactory {
final PermissionsDTO permissions = createPermissionsDto(procNode);
final PermissionsDTO operatePermissions = createPermissionsDto(new OperationAuthorizable(procNode));
final ProcessorStatusDTO status = getComponentStatus(
- () -> groupStatus.getProcessorStatus().stream().filter(processorStatus -> procNode.getIdentifier().equals(processorStatus.getId())).findFirst().orElse(null),
- processorStatus -> createProcessorStatusDto(processorStatus)
+ () -> groupStatus.getProcessorStatus().stream().filter(processorStatus -> procNode.getIdentifier().equals(processorStatus.getId())).findFirst().orElse(null),
+ processorStatus -> createProcessorStatusDto(processorStatus)
);
final List<BulletinDTO> bulletins = createBulletinDtos(bulletinRepository.findBulletinsForSource(procNode.getIdentifier()));
final List<BulletinEntity> bulletinEntities = bulletins.stream().map(bulletin -> entityFactory.createBulletinEntity(bulletin, permissions.getCanRead())).collect(Collectors.toList());
@@ -2186,8 +2182,8 @@ public final class DtoFactory {
final RevisionDTO revision = createRevisionDTO(revisionManager.getRevision(connNode.getIdentifier()));
final PermissionsDTO permissions = createPermissionsDto(connNode);
final ConnectionStatusDTO status = getComponentStatus(
- () -> groupStatus.getConnectionStatus().stream().filter(connectionStatus -> connNode.getIdentifier().equals(connectionStatus.getId())).findFirst().orElse(null),
- connectionStatus -> createConnectionStatusDto(connectionStatus)
+ () -> groupStatus.getConnectionStatus().stream().filter(connectionStatus -> connNode.getIdentifier().equals(connectionStatus.getId())).findFirst().orElse(null),
+ connectionStatus -> createConnectionStatusDto(connectionStatus)
);
dto.getConnections().add(entityFactory.createConnectionEntity(createConnectionDto(connNode), revision, permissions, status));
}
@@ -2208,8 +2204,8 @@ public final class DtoFactory {
final RevisionDTO revision = createRevisionDTO(revisionManager.getRevision(childGroup.getIdentifier()));
final PermissionsDTO permissions = createPermissionsDto(childGroup);
final ProcessGroupStatusDTO status = getComponentStatus(
- () -> groupStatus.getProcessGroupStatus().stream().filter(processGroupStatus -> childGroup.getIdentifier().equals(processGroupStatus.getId())).findFirst().orElse(null),
- processGroupStatus -> createConciseProcessGroupStatusDto(processGroupStatus)
+ () -> groupStatus.getProcessGroupStatus().stream().filter(processGroupStatus -> childGroup.getIdentifier().equals(processGroupStatus.getId())).findFirst().orElse(null),
+ processGroupStatus -> createConciseProcessGroupStatusDto(processGroupStatus)
);
final List<BulletinEntity> bulletins = getProcessGroupBulletins.apply(childGroup);
dto.getProcessGroups().add(entityFactory.createProcessGroupEntity(createProcessGroupDto(childGroup), revision, permissions, status, bulletins));
@@ -2220,8 +2216,8 @@ public final class DtoFactory {
final PermissionsDTO permissions = createPermissionsDto(rpg);
final PermissionsDTO operatePermissions = createPermissionsDto(new OperationAuthorizable(rpg));
final RemoteProcessGroupStatusDTO status = getComponentStatus(
- () -> groupStatus.getRemoteProcessGroupStatus().stream().filter(remoteProcessGroupStatus -> rpg.getIdentifier().equals(remoteProcessGroupStatus.getId())).findFirst().orElse(null),
- remoteProcessGroupStatus -> createRemoteProcessGroupStatusDto(rpg, remoteProcessGroupStatus)
+ () -> groupStatus.getRemoteProcessGroupStatus().stream().filter(remoteProcessGroupStatus -> rpg.getIdentifier().equals(remoteProcessGroupStatus.getId())).findFirst().orElse(null),
+ remoteProcessGroupStatus -> createRemoteProcessGroupStatusDto(rpg, remoteProcessGroupStatus)
);
final List<BulletinDTO> bulletins = createBulletinDtos(bulletinRepository.findBulletinsForSource(rpg.getIdentifier()));
final List<BulletinEntity> bulletinEntities = bulletins.stream().map(bulletin -> entityFactory.createBulletinEntity(bulletin, permissions.getCanRead())).collect(Collectors.toList());
@@ -2233,8 +2229,8 @@ public final class DtoFactory {
final PermissionsDTO permissions = createPermissionsDto(inputPort);
final PermissionsDTO operatePermissions = createPermissionsDto(new OperationAuthorizable(inputPort));
final PortStatusDTO status = getComponentStatus(
- () -> groupStatus.getInputPortStatus().stream().filter(inputPortStatus -> inputPort.getIdentifier().equals(inputPortStatus.getId())).findFirst().orElse(null),
- inputPortStatus -> createPortStatusDto(inputPortStatus)
+ () -> groupStatus.getInputPortStatus().stream().filter(inputPortStatus -> inputPort.getIdentifier().equals(inputPortStatus.getId())).findFirst().orElse(null),
+ inputPortStatus -> createPortStatusDto(inputPortStatus)
);
final List<BulletinDTO> bulletins = createBulletinDtos(bulletinRepository.findBulletinsForSource(inputPort.getIdentifier()));
final List<BulletinEntity> bulletinEntities = bulletins.stream().map(bulletin -> entityFactory.createBulletinEntity(bulletin, permissions.getCanRead())).collect(Collectors.toList());
@@ -2246,8 +2242,8 @@ public final class DtoFactory {
final PermissionsDTO permissions = createPermissionsDto(outputPort);
final PermissionsDTO operatePermissions = createPermissionsDto(new OperationAuthorizable(outputPort));
final PortStatusDTO status = getComponentStatus(
- () -> groupStatus.getOutputPortStatus().stream().filter(outputPortStatus -> outputPort.getIdentifier().equals(outputPortStatus.getId())).findFirst().orElse(null),
- outputPortStatus -> createPortStatusDto(outputPortStatus)
+ () -> groupStatus.getOutputPortStatus().stream().filter(outputPortStatus -> outputPort.getIdentifier().equals(outputPortStatus.getId())).findFirst().orElse(null),
+ outputPortStatus -> createPortStatusDto(outputPortStatus)
);
final List<BulletinDTO> bulletins = createBulletinDtos(bulletinRepository.findBulletinsForSource(outputPort.getIdentifier()));
final List<BulletinEntity> bulletinEntities = bulletins.stream().map(bulletin -> entityFactory.createBulletinEntity(bulletin, permissions.getCanRead())).collect(Collectors.toList());
@@ -2290,7 +2286,7 @@ public final class DtoFactory {
dto.setVersionControlInformation(createVersionControlInformationDto(group));
final Map<String, String> variables = group.getVariableRegistry().getVariableMap().entrySet().stream()
- .collect(Collectors.toMap(entry -> entry.getKey().getName(), entry -> entry.getValue()));
+ .collect(Collectors.toMap(entry -> entry.getKey().getName(), entry -> entry.getValue()));
dto.setVariables(variables);
final ProcessGroup parentGroup = group.getParent();
@@ -2409,50 +2405,50 @@ public final class DtoFactory {
mapping.put(group.getInstanceId(), group.getIdentifier());
group.getProcessors().stream()
- .map(proc -> (InstantiatedVersionedProcessor) proc)
- .forEach(proc -> mapping.put(proc.getInstanceId(), proc.getIdentifier()));
+ .map(proc -> (InstantiatedVersionedProcessor) proc)
+ .forEach(proc -> mapping.put(proc.getInstanceId(), proc.getIdentifier()));
group.getFunnels().stream()
- .map(funnel -> (InstantiatedVersionedFunnel) funnel)
- .forEach(funnel -> mapping.put(funnel.getInstanceId(), funnel.getIdentifier()));
+ .map(funnel -> (InstantiatedVersionedFunnel) funnel)
+ .forEach(funnel -> mapping.put(funnel.getInstanceId(), funnel.getIdentifier()));
group.getInputPorts().stream()
- .map(port -> (InstantiatedVersionedPort) port)
- .forEach(port -> mapping.put(port.getInstanceId(), port.getIdentifier()));
+ .map(port -> (InstantiatedVersionedPort) port)
+ .forEach(port -> mapping.put(port.getInstanceId(), port.getIdentifier()));
group.getOutputPorts().stream()
- .map(port -> (InstantiatedVersionedPort) port)
- .forEach(port -> mapping.put(port.getInstanceId(), port.getIdentifier()));
+ .map(port -> (InstantiatedVersionedPort) port)
+ .forEach(port -> mapping.put(port.getInstanceId(), port.getIdentifier()));
group.getControllerServices().stream()
- .map(service -> (InstantiatedVersionedControllerService) service)
- .forEach(service -> mapping.put(service.getInstanceId(), service.getIdentifier()));
+ .map(service -> (InstantiatedVersionedControllerService) service)
+ .forEach(service -> mapping.put(service.getInstanceId(), service.getIdentifier()));
group.getLabels().stream()
- .map(label -> (InstantiatedVersionedLabel) label)
- .forEach(label -> mapping.put(label.getInstanceId(), label.getIdentifier()));
+ .map(label -> (InstantiatedVersionedLabel) label)
+ .forEach(label -> mapping.put(label.getInstanceId(), label.getIdentifier()));
group.getConnections().stream()
- .map(conn -> (InstantiatedVersionedConnection) conn)
- .forEach(conn -> mapping.put(conn.getInstanceId(), conn.getIdentifier()));
+ .map(conn -> (InstantiatedVersionedConnection) conn)
+ .forEach(conn -> mapping.put(conn.getInstanceId(), conn.getIdentifier()));
group.getRemoteProcessGroups().stream()
- .map(rpg -> (InstantiatedVersionedRemoteProcessGroup) rpg)
- .forEach(rpg -> {
- mapping.put(rpg.getInstanceId(), rpg.getIdentifier());
-
- if (rpg.getInputPorts() != null) {
- rpg.getInputPorts().stream()
- .map(port -> (InstantiatedVersionedRemoteGroupPort) port)
- .forEach(port -> mapping.put(port.getInstanceId(), port.getIdentifier()));
- }
+ .map(rpg -> (InstantiatedVersionedRemoteProcessGroup) rpg)
+ .forEach(rpg -> {
+ mapping.put(rpg.getInstanceId(), rpg.getIdentifier());
+
+ if (rpg.getInputPorts() != null) {
+ rpg.getInputPorts().stream()
+ .map(port -> (InstantiatedVersionedRemoteGroupPort) port)
+ .forEach(port -> mapping.put(port.getInstanceId(), port.getIdentifier()));
+ }
- if (rpg.getOutputPorts() != null) {
- rpg.getOutputPorts().stream()
- .map(port -> (InstantiatedVersionedRemoteGroupPort) port)
- .forEach(port -> mapping.put(port.getInstanceId(), port.getIdentifier()));
- }
- });
+ if (rpg.getOutputPorts() != null) {
+ rpg.getOutputPorts().stream()
+ .map(port -> (InstantiatedVersionedRemoteGroupPort) port)
+ .forEach(port -> mapping.put(port.getInstanceId(), port.getIdentifier()));
+ }
+ });
group.getProcessGroups().stream()
- .map(child -> (InstantiatedVersionedProcessGroup) child)
- .forEach(child -> {
- final Map<String, String> childMapping = createVersionControlComponentMappingDto(child);
- mapping.putAll(childMapping);
- });
+ .map(child -> (InstantiatedVersionedProcessGroup) child)
+ .forEach(child -> {
+ final Map<String, String> childMapping = createVersionControlComponentMappingDto(child);
+ mapping.putAll(childMapping);
+ });
return mapping;
}
@@ -2574,8 +2570,8 @@ public final class DtoFactory {
final ComponentVariableRegistry variableRegistry = processGroup.getVariableRegistry();
final List<String> variableNames = variableRegistry.getVariableMap().keySet().stream()
- .map(descriptor -> descriptor.getName())
- .collect(Collectors.toList());
+ .map(descriptor -> descriptor.getName())
+ .collect(Collectors.toList());
final Set<VariableEntity> variableEntities = new LinkedHashSet<>();
@@ -3278,31 +3274,31 @@ public final class DtoFactory {
* @return ProcessorDiagnosticsDTO for the given Processor
*/
public ProcessorDiagnosticsDTO createProcessorDiagnosticsDto(final ProcessorNode procNode, final ProcessorStatus procStatus, final BulletinRepository bulletinRepo,
- final FlowController flowController, final Function<String, ControllerServiceEntity> serviceEntityFactory) {
+ final FlowController flowController, final Function<String, ControllerServiceEntity> serviceEntityFactory) {
final ProcessorDiagnosticsDTO procDiagnostics = new ProcessorDiagnosticsDTO();
procDiagnostics.setClassLoaderDiagnostics(createClassLoaderDiagnosticsDto(procNode));
procDiagnostics.setIncomingConnections(procNode.getIncomingConnections().stream()
- .map(this::createConnectionDiagnosticsDto)
- .collect(Collectors.toSet()));
+ .map(this::createConnectionDiagnosticsDto)
+ .collect(Collectors.toSet()));
procDiagnostics.setOutgoingConnections(procNode.getConnections().stream()
- .map(this::createConnectionDiagnosticsDto)
- .collect(Collectors.toSet()));
+ .map(this::createConnectionDiagnosticsDto)
+ .collect(Collectors.toSet()));
procDiagnostics.setJvmDiagnostics(createJvmDiagnosticsDto(flowController));
procDiagnostics.setProcessor(createProcessorDto(procNode));
procDiagnostics.setProcessorStatus(createProcessorStatusDto(procStatus));
procDiagnostics.setThreadDumps(createThreadDumpDtos(procNode));
final Set<ControllerServiceDiagnosticsDTO> referencedServiceDiagnostics = createReferencedServiceDiagnostics(procNode.getProperties(),
- flowController.getControllerServiceProvider(), serviceEntityFactory);
+ flowController.getControllerServiceProvider(), serviceEntityFactory);
procDiagnostics.setReferencedControllerServices(referencedServiceDiagnostics);
return procDiagnostics;
}
private Set<ControllerServiceDiagnosticsDTO> createReferencedServiceDiagnostics(final Map<PropertyDescriptor, String> properties, final ControllerServiceProvider serviceProvider,
- final Function<String, ControllerServiceEntity> serviceEntityFactory) {
+ final Function<String, ControllerServiceEntity> serviceEntityFactory) {
final Set<ControllerServiceDiagnosticsDTO> referencedServiceDiagnostics = new HashSet<>();
for (final Map.Entry<PropertyDescriptor, String> entry : properties.entrySet()) {
@@ -3339,7 +3335,7 @@ public final class DtoFactory {
* @return ControllerServiceDiagnosticsDTO for the given Controller Service
*/
public ControllerServiceDiagnosticsDTO createControllerServiceDiagnosticsDto(final ControllerServiceNode serviceNode, final Function<String, ControllerServiceEntity> serviceEntityFactory,
- final ControllerServiceProvider serviceProvider) {
+ final ControllerServiceProvider serviceProvider) {
final ControllerServiceDiagnosticsDTO serviceDiagnostics = new ControllerServiceDiagnosticsDTO();
final ControllerServiceEntity serviceEntity = serviceEntityFactory.apply(serviceNode.getIdentifier());
@@ -3409,8 +3405,8 @@ public final class DtoFactory {
final List<RemoteQueuePartitionDiagnostics> remoteDiagnostics = queueDiagnostics.getRemoteQueuePartitionDiagnostics();
if (remoteDiagnostics != null) {
final List<RemoteQueuePartitionDTO> remoteDiagnosticsDtos = remoteDiagnostics.stream()
- .map(this::createRemoteQueuePartitionDto)
- .collect(Collectors.toList());
+ .map(this::createRemoteQueuePartitionDto)
+ .collect(Collectors.toList());
dto.setRemoteQueuePartitions(remoteDiagnosticsDtos);
}
@@ -3490,10 +3486,10 @@ public final class DtoFactory {
// flow-related information
final Set<BundleDTO> bundlesLoaded = extensionManager.getAllBundles().stream()
- .map(bundle -> bundle.getBundleDetails().getCoordinate())
- .sorted((a, b) -> a.getCoordinate().compareTo(b.getCoordinate()))
- .map(this::createBundleDto)
- .collect(Collectors.toCollection(LinkedHashSet::new));
+ .map(bundle -> bundle.getBundleDetails().getCoordinate())
+ .sorted((a, b) -> a.getCoordinate().compareTo(b.getCoordinate()))
+ .map(this::createBundleDto)
+ .collect(Collectors.toCollection(LinkedHashSet::new));
flowDiagnosticsDto.setActiveEventDrivenThreads(flowController.getActiveEventDrivenThreadCount());
flowDiagnosticsDto.setActiveTimerDrivenThreads(flowController.getActiveTimerDrivenThreadCount());
diff --git a/mod/designtool/designtool-web/src/main/java/org/apache/nifi/web/api/dto/FlowConfigurationDTO.java b/mod/designtool/designtool-web/src/main/java/org/apache/nifi/web/api/dto/FlowConfigurationDTO.java
deleted file mode 100644
index 2dd91ad..0000000
--- a/mod/designtool/designtool-web/src/main/java/org/apache/nifi/web/api/dto/FlowConfigurationDTO.java
+++ /dev/null
@@ -1,182 +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.
- *
- * Modifications to the original nifi code for the ONAP project are made
- * available under the Apache License, Version 2.0
- */
-package org.apache.nifi.web.api.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.apache.nifi.web.api.dto.util.TimeAdapter;
-
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import java.util.Date;
-
-/**
- * Details for the controller configuration.
- */
-@XmlType(name = "flowConfiguration")
-public class FlowConfigurationDTO {
-
- private Boolean supportsManagedAuthorizer;
- private Boolean supportsConfigurableAuthorizer;
- private Boolean supportsConfigurableUsersAndGroups;
- private Long autoRefreshIntervalSeconds;
-
- private Date currentTime;
- private Integer timeOffset;
-
- private Long defaultBackPressureObjectThreshold;
- private String defaultBackPressureDataSizeThreshold;
-
- private String dcaeDistributorApiHostname;
-
- /**
- * @author Renu
- * @return getter and setter for dcae distributor api hostname. This value is read only
- */
- @ApiModelProperty(
- value = "Whether it picks up configurable host address.",
- readOnly = true
- )
- public String getDcaeDistributorApiHostname() {
- return dcaeDistributorApiHostname;
- }
-
- public void setDcaeDistributorApiHostname(String dcaeDistributorApiHostname) {
- this.dcaeDistributorApiHostname = dcaeDistributorApiHostname;
- }
-
- /**
- * @return interval in seconds between the automatic NiFi refresh requests. This value is read only
- */
- @ApiModelProperty(
- value = "The interval in seconds between the automatic NiFi refresh requests.",
- readOnly = true
- )
- public Long getAutoRefreshIntervalSeconds() {
- return autoRefreshIntervalSeconds;
- }
-
- public void setAutoRefreshIntervalSeconds(Long autoRefreshIntervalSeconds) {
- this.autoRefreshIntervalSeconds = autoRefreshIntervalSeconds;
- }
-
- /**
- * @return whether this NiFi supports a managed authorizer. Managed authorizers can visualize users, groups,
- * and policies in the UI. This value is read only
- */
- @ApiModelProperty(
- value = "Whether this NiFi supports a managed authorizer. Managed authorizers can visualize users, groups, and policies in the UI.",
- readOnly = true
- )
- public Boolean getSupportsManagedAuthorizer() {
- return supportsManagedAuthorizer;
- }
-
- public void setSupportsManagedAuthorizer(Boolean supportsManagedAuthorizer) {
- this.supportsManagedAuthorizer = supportsManagedAuthorizer;
- }
-
- /**
- * @return whether this NiFi supports configurable users and groups. This value is read only
- */
- @ApiModelProperty(
- value = "Whether this NiFi supports configurable users and groups.",
- readOnly = true
- )
- public Boolean getSupportsConfigurableUsersAndGroups() {
- return supportsConfigurableUsersAndGroups;
- }
-
- public void setSupportsConfigurableUsersAndGroups(Boolean supportsConfigurableUsersAndGroups) {
- this.supportsConfigurableUsersAndGroups = supportsConfigurableUsersAndGroups;
- }
-
- /**
- * @return whether this NiFi supports a configurable authorizer. This value is read only
- */
- @ApiModelProperty(
- value = "Whether this NiFi supports a configurable authorizer.",
- readOnly = true
- )
- public Boolean getSupportsConfigurableAuthorizer() {
- return supportsConfigurableAuthorizer;
- }
-
- public void setSupportsConfigurableAuthorizer(Boolean supportsConfigurableAuthorizer) {
- this.supportsConfigurableAuthorizer = supportsConfigurableAuthorizer;
- }
-
- /**
- * @return current time on the server
- */
- @XmlJavaTypeAdapter(TimeAdapter.class)
- @ApiModelProperty(
- value = "The current time on the system.",
- dataType = "string"
- )
- public Date getCurrentTime() {
- return currentTime;
- }
-
- public void setCurrentTime(Date currentTime) {
- this.currentTime = currentTime;
- }
-
- /**
- * @return time offset of the server
- */
- @ApiModelProperty(
- value = "The time offset of the system."
- )
- public Integer getTimeOffset() {
- return timeOffset;
- }
-
- public void setTimeOffset(Integer timeOffset) {
- this.timeOffset = timeOffset;
- }
-
- /**
- * @return the default back pressure object threshold
- */
- @ApiModelProperty(
- value = "The default back pressure object threshold."
- )
- public Long getDefaultBackPressureObjectThreshold() {
- return defaultBackPressureObjectThreshold;
- }
-
- public void setDefaultBackPressureObjectThreshold(Long backPressureObjectThreshold) {
- this.defaultBackPressureObjectThreshold = backPressureObjectThreshold;
- }
-
- /**
- * @return the default back pressure data size threshold
- */
- @ApiModelProperty(
- value = "The default back pressure data size threshold."
- )
- public String getDefaultBackPressureDataSizeThreshold() {
- return defaultBackPressureDataSizeThreshold;
- }
-
- public void setDefaultBackPressureDataSizeThreshold(String backPressureDataSizeThreshold) {
- this.defaultBackPressureDataSizeThreshold = backPressureDataSizeThreshold;
- }
-}