@Override protected void writeSimpleResult(PrintStream output) { if (versionedFlows.isEmpty()) { return; } final Table table = new Table.Builder() .column("#", 3, 3, false) .column("Name", 20, 36, true) .column("Id", 36, 36, false) .column("Description", 11, 40, true) .build(); for (int i = 0; i < versionedFlows.size(); ++i) { final VersionedFlow flow = versionedFlows.get(i); table.addRow(String.valueOf(i + 1), flow.getName(), flow.getIdentifier(), flow.getDescription()); } final TableWriter tableWriter = new DynamicTableWriter(); tableWriter.write(table, output); }
vci.setBucketId(metadata.getBucketIdentifier()); vci.setBucketName(bucket.getName()); vci.setFlowDescription(flow.getDescription()); vci.setFlowId(flow.getIdentifier()); vci.setFlowName(flow.getName());
private VersionedFlowEntity createVersionedFlowEntity(final String registryId, final VersionedFlow versionedFlow) { if (versionedFlow == null) { return null; } final VersionedFlowDTO dto = new VersionedFlowDTO(); dto.setRegistryId(registryId); dto.setBucketId(versionedFlow.getBucketIdentifier()); dto.setFlowId(versionedFlow.getIdentifier()); dto.setFlowName(versionedFlow.getName()); dto.setDescription(versionedFlow.getDescription()); final VersionedFlowEntity entity = new VersionedFlowEntity(); entity.setVersionedFlow(dto); return entity; }
versionControlInfoDto.setFlowId(snapshotMetadata.getFlowIdentifier()); versionControlInfoDto.setFlowName(flow.getName()); versionControlInfoDto.setFlowDescription(flow.getDescription()); versionControlInfoDto.setGroupId(groupId); versionControlInfoDto.setVersion(snapshotMetadata.getVersion());
vci.setBucketName(versionedFlow.getBucketName()); vci.setFlowName(versionedFlow.getName()); vci.setFlowDescription(versionedFlow.getDescription()); vci.setRegistryName(flowRegistry.getName());
versionControlInfo.setFlowDescription(flow.getDescription());
vci.setFlowId(flow.getIdentifier()); vci.setFlowName(flow.getName()); vci.setFlowDescription(flow.getDescription()); vci.setGroupId(groupId); vci.setRegistryId(registryId);
@Override public FlowControllerSchema apply(final VersionedFlowSnapshot versionedFlowSnapshot) { // If the VersionedFlowSnapshot came directly from NiFi Registry without modification, as would be the // case with C2 server, then we should have a non-null VersionedFlow, but if we're using a snapshot that // was export from another tool like the CLI, the flow may be null'd out, so fall back to root group. String name; String description; if (versionedFlowSnapshot.getFlow() == null) { name = versionedFlowSnapshot.getFlowContents().getName(); description = versionedFlowSnapshot.getFlowContents().getComments(); } else { name = versionedFlowSnapshot.getFlow().getName(); description = versionedFlowSnapshot.getFlow().getDescription(); } Map<String, Object> map = new HashMap<>(); map.put(CommonPropertyKeys.NAME_KEY, name); map.put(CommonPropertyKeys.COMMENT_KEY, description); return new FlowControllerSchema(map); } }
@Override public FlowControllerSchema apply(final VersionedFlowSnapshot versionedFlowSnapshot) { // If the VersionedFlowSnapshot came directly from NiFi Registry without modification, as would be the // case with C2 server, then we should have a non-null VersionedFlow, but if we're using a snapshot that // was export from another tool like the CLI, the flow may be null'd out, so fall back to root group. String name; String description; if (versionedFlowSnapshot.getFlow() == null) { name = versionedFlowSnapshot.getFlowContents().getName(); description = versionedFlowSnapshot.getFlowContents().getComments(); } else { name = versionedFlowSnapshot.getFlow().getName(); description = versionedFlowSnapshot.getFlow().getDescription(); } Map<String, Object> map = new HashMap<>(); map.put(CommonPropertyKeys.NAME_KEY, name); map.put(CommonPropertyKeys.COMMENT_KEY, description); return new FlowControllerSchema(map); } }
public static FlowEntity map(final VersionedFlow versionedFlow) { final FlowEntity flowEntity = new FlowEntity(); flowEntity.setId(versionedFlow.getIdentifier()); flowEntity.setName(versionedFlow.getName()); flowEntity.setDescription(versionedFlow.getDescription()); flowEntity.setCreated(new Date(versionedFlow.getCreatedTimestamp())); flowEntity.setModified(new Date(versionedFlow.getModifiedTimestamp())); flowEntity.setType(BucketItemEntityType.FLOW); return flowEntity; }
if (versionedFlow.getDescription() != null) { existingFlow.setDescription(versionedFlow.getDescription());