public class InternalCallContextFactory
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
InternalCallContextFactory.ObjectDoesNotExist |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.Long |
INTERNAL_TENANT_RECORD_ID |
static java.lang.String |
MDC_KB_ACCOUNT_RECORD_ID |
static java.lang.String |
MDC_KB_TENANT_RECORD_ID |
static java.lang.String |
MDC_KB_USER_TOKEN |
| Constructor and Description |
|---|
InternalCallContextFactory(ImmutableAccountInternalApi accountInternalApi,
org.killbill.clock.Clock clock,
NonEntityDao nonEntityDao,
CacheControllerDispatcher cacheControllerDispatcher) |
| Modifier and Type | Method and Description |
|---|---|
org.killbill.billing.util.callcontext.CallContext |
createCallContext(InternalCallContext context) |
InternalCallContext |
createInternalCallContext(org.joda.time.DateTimeZone fixedOffsetTimeZone,
org.joda.time.DateTime referenceTime,
java.lang.Long accountRecordId,
InternalCallContext context) |
InternalCallContext |
createInternalCallContext(java.lang.Long accountRecordId,
InternalCallContext context) |
InternalCallContext |
createInternalCallContext(java.lang.Long tenantRecordId,
java.lang.Long accountRecordId,
java.lang.String userName,
org.killbill.billing.util.callcontext.CallOrigin callOrigin,
org.killbill.billing.util.callcontext.UserType userType,
java.util.UUID userToken)
Create an internal call callcontext
This is used by notification queue and persistent bus - accountRecordId is expected to be non null
|
InternalCallContext |
createInternalCallContext(TimeZoneAwareEntity accountModelDao,
java.lang.Long accountRecordId,
InternalCallContext context) |
InternalCallContext |
createInternalCallContext(java.util.UUID accountId,
org.killbill.billing.util.callcontext.CallContext context)
Create an internal call callcontext using an existing account to retrieve tenant and account record ids
This is used for r/w operations - we need the account id to populate the account_record_id field
|
InternalCallContext |
createInternalCallContext(java.util.UUID objectId,
org.killbill.billing.ObjectType objectType,
org.killbill.billing.util.callcontext.CallContext context)
Create an internal call callcontext from a call callcontext, and retrieving the account_record_id from another table
|
InternalCallContext |
createInternalCallContext(java.util.UUID objectId,
org.killbill.billing.ObjectType objectType,
java.lang.String userName,
org.killbill.billing.util.callcontext.CallOrigin callOrigin,
org.killbill.billing.util.callcontext.UserType userType,
java.util.UUID userToken,
java.lang.Long tenantRecordId) |
InternalCallContext |
createInternalCallContextWithoutAccountRecordId(org.killbill.billing.util.callcontext.CallContext context)
Create an internal call callcontext without populating the account record id
This is used for update/delete operations - we don't need the account id in that case - and
also when we don't have an account_record_id column (e.g.
|
InternalTenantContext |
createInternalTenantContext(java.lang.Long tenantRecordId,
java.lang.Long accountRecordId)
Create an internal tenant callcontext
|
InternalTenantContext |
createInternalTenantContext(java.util.UUID accountId,
InternalTenantContext context) |
InternalTenantContext |
createInternalTenantContext(java.util.UUID objectId,
org.killbill.billing.ObjectType objectType,
org.killbill.billing.util.callcontext.TenantContext context)
Crate an internal tenant callcontext from a tenant callcontext, and retrieving the account_record_id from another table
|
InternalTenantContext |
createInternalTenantContext(java.util.UUID accountId,
org.killbill.billing.util.callcontext.TenantContext context) |
InternalTenantContext |
createInternalTenantContextWithoutAccountRecordId(org.killbill.billing.util.callcontext.TenantContext context)
Create an internal tenant callcontext from a tenant callcontext
This is used for r/o operations - we don't need the account id in that case.
|
org.killbill.billing.util.callcontext.TenantContext |
createTenantContext(InternalTenantContext context) |
java.util.UUID |
getAccountId(java.util.UUID objectId,
org.killbill.billing.ObjectType objectType,
org.killbill.billing.util.callcontext.TenantContext context) |
java.lang.Long |
getRecordIdFromObject(java.util.UUID objectId,
org.killbill.billing.ObjectType objectType,
org.killbill.billing.util.callcontext.TenantContext context) |
public static final java.lang.Long INTERNAL_TENANT_RECORD_ID
public static final java.lang.String MDC_KB_ACCOUNT_RECORD_ID
public static final java.lang.String MDC_KB_TENANT_RECORD_ID
public static final java.lang.String MDC_KB_USER_TOKEN
@Inject
public InternalCallContextFactory(@Nullable
ImmutableAccountInternalApi accountInternalApi,
org.killbill.clock.Clock clock,
NonEntityDao nonEntityDao,
@Nullable
CacheControllerDispatcher cacheControllerDispatcher)
public org.killbill.billing.util.callcontext.TenantContext createTenantContext(InternalTenantContext context)
public org.killbill.billing.util.callcontext.CallContext createCallContext(InternalCallContext context)
public InternalTenantContext createInternalTenantContextWithoutAccountRecordId(org.killbill.billing.util.callcontext.TenantContext context)
context - tenant callcontext (tenantId can be null only if multi-tenancy is disabled)public InternalTenantContext createInternalTenantContext(java.util.UUID accountId, org.killbill.billing.util.callcontext.TenantContext context)
public InternalTenantContext createInternalTenantContext(java.util.UUID accountId, InternalTenantContext context)
public InternalTenantContext createInternalTenantContext(java.util.UUID objectId, org.killbill.billing.ObjectType objectType, org.killbill.billing.util.callcontext.TenantContext context)
objectId - the id of the row in the table pointed by object type where to look for account_record_idobjectType - the object type pointed by this objectIdcontext - original tenant callcontextpublic InternalTenantContext createInternalTenantContext(java.lang.Long tenantRecordId, @Nullable java.lang.Long accountRecordId)
tenantRecordId - tenant_record_id (cannot be null)accountRecordId - account_record_id (cannot be null for INSERT operations)public InternalCallContext createInternalCallContext(java.util.UUID accountId, org.killbill.billing.util.callcontext.CallContext context)
accountId - account idcontext - original call callcontextpublic InternalCallContext createInternalCallContext(java.util.UUID objectId, org.killbill.billing.ObjectType objectType, org.killbill.billing.util.callcontext.CallContext context)
objectId - the id of the row in the table pointed by object type where to look for account_record_idobjectType - the object type pointed by this objectIdcontext - original call callcontextpublic InternalCallContext createInternalCallContext(java.util.UUID objectId, org.killbill.billing.ObjectType objectType, java.lang.String userName, org.killbill.billing.util.callcontext.CallOrigin callOrigin, org.killbill.billing.util.callcontext.UserType userType, @Nullable java.util.UUID userToken, java.lang.Long tenantRecordId)
public InternalCallContext createInternalCallContext(@Nullable java.lang.Long tenantRecordId, @Nullable java.lang.Long accountRecordId, java.lang.String userName, org.killbill.billing.util.callcontext.CallOrigin callOrigin, org.killbill.billing.util.callcontext.UserType userType, @Nullable java.util.UUID userToken)
tenantRecordId - tenant record id - if null, the default tenant record id value will be usedaccountRecordId - account record id (can be null in specific use-cases, e.g. config change events in BeatrixListener)userName - user namecallOrigin - call originuserType - user typeuserToken - user token, if anypublic InternalCallContext createInternalCallContextWithoutAccountRecordId(org.killbill.billing.util.callcontext.CallContext context)
context - original call callcontextpublic InternalCallContext createInternalCallContext(java.lang.Long accountRecordId, InternalCallContext context)
public InternalCallContext createInternalCallContext(TimeZoneAwareEntity accountModelDao, java.lang.Long accountRecordId, InternalCallContext context)
public InternalCallContext createInternalCallContext(org.joda.time.DateTimeZone fixedOffsetTimeZone, org.joda.time.DateTime referenceTime, java.lang.Long accountRecordId, InternalCallContext context)
public java.util.UUID getAccountId(java.util.UUID objectId,
org.killbill.billing.ObjectType objectType,
org.killbill.billing.util.callcontext.TenantContext context)
public java.lang.Long getRecordIdFromObject(java.util.UUID objectId,
org.killbill.billing.ObjectType objectType,
org.killbill.billing.util.callcontext.TenantContext context)
Copyright © 2010-2020. All Rights Reserved.