test_class.declarator: helper
test_class.modifier: @Autowired
  	protected
test_class.original_string: @Autowired
  	protected TestHelper helper;
test_class.type: TestHelper
test_class.var_name: helper
test_class.declarator: longPollingManager
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private LongPollingManager longPollingManager;
test_class.type: LongPollingManager
test_class.var_name: longPollingManager
test_class.declarator: roleRequestService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private IdmRoleRequestService roleRequestService;
test_class.type: IdmRoleRequestService
test_class.var_name: roleRequestService
test_class.declarator: configurationService
test_class.modifier: @Autowired
  	@Lazy
  	private
test_class.original_string: @Autowired
  	@Lazy
  	private ConfigurationService configurationService;
test_class.type: ConfigurationService
test_class.var_name: configurationService
test_class.file: Realization/backend/core/core-impl/src/test/java/eu/bcvsolutions/idm/core/model/service/impl/DefaultLongPollingManagerTest.java
test_class.identifier: DefaultLongPollingManagerTest
test_class.superclass: extends AbstractCoreWorkflowIntegrationTest
test_case.body: @Test
  	public void testGetLastTimeStamp() {
  		IdmIdentityDto identityOne = new IdmIdentityDto();
  
  		identityOne.setCreated(ZonedDateTime.now().minusMinutes(10));
  		identityOne.setModified(ZonedDateTime.now().minusMinutes(100));
  		ZonedDateTime lastTimeStamp = longPollingManager.getLastTimeStamp(identityOne);
  		assertEquals(identityOne.getCreated().plus(1, ChronoUnit.MILLIS), lastTimeStamp);
  
  		identityOne.setCreated(ZonedDateTime.now().minusMinutes(100));
  		identityOne.setModified(ZonedDateTime.now().minusMinutes(10));
  		lastTimeStamp = longPollingManager.getLastTimeStamp(identityOne);
  		assertEquals(identityOne.getModified().plus(1, ChronoUnit.MILLIS), lastTimeStamp);
  
  		identityOne.setCreated(ZonedDateTime.now().minusMinutes(100));
  		identityOne.setModified(null);
  		lastTimeStamp = longPollingManager.getLastTimeStamp(identityOne);
  		assertEquals(identityOne.getCreated().plus(1, ChronoUnit.MILLIS), lastTimeStamp);
  
  		identityOne.setCreated(null);
  		identityOne.setModified(ZonedDateTime.now().minusMinutes(100));
  		lastTimeStamp = longPollingManager.getLastTimeStamp(identityOne);
  		assertEquals(identityOne.getModified().plus(1, ChronoUnit.MILLIS), lastTimeStamp);
  	}
