@Override public ConfigSchema apply(TemplateDTO templateDTO) { Map<String, Object> map = new HashMap<>(); map.put(CommonPropertyKeys.FLOW_CONTROLLER_PROPS_KEY, flowControllerSchemaFunction.apply(templateDTO).toMap()); FlowSnippetDTO snippet = templateDTO.getSnippet(); addSnippet(map, snippet); return new ConfigSchema(map); }
@Override public ConfigSchema apply(TemplateDTO templateDTO) { Map<String, Object> map = new HashMap<>(); map.put(CommonPropertyKeys.FLOW_CONTROLLER_PROPS_KEY, flowControllerSchemaFunction.apply(templateDTO).toMap()); FlowSnippetDTO snippet = templateDTO.getSnippet(); addSnippet(map, snippet); return new ConfigSchema(map); }
@Override public ConfigSchema apply(final VersionedFlowSnapshot versionedFlowSnapshot) { Map<String, Object> map = new HashMap<>(); map.put(CommonPropertyKeys.FLOW_CONTROLLER_PROPS_KEY, flowControllerSchemaFunction.apply(versionedFlowSnapshot).toMap()); VersionedProcessGroup versionedProcessGroup = versionedFlowSnapshot.getFlowContents(); addVersionedProcessGroup(map, versionedProcessGroup); return new ConfigSchema(map); }
@Override public ConfigSchema apply(final VersionedFlowSnapshot versionedFlowSnapshot) { Map<String, Object> map = new HashMap<>(); map.put(CommonPropertyKeys.FLOW_CONTROLLER_PROPS_KEY, flowControllerSchemaFunction.apply(versionedFlowSnapshot).toMap()); VersionedProcessGroup versionedProcessGroup = versionedFlowSnapshot.getFlowContents(); addVersionedProcessGroup(map, versionedProcessGroup); return new ConfigSchema(map); }
@Override public ConfigSchema convert() { Map<String, Object> result = mapSupplier.get(); result.put(VERSION, getVersion()); putIfNotNull(result, FLOW_CONTROLLER_PROPS_KEY, flowControllerProperties); putIfNotNull(result, CORE_PROPS_KEY, coreProperties.convert()); putIfNotNull(result, FLOWFILE_REPO_KEY, flowfileRepositoryProperties); putIfNotNull(result, CONTENT_REPO_KEY, contentRepositoryProperties); putIfNotNull(result, PROVENANCE_REPO_KEY, provenanceRepositorySchema); putIfNotNull(result, COMPONENT_STATUS_REPO_KEY, componentStatusRepositoryProperties); putIfNotNull(result, SECURITY_PROPS_KEY, securityProperties); result.putAll(processGroupSchema.toMap()); putIfNotNull(result, PROVENANCE_REPORTING_KEY, provenanceReportingProperties); return new ConfigSchema(result, getValidationIssues()); } }
@Override public ConfigSchema convert() { Map<String, Object> map = new HashMap<>(); map.put(VERSION, getVersion()); putIfNotNull(map, FLOW_CONTROLLER_PROPS_KEY, flowControllerProperties); putIfNotNull(map, CORE_PROPS_KEY, coreProperties); putIfNotNull(map, FLOWFILE_REPO_KEY, flowfileRepositoryProperties); putIfNotNull(map, CONTENT_REPO_KEY, contentRepositoryProperties); putIfNotNull(map, PROVENANCE_REPO_KEY, provenanceRepositorySchema); putIfNotNull(map, COMPONENT_STATUS_REPO_KEY, componentStatusRepositoryProperties); putIfNotNull(map, SECURITY_PROPS_KEY, securityProperties); List<ProcessorSchema> processorSchemas = getProcessorSchemas(); putListIfNotNull(map, PROCESSORS_KEY, processorSchemas); List<String> validationIssues = getValidationIssues(); putListIfNotNull(map, CONNECTIONS_KEY, getConnectionSchemas(processorSchemas, validationIssues)); putListIfNotNull(map, REMOTE_PROCESS_GROUPS_KEY, getRemoteProcessGroupSchemas()); putIfNotNull(map, PROVENANCE_REPORTING_KEY, provenanceReportingProperties); return new ConfigSchema(map, validationIssues); }