Class EventServiceImpl

java.lang.Object
io.meeds.gamification.service.impl.EventServiceImpl
All Implemented Interfaces:
EventService

public class EventServiceImpl extends Object implements EventService
  • Constructor Details

    • EventServiceImpl

      public EventServiceImpl(EventStorage eventStorage)
  • Method Details

    • getEvents

      public List<EventDTO> getEvents(EventFilter eventFilter, int offset, int limit)
      Description copied from interface: EventService
      Get events by filter using offset and limit.
      Specified by:
      getEvents in interface EventService
      Parameters:
      eventFilter - EventFilter used to filter events
      offset - Offset of result
      limit - Limit of result
      Returns:
      List of EventDTO
    • getEventsByTitle

      public List<EventDTO> getEventsByTitle(String title, int offset, int limit)
      Specified by:
      getEventsByTitle in interface EventService
      Parameters:
      title - EventDTO title
      offset - Offset of result
      limit - Limit of result
      Returns:
      List of EventDTO
    • countEvents

      public int countEvents(EventFilter eventFilter)
      Specified by:
      countEvents in interface EventService
      Parameters:
      eventFilter - EventFilter used to count associated events
      Returns:
      count events by filter
    • getEventByTitleAndTrigger

      public EventDTO getEventByTitleAndTrigger(String title, String trigger)
      Description copied from interface: EventService
      Get gamification event by event title and trigger name
      Specified by:
      getEventByTitleAndTrigger in interface EventService
      Parameters:
      title - event title
      trigger - trigger name
      Returns:
      EventDTO
    • getEventByTypeAndTitle

      public EventDTO getEventByTypeAndTitle(String type, String title)
      Description copied from interface: EventService
      Get gamification event by event type and title
      Specified by:
      getEventByTypeAndTitle in interface EventService
      Parameters:
      type - event type
      title - event title
      Returns:
      EventDTO
    • createEvent

      public EventDTO createEvent(EventDTO eventDTO) throws org.exoplatform.commons.ObjectAlreadyExistsException
      Description copied from interface: EventService
      Add Event to DB
      Specified by:
      createEvent in interface EventService
      Parameters:
      eventDTO - EventDTO to create
      Returns:
      EventDTO
      Throws:
      org.exoplatform.commons.ObjectAlreadyExistsException - when event already exists
    • updateEvent

      public EventDTO updateEvent(EventDTO eventDTO) throws org.exoplatform.commons.exception.ObjectNotFoundException
      Description copied from interface: EventService
      Update event
      Specified by:
      updateEvent in interface EventService
      Parameters:
      eventDTO - EventDTO to update
      Returns:
      updated EventDTO
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException - when event doesn't exists
    • getEvent

      public EventDTO getEvent(long eventId)
      Description copied from interface: EventService
      Retrieves gamification event by event id
      Specified by:
      getEvent in interface EventService
      Parameters:
      eventId - Event Identifier
      Returns:
      EventDTO
    • deleteEventById

      public EventDTO deleteEventById(long eventId) throws org.exoplatform.commons.exception.ObjectNotFoundException
      Description copied from interface: EventService
      Deletes an existing event
      Specified by:
      deleteEventById in interface EventService
      Parameters:
      eventId - Event technical identifier to delete
      Returns:
      deleted EventDTO
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException