Package com.atlassian.crowd.audit
Class ImmutableAuditLogChangeset.Builder
java.lang.Object
com.atlassian.crowd.audit.ImmutableAuditLogChangeset.Builder
- Enclosing class:
- ImmutableAuditLogChangeset
Builder for
ImmutableAuditLogChangeset
.
Since 3.2.0 this class introduces special semantics for primary entities. The methods
operate on an implicit primary entity. When building a concrete instance of ImmutableAuditLogChangeset
the entity will be prepended to the collection of entities and marked as primary.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddEntity
(AuditLogEntity entity) addEntity
(ImmutableAuditLogEntity entity) addEntries
(Collection<AuditLogEntry> entry) addEntry
(AuditLogEntry entry) addEntry
(ImmutableAuditLogEntry entry) build()
setAuthor
(AuditLogAuthor author) setAuthorId
(Long authorId) Deprecated.setAuthorName
(String authorName) Deprecated.setAuthorType
(AuditLogAuthorType authorType) Deprecated.setEntities
(Collection<? extends AuditLogEntity> entities) setEntityId
(Long entityId) Deprecated.setEntityName
(String entityName) Deprecated.useaddEntity(ImmutableAuditLogEntity)
insteadsetEntityType
(AuditLogEntityType entityType) Deprecated.useaddEntity(ImmutableAuditLogEntity)
insteadsetEntries
(Collection<? extends AuditLogEntry> entries) setEntries
(List<ImmutableAuditLogEntry> entries) Deprecated.setEventMessage
(String eventMessage) setEventType
(AuditLogEventType eventType) setIpAddress
(String ipAddress) setSource
(AuditLogEventSource source) setTimestamp
(Long timestamp) setTimestamp
(Instant timestamp) setTimestamp
(Date timestamp)
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
Method Details
-
setId
-
setTimestamp
-
setTimestamp
-
setTimestamp
-
setAuthorType
Deprecated. -
setAuthorId
Deprecated. -
setAuthorName
Deprecated. -
setAuthor
-
setEventType
-
setEntityType
Deprecated.useaddEntity(ImmutableAuditLogEntity)
insteadThis method will set the type of the implicit primary entity. If this value is set to a non-null value, an implicit primary entity will be prepended to the entities when building the changeset.- Parameters:
entityType
- the type of the implicit primary entity- Returns:
- the builder instance
-
setEntityId
Deprecated.useaddEntity(ImmutableAuditLogEntity)
insteadThis method will set the identifier of the implicit primary entity. If this value is set to a non-null value, an implicit primary entity will be prepended to the entities when building the changeset.- Parameters:
entityId
- the id of the implicit primary entity- Returns:
- the builder instance
-
setEntityName
Deprecated.useaddEntity(ImmutableAuditLogEntity)
insteadThis method will set the name of the implicit primary entity. If this value is set to a non-null value, an implicit primary entity will be prepended to the entities when building the changeset.- Parameters:
entityName
- the name of the implicit primary entity- Returns:
- the builder instance
-
setIpAddress
-
setEventMessage
-
setSource
-
setEntries
@Deprecated public ImmutableAuditLogChangeset.Builder setEntries(List<ImmutableAuditLogEntry> entries) Deprecated.deprecated UsesetEntries(Collection)
instead. Since v3.2.0. -
setEntries
- Since:
- 3.2.0
-
setEntities
public ImmutableAuditLogChangeset.Builder setEntities(Collection<? extends AuditLogEntity> entities) - Since:
- 3.2.0
-
addEntry
-
addEntry
-
addEntries
-
addEntity
-
addEntity
-
build
- Returns:
- an instance of
ImmutableAuditLogChangeset
from the values set in this builder. If entityId, entityName or entityType are set, an instance ofImmutableAuditLogEntity
will be prepended to entities with the data from these fields and the primary value set to true.
-
addEntity(ImmutableAuditLogEntity)
instead