Interface IEventBuilder


public interface IEventBuilder
Builder tool used to produce Event.

A builder instance can only produce one Event instance safely. So, to produce multiple Event instance you need to retrieve multiple builder instances.

Mandatory fields : codeLevelA, codeLevelB, date, user, type

  • Method Details

    • withCodeLevelA

      IEventBuilder withCodeLevelA(String codeLevelA)
      Feeds the codeLevelA and returns the builder
      Parameters:
      codeLevelA - String
      Returns:
      the builder
      Throws:
      IllegalArgumentException - - if codeLevelA is null or blank
    • withCodeLevelB

      IEventBuilder withCodeLevelB(String codeLevelB)
      Feeds the codeLevelB and returns the builder
      Parameters:
      codeLevelB - String
      Returns:
      the builder
      Throws:
      IllegalArgumentException - - if codeLevelB is null or blank
    • withCodeLevelC

      IEventBuilder withCodeLevelC(String codeLevelC)
      Feeds the codeLevelC and returns the builder
      Parameters:
      codeLevelC - String
      Returns:
      the builder
      Throws:
      IllegalArgumentException - - if codeLevelC is null or blank
    • withDate

      IEventBuilder withDate(Date date)
      Feeds the date and returns the builder
      Parameters:
      date - Date
      Returns:
      the builder
      Throws:
      IllegalArgumentException - - if date is null
    • withUser

      IEventBuilder withUser(IUser user)
      Feeds the user and returns the builder
      Parameters:
      user - IUser
      Returns:
      the builder
      Throws:
      IllegalArgumentException - - if user is null
    • withType

      IEventBuilder withType(String type)
      Feeds the type and returns the builder
      Parameters:
      type - String
      Returns:
      the builder
      Throws:
      IllegalArgumentException - - if type is null or blank
    • withObjectType

      IEventBuilder withObjectType(String objectType)
      Feeds the objectType and returns the builder
      Parameters:
      objectType - String
      Returns:
      the builder
      Throws:
      IllegalArgumentException - - if objectType is null or blank
    • withObjectId

      IEventBuilder withObjectId(Long objectId)
      Feeds the objectId and returns the builder
      Parameters:
      objectId - Long
      Returns:
      the builder
      Throws:
      IllegalArgumentException - - if objectId is null
    • withObjectLabel

      IEventBuilder withObjectLabel(String objectLabel)
      Feeds the objectLabel and returns the builder
      Parameters:
      objectLabel - String
      Returns:
      the builder
      Throws:
      IllegalArgumentException - - if objectLabel is null or blank
    • build

      IEvent build() throws EventException
      Produces an Event with the information previously fed using "with..." methods
      Returns:
      the produced Event
      Throws:
      EventException - - If builder hasn't enough data to produce an Event