test_case.class_method_signature: DefaultLongPollingManagerTest.testGetLastTimeStamp()
test_case.full_signature: @Test public void testGetLastTimeStamp()
test_case.identifier: testGetLastTimeStamp
test_case.invocations: setCreated minusMinutes now setModified minusMinutes now getLastTimeStamp assertEquals plus getCreated setCreated minusMinutes now setModified minusMinutes now getLastTimeStamp assertEquals plus getModified setCreated minusMinutes now setModified getLastTimeStamp assertEquals plus getCreated setCreated setModified minusMinutes now getLastTimeStamp assertEquals plus getModified
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetLastTimeStamp()
focal_class.declarator: LOG = LoggerFactory.getLogger(DefaultLongPollingManager.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(DefaultLongPollingManager.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: suspendedRequests = new ConcurrentLinkedQueue<DeferredResultWrapper>()
focal_class.modifier: private final
focal_class.original_string: private final Queue<DeferredResultWrapper> suspendedRequests = new ConcurrentLinkedQueue<DeferredResultWrapper>();
focal_class.type: Queue<DeferredResultWrapper>
focal_class.var_name: suspendedRequests
focal_class.declarator: registredSubscribers = new ConcurrentHashMap<UUID, LongPollingSubscriber>()
focal_class.modifier: private final
focal_class.original_string: private final Map<UUID, LongPollingSubscriber> registredSubscribers = new ConcurrentHashMap<UUID, LongPollingSubscriber>();
focal_class.type: Map<UUID, LongPollingSubscriber>
focal_class.var_name: registredSubscribers
focal_class.declarator: configurationService
focal_class.modifier: @Autowired
  	@Lazy
  	private
focal_class.original_string: @Autowired
  	@Lazy
  	private ConfigurationService configurationService;
focal_class.type: ConfigurationService
focal_class.var_name: configurationService
focal_class.file: Realization/backend/core/core-impl/src/main/java/eu/bcvsolutions/idm/core/model/service/impl/DefaultLongPollingManager.java
focal_class.identifier: DefaultLongPollingManager
focal_class.interfaces: implements LongPollingManager
focal_class.class_method_signature: DefaultLongPollingManager.checkDeferredRequests(Class<? extends AbstractDto> type)
focal_class.full_signature: @Override public void checkDeferredRequests(Class<? extends AbstractDto> type)
focal_class.identifier: checkDeferredRequests
focal_class.modifiers: @Override public
focal_class.parameters: (Class<? extends AbstractDto> type)
focal_class.return: void
focal_class.signature: void checkDeferredRequests(Class<? extends AbstractDto> type)
focal_class.class_method_signature: DefaultLongPollingManager.addSuspendedResult(DeferredResultWrapper result)
focal_class.full_signature: @Override public synchronized void addSuspendedResult(DeferredResultWrapper result)
focal_class.identifier: addSuspendedResult
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (DeferredResultWrapper result)
focal_class.return: void
focal_class.signature: void addSuspendedResult(DeferredResultWrapper result)
focal_class.class_method_signature: DefaultLongPollingManager.baseCheckDeferredResult(DeferredResult<OperationResultDto> deferredResult,
  			LongPollingSubscriber subscriber, ModifiedFromFilter filter,
  			ReadDtoService service, boolean checkCount)
focal_class.full_signature: @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void baseCheckDeferredResult(DeferredResult<OperationResultDto> deferredResult,
  			LongPollingSubscriber subscriber, ModifiedFromFilter filter,
  			ReadDtoService service, boolean checkCount)
focal_class.identifier: baseCheckDeferredResult
focal_class.modifiers: @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public
focal_class.parameters: (DeferredResult<OperationResultDto> deferredResult,
  			LongPollingSubscriber subscriber, ModifiedFromFilter filter,
  			ReadDtoService service, boolean checkCount)
focal_class.return: void
focal_class.signature: void baseCheckDeferredResult(DeferredResult<OperationResultDto> deferredResult,
  			LongPollingSubscriber subscriber, ModifiedFromFilter filter,
  			ReadDtoService service, boolean checkCount)
focal_class.class_method_signature: DefaultLongPollingManager.clearUnUseSubscribers()
focal_class.full_signature: @Scheduled(fixedDelay = 7200000) // Every two hours public void clearUnUseSubscribers()
focal_class.identifier: clearUnUseSubscribers
focal_class.modifiers: @Scheduled(fixedDelay = 7200000) // Every two hours public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clearUnUseSubscribers()
focal_class.class_method_signature: DefaultLongPollingManager.clearUnUseSubscribers(ZonedDateTime clearBeforIt)
focal_class.full_signature: @Override public void clearUnUseSubscribers(ZonedDateTime clearBeforIt)
focal_class.identifier: clearUnUseSubscribers
focal_class.modifiers: @Override public
focal_class.parameters: (ZonedDateTime clearBeforIt)
focal_class.return: void
focal_class.signature: void clearUnUseSubscribers(ZonedDateTime clearBeforIt)
focal_class.class_method_signature: DefaultLongPollingManager.isLongPollingEnabled()
focal_class.full_signature: @Override public boolean isLongPollingEnabled()
focal_class.identifier: isLongPollingEnabled
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isLongPollingEnabled()
focal_class.class_method_signature: DefaultLongPollingManager.getLastTimeStamp(AbstractDto dto)
focal_class.full_signature: @Override public ZonedDateTime getLastTimeStamp(AbstractDto dto)
focal_class.identifier: getLastTimeStamp
focal_class.modifiers: @Override public
focal_class.parameters: (AbstractDto dto)
focal_class.return: ZonedDateTime
focal_class.signature: ZonedDateTime getLastTimeStamp(AbstractDto dto)
focal_class.class_method_signature: DefaultLongPollingManager.getSuspendedRequests()
focal_class.full_signature: public Queue<DeferredResultWrapper> getSuspendedRequests()
focal_class.identifier: getSuspendedRequests
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Queue<DeferredResultWrapper>
focal_class.signature: Queue<DeferredResultWrapper> getSuspendedRequests()
focal_class.class_method_signature: DefaultLongPollingManager.getRegistredSubscribers()
focal_class.full_signature: public Map<UUID, LongPollingSubscriber> getRegistredSubscribers()
focal_class.identifier: getRegistredSubscribers
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<UUID, LongPollingSubscriber>
focal_class.signature: Map<UUID, LongPollingSubscriber> getRegistredSubscribers()
focal_method.body: @Override
  	public ZonedDateTime getLastTimeStamp(AbstractDto dto) {
  		ZonedDateTime lastModified = dto.getModified();
  		if (lastModified == null) {
  			lastModified = dto.getCreated();
  		}
  
  		if (lastModified == null) {
  			return null;
  		}
  
  		if (dto.getCreated() != null && lastModified.isBefore(dto.getCreated())) {
  			lastModified = dto.getCreated();
  		}
  
  		return lastModified.plus(1, ChronoUnit.MILLIS);
  	}
focal_method.class_method_signature: DefaultLongPollingManager.getLastTimeStamp(AbstractDto dto)
focal_method.full_signature: @Override public ZonedDateTime getLastTimeStamp(AbstractDto dto)
focal_method.identifier: getLastTimeStamp
focal_method.invocations: getModified getCreated getCreated isBefore getCreated getCreated plus
focal_method.modifiers: @Override public
focal_method.parameters: (AbstractDto dto)
focal_method.return: ZonedDateTime
focal_method.signature: ZonedDateTime getLastTimeStamp(AbstractDto dto)