Package com.plannaplan.services

# Class EventService

java.lang.Object
com.plannaplan.services.EventService

    @Service
    public class EventService
    extends java.lang.Object

Service to manage app events

## Field Summary

Fields
Modifier and Type | Field | Description
--- | --- | ---
`static int` | `FIRST_TOUR_SCHEDULE` |
`static int` | `SECOND_TOUR_SCHEDULE` |

## Constructor Summary

Constructors
Constructor | Description
--- | ---
`EventService()` |

## Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`void` | `collectGroupLosses()` |
`void` | `initialize()` | init resources needed for dynamicly creating new tasks (needed to set tours end events)
`void` | `performExchangeService()` | perfroms checks for matching exchanges daily
`void` | `scheduleTask​(int taskId, java.lang.Runnable task, org.springframework.scheduling.support.CronTrigger cronTrigger)` | Schedule provided task to perform

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### FIRST_TOUR_SCHEDULE

public static final int FIRST_TOUR_SCHEDULE

See Also:
  Constant Field Values

### SECOND_TOUR_SCHEDULE

public static final int SECOND_TOUR_SCHEDULE

See Also:
  Constant Field Values

## Constructor Details

### EventService

public EventService()

## Method Details

### collectGroupLosses

@Scheduled(cron="0 24 17 * * *") public void collectGroupLosses()

### performExchangeService

@Scheduled(cron="0 0 0 * * *") public void performExchangeService()
perfroms checks for matching exchanges daily

### scheduleTask

public void scheduleTask​(int taskId, java.lang.Runnable task, org.springframework.scheduling.support.CronTrigger cronTrigger)
Schedule provided task to perform

Parameters:
  `taskId` - static filed of this class that represents to what event we want to assign task
  `task` - runnable class that perform task in implemented run method
  `cronTrigger` - CronTrigger instance with date to perform

### initialize

@PostConstruct public void initialize()
init resources needed for dynamicly creating new tasks (needed to set tours end events)