test_class.declarator: flowManager
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private FDFlowManager flowManager;
test_class.type: FDFlowManager
test_class.var_name: flowManager
test_class.file: efm/efm-flow-designer/efm-flow-designer-framework/src/test/java/com/cloudera/cem/efm/service/flow/TestDatabaseFDFlowManager.java
test_class.identifier: TestDatabaseFDFlowManager
test_class.superclass: extends DatabaseTest
test_case.body: @Test
      public void testGetFlowEventWhenExists() throws ParseException {
          final String flowEventId = "4";
          final Optional<FDFlowEvent> flowEventOptional = flowManager.getFlowEvent(flowEventId);
          assertTrue(flowEventOptional.isPresent());
  
          final FDFlowEvent flowEvent = flowEventOptional.get();
          assertEquals(flowEventId, flowEvent.getIdentifier());
          assertEquals("2", flowEvent.getFlowIdentifier());
          assertEquals(new BigInteger("3"), flowEvent.getFlowRevision());
          Assert.assertEquals(FDFlowEventType.FLOW_PUBLISHED, flowEvent.getEventType());
          assertEquals("Created root process group", flowEvent.getEventDescription());
          Assert.assertEquals(FDFlowFormat.JACKSON_JSON_V1, flowEvent.getFlowFormat());
          assertEquals("root-group-2", flowEvent.getComponentId());
          assertEquals("system", flowEvent.getUserIdentity());
  
          final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS z");
          assertEquals(dateFormat.parse("2018-07-26 12:54:00.000 UTC").getTime(), flowEvent.getCreated().longValue());
          assertEquals(dateFormat.parse("2018-07-26 12:54:00.000 UTC").getTime(), flowEvent.getUpdated().longValue());
      }
test_case.class_method_signature: TestDatabaseFDFlowManager.testGetFlowEventWhenExists()
test_case.full_signature: @Test public void testGetFlowEventWhenExists()
test_case.identifier: testGetFlowEventWhenExists
test_case.invocations: getFlowEvent assertTrue isPresent get assertEquals getIdentifier assertEquals getFlowIdentifier assertEquals getFlowRevision assertEquals getEventType assertEquals getEventDescription assertEquals getFlowFormat assertEquals getComponentId assertEquals getUserIdentity assertEquals getTime parse longValue getCreated assertEquals getTime parse longValue getUpdated
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetFlowEventWhenExists()
focal_class.declarator: ROOT_PROCESS_GROUP_NAME = "root"
focal_class.modifier: static final
focal_class.original_string: static final String ROOT_PROCESS_GROUP_NAME = "root";
focal_class.type: String
focal_class.var_name: ROOT_PROCESS_GROUP_NAME
focal_class.declarator: UNPUBLISHED = "UNPUBLISHED"
focal_class.modifier: static final
focal_class.original_string: static final String UNPUBLISHED = "UNPUBLISHED";
focal_class.type: String
focal_class.var_name: UNPUBLISHED
focal_class.declarator: CURRENT_FLOW_FORMAT = FDFlowFormat.JACKSON_JSON_V1
focal_class.modifier: public static final
focal_class.original_string: public static final FDFlowFormat CURRENT_FLOW_FORMAT = FDFlowFormat.JACKSON_JSON_V1;
focal_class.type: FDFlowFormat
focal_class.var_name: CURRENT_FLOW_FORMAT
focal_class.declarator: flowRepository
focal_class.modifier: private final
focal_class.original_string: private final FDFlowRepository flowRepository;
focal_class.type: FDFlowRepository
focal_class.var_name: flowRepository
focal_class.declarator: flowEventRepository
focal_class.modifier: private final
focal_class.original_string: private final FDFlowEventRepository flowEventRepository;
focal_class.type: FDFlowEventRepository
focal_class.var_name: flowEventRepository
focal_class.declarator: objectMapper
focal_class.modifier: private final
focal_class.original_string: private final ObjectMapper objectMapper;
focal_class.type: ObjectMapper
focal_class.var_name: objectMapper
focal_class.declarator: flowsById = new ConcurrentHashMap<>()
focal_class.modifier: private
focal_class.original_string: private Map<String,FDFlow> flowsById = new ConcurrentHashMap<>();
focal_class.type: Map<String,FDFlow>
focal_class.var_name: flowsById
focal_class.file: efm/efm-flow-designer/efm-flow-designer-framework/src/main/java/com/cloudera/cem/efm/service/flow/DatabaseFDFlowManager.java
focal_class.identifier: DatabaseFDFlowManager
focal_class.interfaces: implements FDFlowManager
focal_class.class_method_signature: DatabaseFDFlowManager.DatabaseFDFlowManager(final FDFlowRepository flowRepository,
                                   final FDFlowEventRepository flowEventRepository,
                                   final OptionalModelMapper modelMapper,
                                   final ObjectMapper objectMapper,
                                   final Validator validator)
