public class CatalogContextImpl extends AbstractContextImpl implements CatalogContext
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
SER_VALUE_SEP
CATALOG_ID, CONTEXT_NAME, MASTER_CATALOG
Constructor and Description |
---|
CatalogContextImpl()
This is the default constructor for this class and it invokes the super.
|
Modifier and Type | Method and Description |
---|---|
void |
clearContext()
Clears the attributes defined for the context.
|
void |
copyContext(Context ctx)
Copies the the attributes of the catalog context from another catalog context.
|
java.lang.String |
getCatalogID()
This method gets the unique ID of the catalog in context.
|
java.lang.Object[] |
getContextAttributes()
Return the attributes defined by the context.
|
java.lang.String |
getContextName()
Gets the name of the context.
|
java.lang.String |
getOwnerID()
This method will return the catalog owner ID of the catalog in context.
|
void |
initializeContext(com.ibm.commerce.component.contextservice.ActivityData initData)
This method initializes the context value.
|
boolean |
isEntitlementCheckAlwaysEnforced()
Check if the entitlement check is always enforced.
|
boolean |
isMasterCatalog()
Check if this is the master catalog.
|
void |
preInvokeContext(com.ibm.commerce.component.contextservice.ActivityData sessionData)
This method updates this context based on the given session data.
|
void |
setCatalogID(java.lang.String id)
This method sets the unique ID of the catalog in context.
|
void |
setContextAttributes(java.lang.String[] ctxAttrs)
Set the attributes for this context.
|
void |
setMasterCatalog(boolean isMaster)
Sets the master catalog flag.
|
void |
setOwnerID(java.lang.String id)
This method will set the catalog owner ID of the catalog in context.
|
boolean |
validate()
Performs validation of context attributes.
|
clear, getActivityToken, getContextSerializedString, initialize, initialize, initializeContext, isDirty, postInvoke, postInvokeContext, preInvoke, recalibrate, recalibrateContext, reset, resetContext, setContextSerializedString, setDirty, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getActivityToken
public static final java.lang.String COPYRIGHT
public CatalogContextImpl()
public java.lang.String getCatalogID()
getCatalogID
in interface CatalogContext
public void setCatalogID(java.lang.String id)
setCatalogID
in interface CatalogContext
id
- Sets the unique ID of the catalog in context.public void initializeContext(com.ibm.commerce.component.contextservice.ActivityData initData) throws BusinessContextException
initializeContext
in class AbstractContextImpl
initData
- Initial data for context.BusinessContextException
- Exception detected by the business context service.AbstractContextImpl.initializeContext(ActivityData)
public void preInvokeContext(com.ibm.commerce.component.contextservice.ActivityData sessionData) throws BusinessContextException
startRequest()
method of the business context service
before request execution.
preInvokeContext
in class AbstractContextImpl
sessionData
- the map of name-value pairs for the parameters that are passed in the requestBusinessContextException
- Exception detected during business context processing.AbstractContextImpl.preInvokeContext(com.ibm.commerce.component.contextservice.ActivityData)
public java.lang.Object[] getContextAttributes() throws BusinessContextException
getContextAttributes
in class AbstractContextImpl
BusinessContextException
- Exception detected during processing.AbstractContextImpl.getContextAttributes()
public void setContextAttributes(java.lang.String[] ctxAttrs) throws BusinessContextException
setContextAttributes
in class AbstractContextImpl
ctxAttrs
- given array of context attributesBusinessContextException
- Exception detected during processing.AbstractContextImpl.setContextAttributes(java.lang.String[])
public void clearContext()
clearContext
in class AbstractContextImpl
BusinessContextException
- Exception detected during processing.AbstractContextImpl.clearContext()
public java.lang.String getContextName()
getContextName
in interface Context
BusinessContextException
- Exception detected during processing.Context.getContextName()
public boolean validate() throws BusinessContextException
validate
in interface Context
true
if all the attributes are validBusinessContextException
- Exception detected during processing.Context.validate()
public void copyContext(Context ctx)
copyContext
in interface Context
ctx
- the context to copy fromBusinessContextException
- Exception detected during processing.Context.copyContext(com.ibm.commerce.context.base.Context)
public java.lang.String getOwnerID()
getOwnerID
in interface CatalogContext
public void setOwnerID(java.lang.String id)
setOwnerID
in interface CatalogContext
id
- the owner ID to set.public boolean isMasterCatalog()
isMasterCatalog
in interface CatalogContext
public void setMasterCatalog(boolean isMaster)
setMasterCatalog
in interface CatalogContext
isMaster
- True if this is the master catalog.public boolean isEntitlementCheckAlwaysEnforced()
isEntitlementCheckAlwaysEnforced
in interface CatalogContext