Package com.axemble.vdoc.sdk.history
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 Summary
Modifier and TypeMethodDescriptionbuild()
Produces an Event with the information previously fed using "with..." methodswithCodeLevelA
(String codeLevelA) Feeds the codeLevelA and returns the builderwithCodeLevelB
(String codeLevelB) Feeds the codeLevelB and returns the builderwithCodeLevelC
(String codeLevelC) Feeds the codeLevelC and returns the builderFeeds the date and returns the builderwithObjectId
(Long objectId) Feeds the objectId and returns the builderwithObjectLabel
(String objectLabel) Feeds the objectLabel and returns the builderwithObjectType
(String objectType) Feeds the objectType and returns the builderFeeds the type and returns the builderFeeds the user and returns the builder
-
Method Details
-
withCodeLevelA
Feeds the codeLevelA and returns the builder- Parameters:
codeLevelA
- String- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if codeLevelA is null or blank
-
withCodeLevelB
Feeds the codeLevelB and returns the builder- Parameters:
codeLevelB
- String- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if codeLevelB is null or blank
-
withCodeLevelC
Feeds the codeLevelC and returns the builder- Parameters:
codeLevelC
- String- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if codeLevelC is null or blank
-
withDate
Feeds the date and returns the builder- Parameters:
date
- Date- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if date is null
-
withUser
Feeds the user and returns the builder- Parameters:
user
- IUser- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if user is null
-
withType
Feeds the type and returns the builder- Parameters:
type
- String- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if type is null or blank
-
withObjectType
Feeds the objectType and returns the builder- Parameters:
objectType
- String- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if objectType is null or blank
-
withObjectId
Feeds the objectId and returns the builder- Parameters:
objectId
- Long- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if objectId is null
-
withObjectLabel
Feeds the objectLabel and returns the builder- Parameters:
objectLabel
- String- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if objectLabel is null or blank
-
build
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
-