public class ContextRequest extends Object
X-Context-Request
header. This header value is expressed as a json string and conversion is generally performed
automatically by Spring in any MVC Controller implementations using the
ContextRequestConverter
and included inside of ContextInfo
by
ContextInfoHandlerMethodArgumentResolver
. Therefore, you can simply include ContextInfo
as a parameter to method in your request mapping method Spring will construct a valid instance
for you.Constructor and Description |
---|
ContextRequest() |
ContextRequest(ContextRequest contextRequest)
Create a copy of an existing ContextRequest.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
Application |
getApplication()
Context instance of the Application entity related to this applicationId.
|
String |
getApplicationId()
A multitenant concept, the id for the current application.
|
Catalog |
getCatalog()
Context instance of the Catalog entity related to this catalogId.
|
InheritanceLines |
getCatalogHierarchy()
Each level within the explicit catalog hierarchy made from resolving a catalog via the
catalogId . |
String |
getCatalogId()
A multitenant concept, the id for the current catalog.
|
Long |
getCatalogLevel()
If the
catalogId is set, catalogLevel represents the sorting level of that catalog
in the overall hierarchy. |
ChangeContainer |
getChangeContainer()
Metadata used to populate any
ChangeEvent created from this request. |
String |
getCustomerContextId()
Returns the customer context id that is used to discriminate entities with
TrackableBehavior.CUSTOMER_CONTEXT . |
String |
getSandboxId()
The id for the current user sandbox.
|
String |
getSandboxName()
The friendly name for the current user sandbox.
|
String |
getTenantId()
A multitenant concept, the id for the current tenant.
|
int |
hashCode() |
boolean |
isForceCatalogForFetch()
Whether or not a
getCatalogId() is filtered on during a fetch
operation. |
void |
setApplication(Application application)
Context instance of the Application entity related to this applicationId.
|
void |
setApplicationId(String applicationId)
A multitenant concept, the id for the current application.
|
void |
setCatalog(Catalog catalog)
Context instance of the Catalog entity related to this catalogId.
|
void |
setCatalogHierarchy(InheritanceLines catalogHierarchy)
Each level within the explicit catalog hierarchy made from resolving a catalog via the
catalogId . |
void |
setCatalogId(String catalogId)
A multitenant concept, the id for the current catalog.
|
void |
setCatalogLevel(Long catalogLevel)
If the
catalogId is set, catalogLevel represents the sorting level of that catalog
in the overall hierarchy. |
void |
setChangeContainer(ChangeContainer changeContainer)
Metadata used to populate any
ChangeEvent created from this request. |
void |
setCustomerContextId(String customerContextId)
Returns the customer context id that is used to discriminate entities with
TrackableBehavior.CUSTOMER_CONTEXT . |
void |
setForceCatalogForFetch(boolean forceCatalogForFetch)
Whether or not a
getCatalogId() is filtered on during a fetch
operation. |
void |
setSandboxId(String sandboxId)
The id for the current user sandbox.
|
void |
setSandboxName(String sandboxName)
The friendly name for the current user sandbox.
|
void |
setTenantId(String tenantId)
A multitenant concept, the id for the current tenant.
|
String |
toString() |
ContextRequest |
withApplication(Application application) |
ContextRequest |
withApplicationId(String applicationId) |
ContextRequest |
withCatalog(Catalog catalog) |
ContextRequest |
withCatalogHierarchy(InheritanceLines catalogHierarchy) |
ContextRequest |
withCatalogId(String catalogId) |
ContextRequest |
withCatalogLevel(Long catalogLevel) |
ContextRequest |
withCustomerContextId(String customerContextId) |
ContextRequest |
withSandBoxId(String sandBoxId) |
ContextRequest |
withSandBoxName(String sandBoxName) |
ContextRequest |
withTenantId(String tenantId) |
public ContextRequest(@NonNull ContextRequest contextRequest)
Note that catalog
and application
are not deep copies.
contextRequest
- The ContextRequest to copy from.public ContextRequest()
public ContextRequest withSandBoxName(String sandBoxName)
public ContextRequest withSandBoxId(String sandBoxId)
public ContextRequest withCatalogId(String catalogId)
public ContextRequest withApplicationId(String applicationId)
public ContextRequest withCustomerContextId(String customerContextId)
public ContextRequest withApplication(Application application)
public ContextRequest withCatalog(Catalog catalog)
public ContextRequest withCatalogHierarchy(InheritanceLines catalogHierarchy)
public ContextRequest withCatalogLevel(Long catalogLevel)
public ContextRequest withTenantId(String tenantId)
public String getSandboxId()
public String getSandboxName()
public String getCatalogId()
public boolean isForceCatalogForFetch()
getCatalogId()
is filtered on during a fetch
operation. When false, any catalogs visible to the current application are used to filter
instead. Setting this to true is useful when you want limit results to a specific catalog
visible to the current application, regardless of whether or not the current application has
visibility into more catalogs.getCatalogId()
is filtered on during a fetch
operationpublic String getApplicationId()
public String getTenantId()
public String getCustomerContextId()
TrackableBehavior.CUSTOMER_CONTEXT
.public ChangeContainer getChangeContainer()
ChangeEvent
created from this request.ChangeEvent
created from this requestpublic Application getApplication()
ContextRequestConverter
.public Catalog getCatalog()
ContextRequestHydrator
.public InheritanceLines getCatalogHierarchy()
catalogId
. This can be used to obtain the a list of the contextIds for the deep
catalog tree parents. This is not a value that is generally populated via JSON. Rather, this
variable is generally calculated via lookup of catalog using catalogId in the
ContextRequestHydrator
.catalogId
public Long getCatalogLevel()
catalogId
is set, catalogLevel represents the sorting level of that catalog
in the overall hierarchy. This is not a value that is generally populated via JSON. Rather,
this variable is generally calculated via lookup of application using applicationId in the
ContextRequestHydrator
.public void setSandboxId(String sandboxId)
sandboxId
- The id for the current user sandboxpublic void setSandboxName(String sandboxName)
sandboxName
- The friendly name for the current user sandboxpublic void setCatalogId(String catalogId)
catalogId
- The id for the current catalogpublic void setForceCatalogForFetch(boolean forceCatalogForFetch)
getCatalogId()
is filtered on during a fetch
operation. When false, any catalogs visible to the current application are used to filter
instead. Setting this to true is useful when you want limit results to a specific catalog
visible to the current application, regardless of whether or not the current application has
visibility into more catalogs.forceCatalogForFetch
- Whether or not a getCatalogId()
is
filtered on during a fetch operationpublic void setApplicationId(String applicationId)
applicationId
- The id for the current applicationpublic void setTenantId(String tenantId)
tenantId
- The id for the current tenantpublic void setCustomerContextId(String customerContextId)
TrackableBehavior.CUSTOMER_CONTEXT
.customerContextId
- the customer context idpublic void setChangeContainer(ChangeContainer changeContainer)
ChangeEvent
created from this request.changeContainer
- Metadata used to populate any ChangeEvent
created from this
requestpublic void setApplication(Application application)
ContextRequestConverter
.application
- Context instance of the Application entity related to this applicationIdpublic void setCatalog(Catalog catalog)
ContextRequestHydrator
.catalog
- Context instance of the Catalog entity related to this catalogIdpublic void setCatalogHierarchy(InheritanceLines catalogHierarchy)
catalogId
. This can be used to obtain the a list of the contextIds for the deep
catalog tree parents. This is not a value that is generally populated via JSON. Rather, this
variable is generally calculated via lookup of catalog using catalogId in the
ContextRequestHydrator
.catalogHierarchy
- the deep catalog tree parenting the catalogId
public void setCatalogLevel(Long catalogLevel)
catalogId
is set, catalogLevel represents the sorting level of that catalog
in the overall hierarchy. This is not a value that is generally populated via JSON. Rather,
this variable is generally calculated via lookup of application using applicationId in the
ContextRequestHydrator
.catalogLevel
- Represents the sorting level of that catalog in the overall hierarchyprotected boolean canEqual(Object other)
Copyright © 2021. All rights reserved.