focal_class.full_signature: @Autowired public  DatabaseFDFlowManager(final FDFlowRepository flowRepository,
                                   final FDFlowEventRepository flowEventRepository,
                                   final OptionalModelMapper modelMapper,
                                   final ObjectMapper objectMapper,
                                   final Validator validator)
focal_class.identifier: DatabaseFDFlowManager
focal_class.modifiers: @Autowired public
focal_class.parameters: (final FDFlowRepository flowRepository,
                                   final FDFlowEventRepository flowEventRepository,
                                   final OptionalModelMapper modelMapper,
                                   final ObjectMapper objectMapper,
                                   final Validator validator)
focal_class.signature:  DatabaseFDFlowManager(final FDFlowRepository flowRepository,
                                   final FDFlowEventRepository flowEventRepository,
                                   final OptionalModelMapper modelMapper,
                                   final ObjectMapper objectMapper,
                                   final Validator validator)
focal_class.class_method_signature: DatabaseFDFlowManager.getFlowMetadata(final String flowId)
focal_class.full_signature: @Override public Optional<FDFlowMetadata> getFlowMetadata(final String flowId)
focal_class.identifier: getFlowMetadata
focal_class.modifiers: @Override public
focal_class.parameters: (final String flowId)
focal_class.return: Optional<FDFlowMetadata>
focal_class.signature: Optional<FDFlowMetadata> getFlowMetadata(final String flowId)
focal_class.class_method_signature: DatabaseFDFlowManager.getFlow(final String flowId)
focal_class.full_signature: @Override public Optional<FDFlow> getFlow(final String flowId)
focal_class.identifier: getFlow
focal_class.modifiers: @Override public
focal_class.parameters: (final String flowId)
focal_class.return: Optional<FDFlow>
focal_class.signature: Optional<FDFlow> getFlow(final String flowId)
focal_class.class_method_signature: DatabaseFDFlowManager.createFlow(final String agentClass, final NiFiUser user)
focal_class.full_signature: @Override public FDFlowMetadata createFlow(final String agentClass, final NiFiUser user)
focal_class.identifier: createFlow
focal_class.modifiers: @Override public
focal_class.parameters: (final String agentClass, final NiFiUser user)
focal_class.return: FDFlowMetadata
focal_class.signature: FDFlowMetadata createFlow(final String agentClass, final NiFiUser user)
focal_class.class_method_signature: DatabaseFDFlowManager.getAvailableFlows()
focal_class.full_signature: @Override public List<FDFlowMetadata> getAvailableFlows()
focal_class.identifier: getAvailableFlows
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<FDFlowMetadata>
focal_class.signature: List<FDFlowMetadata> getAvailableFlows()
focal_class.class_method_signature: DatabaseFDFlowManager.getFlowSummaries()
focal_class.full_signature: @Override public List<FDFlowSummary> getFlowSummaries()
focal_class.identifier: getFlowSummaries
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<FDFlowSummary>
focal_class.signature: List<FDFlowSummary> getFlowSummaries()
focal_class.class_method_signature: DatabaseFDFlowManager.deleteFlow(final String flowId)
focal_class.full_signature: @Override public FDFlowMetadata deleteFlow(final String flowId)
focal_class.identifier: deleteFlow
focal_class.modifiers: @Override public
focal_class.parameters: (final String flowId)
focal_class.return: FDFlowMetadata
focal_class.signature: FDFlowMetadata deleteFlow(final String flowId)
focal_class.class_method_signature: DatabaseFDFlowManager.getFlowEvents(final String flowId)
focal_class.full_signature: @Override public List<FDFlowEvent> getFlowEvents(final String flowId)
focal_class.identifier: getFlowEvents
focal_class.modifiers: @Override public
focal_class.parameters: (final String flowId)
focal_class.return: List<FDFlowEvent>
focal_class.signature: List<FDFlowEvent> getFlowEvents(final String flowId)
focal_class.class_method_signature: DatabaseFDFlowManager.getLatestFlowEvent(final String flowId)
focal_class.full_signature: @Override public Optional<FDFlowEvent> getLatestFlowEvent(final String flowId)
focal_class.identifier: getLatestFlowEvent
focal_class.modifiers: @Override public
focal_class.parameters: (final String flowId)
focal_class.return: Optional<FDFlowEvent>
focal_class.signature: Optional<FDFlowEvent> getLatestFlowEvent(final String flowId)
focal_class.class_method_signature: DatabaseFDFlowManager.getLatestFlowEventEntity(final String flowId)
focal_class.full_signature: private Optional<FDFlowEventEntity> getLatestFlowEventEntity(final String flowId)
focal_class.identifier: getLatestFlowEventEntity
focal_class.modifiers: private
focal_class.parameters: (final String flowId)
focal_class.return: Optional<FDFlowEventEntity>
focal_class.signature: Optional<FDFlowEventEntity> getLatestFlowEventEntity(final String flowId)
focal_class.class_method_signature: DatabaseFDFlowManager.getLatestPublishFlowEvent(final String flowId)
focal_class.full_signature: @Override public Optional<FDFlowEvent> getLatestPublishFlowEvent(final String flowId)
focal_class.identifier: getLatestPublishFlowEvent
focal_class.modifiers: @Override public
focal_class.parameters: (final String flowId)
focal_class.return: Optional<FDFlowEvent>
focal_class.signature: Optional<FDFlowEvent> getLatestPublishFlowEvent(final String flowId)
focal_class.class_method_signature: DatabaseFDFlowManager.getFlowEvent(final String flowEventId)
focal_class.full_signature: @Override public Optional<FDFlowEvent> getFlowEvent(final String flowEventId)
focal_class.identifier: getFlowEvent
focal_class.modifiers: @Override public
focal_class.parameters: (final String flowEventId)
focal_class.return: Optional<FDFlowEvent>
focal_class.signature: Optional<FDFlowEvent> getFlowEvent(final String flowEventId)
focal_class.class_method_signature: DatabaseFDFlowManager.addFlowEvent(final FDFlowEvent flowEvent, final VersionedProcessGroup flowContent, final NiFiUser user)
focal_class.full_signature: @Override public FDFlowEvent addFlowEvent(final FDFlowEvent flowEvent, final VersionedProcessGroup flowContent, final NiFiUser user)
focal_class.identifier: addFlowEvent
focal_class.modifiers: @Override public
focal_class.parameters: (final FDFlowEvent flowEvent, final VersionedProcessGroup flowContent, final NiFiUser user)
focal_class.return: FDFlowEvent
focal_class.signature: FDFlowEvent addFlowEvent(final FDFlowEvent flowEvent, final VersionedProcessGroup flowContent, final NiFiUser user)
focal_class.class_method_signature: DatabaseFDFlowManager.deleteFlowEvent(final String flowEventId)
focal_class.full_signature: @Override public FDFlowEvent deleteFlowEvent(final String flowEventId)
focal_class.identifier: deleteFlowEvent
focal_class.modifiers: @Override public
focal_class.parameters: (final String flowEventId)
focal_class.return: FDFlowEvent
focal_class.signature: FDFlowEvent deleteFlowEvent(final String flowEventId)
focal_class.class_method_signature: DatabaseFDFlowManager.retainPublishEvents(final String flowId)
focal_class.full_signature: @Override public void retainPublishEvents(final String flowId)
focal_class.identifier: retainPublishEvents
focal_class.modifiers: @Override public
focal_class.parameters: (final String flowId)
focal_class.return: void
focal_class.signature: void retainPublishEvents(final String flowId)
focal_class.class_method_signature: DatabaseFDFlowManager.revertToFlowRevision(final String flowId, final BigInteger flowRevision)
focal_class.full_signature: @Override public void revertToFlowRevision(final String flowId, final BigInteger flowRevision)
focal_class.identifier: revertToFlowRevision
focal_class.modifiers: @Override public
focal_class.parameters: (final String flowId, final BigInteger flowRevision)
focal_class.return: void
focal_class.signature: void revertToFlowRevision(final String flowId, final BigInteger flowRevision)
focal_class.class_method_signature: DatabaseFDFlowManager.serializeFlowContent(final VersionedProcessGroup flowContent)
focal_class.full_signature: private String serializeFlowContent(final VersionedProcessGroup flowContent)
focal_class.identifier: serializeFlowContent
focal_class.modifiers: private
focal_class.parameters: (final VersionedProcessGroup flowContent)
focal_class.return: String
focal_class.signature: String serializeFlowContent(final VersionedProcessGroup flowContent)
focal_class.class_method_signature: DatabaseFDFlowManager.deserialize(String flowContent)
focal_class.full_signature: private VersionedProcessGroup deserialize(String flowContent)
focal_class.identifier: deserialize
focal_class.modifiers: private
focal_class.parameters: (String flowContent)
focal_class.return: VersionedProcessGroup
focal_class.signature: VersionedProcessGroup deserialize(String flowContent)
focal_class.class_method_signature: DatabaseFDFlowManager.createVersionInfo(final FDFlowEventEntity flowEvent)
focal_class.full_signature: private FDVersionInfo createVersionInfo(final FDFlowEventEntity flowEvent)
focal_class.identifier: createVersionInfo
focal_class.modifiers: private
focal_class.parameters: (final FDFlowEventEntity flowEvent)
focal_class.return: FDVersionInfo
focal_class.signature: FDVersionInfo createVersionInfo(final FDFlowEventEntity flowEvent)
focal_class.superclass: extends BaseService
focal_method.body: @Override
      public Optional<FDFlowEvent> getFlowEvent(final String flowEventId) {
          if (StringUtils.isBlank(flowEventId)) {
              throw new IllegalArgumentException("Flow event id cannot be null or blank");
          }
  
          final Optional<FDFlowEventEntity> flowEventEntity = flowEventRepository.findById(flowEventId);
          if (flowEventEntity.isPresent()) {
              final FDFlowEvent flowEvent = modelMapper.map(flowEventEntity.get(), FDFlowEvent.class);
              return Optional.of(flowEvent);
          } else {
              return Optional.empty();
          }
      }
focal_method.class_method_signature: DatabaseFDFlowManager.getFlowEvent(final String flowEventId)
focal_method.full_signature: @Override public Optional<FDFlowEvent> getFlowEvent(final String flowEventId)
focal_method.identifier: getFlowEvent
focal_method.invocations: isBlank findById isPresent map get of empty
focal_method.modifiers: @Override public
focal_method.parameters: (final String flowEventId)
focal_method.return: Optional<FDFlowEvent>
focal_method.signature: Optional<FDFlowEvent> getFlowEvent(final String flowEventId)