public static class ActorRequestFactory.Builder
extends java.lang.Object
ActorRequestFactory
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
ActorRequestFactory |
build()
Ensures that all the
Builder parameters are set properly. |
io.spine.core.UserId |
getActor() |
@Nullable io.spine.core.TenantId |
getTenantId()
Obtains the ID of the tenant in a multi-tenant application to which the actor belongs.
|
@Nullable io.spine.time.ZoneId |
getZoneId()
Obtains the zone ID set in the builder.
|
@Nullable io.spine.time.ZoneOffset |
getZoneOffset()
Obtains the zone offset set in the builder.
|
ActorRequestFactory.Builder |
setActor(io.spine.core.UserId actor)
Sets the ID for the user generating commands.
|
ActorRequestFactory.Builder |
setTenantId(@Nullable io.spine.core.TenantId tenantId)
Sets the ID of a tenant in a multi-tenant application to which the actor belongs.
|
ActorRequestFactory.Builder |
setZoneId(io.spine.time.ZoneId zoneId)
Sets the ID of the time zone in which the user works.
|
ActorRequestFactory.Builder |
setZoneOffset(io.spine.time.ZoneOffset zoneOffset)
Sets the offset of the time zone in which the user works.
|
public io.spine.core.UserId getActor()
@CanIgnoreReturnValue public ActorRequestFactory.Builder setActor(io.spine.core.UserId actor)
actor
- the ID of the user generating commandspublic @Nullable io.spine.time.ZoneOffset getZoneOffset()
null
if the value was not set@CanIgnoreReturnValue public ActorRequestFactory.Builder setZoneOffset(io.spine.time.ZoneOffset zoneOffset)
zoneOffset
- the offset of the time zone the user works inpublic @Nullable io.spine.time.ZoneId getZoneId()
null
if the value was not set@CanIgnoreReturnValue public ActorRequestFactory.Builder setZoneId(io.spine.time.ZoneId zoneId)
zoneId
- thepublic @Nullable io.spine.core.TenantId getTenantId()
null
for a single-tenant execution context@CanIgnoreReturnValue public ActorRequestFactory.Builder setTenantId(@Nullable io.spine.core.TenantId tenantId)
tenantId
- the ID of the tenant or null
for single-tenant execution contextpublic ActorRequestFactory build()
Builder
parameters are set properly.
Initializes zoneOffset
and zoneId
with default values if they are
not defined.