Class AuditInstanceBuilderImpl
java.lang.Object
com.flowable.audit.engine.impl.runtime.AuditInstanceBuilderImpl
- All Implemented Interfaces:
AuditInstanceBuilder
public class AuditInstanceBuilderImpl extends java.lang.Object implements AuditInstanceBuilder
- Author:
- Tijs Rademakers, Joram Barrez
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
auditDefinitionId
protected AuditServiceImpl
auditService
protected java.lang.String
creatorId
protected java.lang.String
externalId
protected java.util.Map<java.lang.String,java.lang.Object>
payload
protected java.lang.String
scopeDefinitionId
protected java.lang.String
scopeId
protected java.lang.String
scopeType
protected java.lang.String
subScopeId
protected java.lang.String
subType
protected java.lang.String
tenantId
protected java.lang.String
type
-
Constructor Summary
Constructors Constructor Description AuditInstanceBuilderImpl(AuditServiceImpl auditService)
-
Method Summary
Modifier and Type Method Description AuditInstanceBuilder
auditDefinitionId(java.lang.String auditDefinitionId)
Set the audit definition of this audit instance.AuditInstance
create()
Creates and persists theAuditInstance
according the data provided to this builder.AuditInstanceBuilder
creatorId(java.lang.String creatorId)
Set the optional creator id.AuditInstanceBuilder
externalId(java.lang.String externalId)
If this audit instance was created from an external system, set this optional external id to map to that external data object id, if necessary.java.lang.String
getAuditDefinitionId()
AuditService
getAuditService()
java.lang.String
getCreatorId()
java.lang.String
getExternalId()
java.util.Map<java.lang.String,java.lang.Object>
getPayload()
java.lang.String
getScopeDefinitionId()
java.lang.String
getScopeId()
java.lang.String
getScopeType()
java.lang.String
getSubScopeId()
java.lang.String
getSubType()
java.lang.String
getTenantId()
java.lang.String
getType()
AuditInstanceBuilder
payload(java.util.Map<java.lang.String,java.lang.Object> payload)
Set the optional payload as a generic map representation for this audit instance as described within theAuditDefinition
.AuditInstanceBuilder
scopeDefinitionId(java.lang.String scopeDefinitionId)
Set the scope instance definition for which the audit instance was created.AuditInstanceBuilder
scopeId(java.lang.String scopeId)
Set the optional scope instance for which the audit instance was created.AuditInstanceBuilder
scopeType(java.lang.String scopeType)
Set the optional scope instance type for which the audit instance was created (must be set ifAuditInstanceBuilder.scopeId(String)
is set).AuditInstanceBuilder
subScopeId(java.lang.String subScopeId)
Set the optional subScope instance for which the audit instance was created.AuditInstanceBuilder
subType(java.lang.String subType)
Set the sub type of this audit instance.AuditInstanceBuilder
tenantId(java.lang.String tenantId)
The tenantId for the audit instance.AuditInstanceBuilder
type(java.lang.String type)
Set the main type of this audit instance.
-
Field Details
-
auditService
-
auditDefinitionId
protected java.lang.String auditDefinitionId -
scopeId
protected java.lang.String scopeId -
subScopeId
protected java.lang.String subScopeId -
scopeType
protected java.lang.String scopeType -
scopeDefinitionId
protected java.lang.String scopeDefinitionId -
externalId
protected java.lang.String externalId -
tenantId
protected java.lang.String tenantId -
type
protected java.lang.String type -
subType
protected java.lang.String subType -
payload
protected java.util.Map<java.lang.String,java.lang.Object> payload -
creatorId
protected java.lang.String creatorId
-
-
Constructor Details
-
Method Details
-
auditDefinitionId
Description copied from interface:AuditInstanceBuilder
Set the audit definition of this audit instance.- Specified by:
auditDefinitionId
in interfaceAuditInstanceBuilder
-
scopeId
Description copied from interface:AuditInstanceBuilder
Set the optional scope instance for which the audit instance was created.- Specified by:
scopeId
in interfaceAuditInstanceBuilder
-
subScopeId
Description copied from interface:AuditInstanceBuilder
Set the optional subScope instance for which the audit instance was created.- Specified by:
subScopeId
in interfaceAuditInstanceBuilder
-
scopeType
Description copied from interface:AuditInstanceBuilder
Set the optional scope instance type for which the audit instance was created (must be set ifAuditInstanceBuilder.scopeId(String)
is set).- Specified by:
scopeType
in interfaceAuditInstanceBuilder
-
scopeDefinitionId
Description copied from interface:AuditInstanceBuilder
Set the scope instance definition for which the audit instance was created.- Specified by:
scopeDefinitionId
in interfaceAuditInstanceBuilder
-
externalId
Description copied from interface:AuditInstanceBuilder
If this audit instance was created from an external system, set this optional external id to map to that external data object id, if necessary.- Specified by:
externalId
in interfaceAuditInstanceBuilder
-
tenantId
Description copied from interface:AuditInstanceBuilder
The tenantId for the audit instance.- Specified by:
tenantId
in interfaceAuditInstanceBuilder
-
type
Description copied from interface:AuditInstanceBuilder
Set the main type of this audit instance. The type and sub type might later be used for easy querying and filtering of the audit stream.- Specified by:
type
in interfaceAuditInstanceBuilder
-
subType
Description copied from interface:AuditInstanceBuilder
Set the sub type of this audit instance. The type and sub type might later be used for easy querying and filtering of the audit stream.- Specified by:
subType
in interfaceAuditInstanceBuilder
-
payload
Description copied from interface:AuditInstanceBuilder
Set the optional payload as a generic map representation for this audit instance as described within theAuditDefinition
.- Specified by:
payload
in interfaceAuditInstanceBuilder
-
creatorId
Description copied from interface:AuditInstanceBuilder
Set the optional creator id. If no creator id is set, currently authenticated user is used.- Specified by:
creatorId
in interfaceAuditInstanceBuilder
-
create
Description copied from interface:AuditInstanceBuilder
Creates and persists theAuditInstance
according the data provided to this builder.- Specified by:
create
in interfaceAuditInstanceBuilder
- Returns:
- the newly created and persisted audit instance
-
getAuditService
-
getAuditDefinitionId
public java.lang.String getAuditDefinitionId() -
getScopeId
public java.lang.String getScopeId() -
getSubScopeId
public java.lang.String getSubScopeId() -
getScopeType
public java.lang.String getScopeType() -
getScopeDefinitionId
public java.lang.String getScopeDefinitionId() -
getExternalId
public java.lang.String getExternalId() -
getTenantId
public java.lang.String getTenantId() -
getType
public java.lang.String getType() -
getSubType
public java.lang.String getSubType() -
getPayload
public java.util.Map<java.lang.String,java.lang.Object> getPayload() -
getCreatorId
public java.lang.String getCreatorId()
-