public class EMarketingSpotResourceManager
extends com.ibm.commerce.context.content.resources.AbstractEntityBeanResourceManagerImpl
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
static java.lang.String |
INVALIDATED_ENTRY_FLAG
The value in a map to indicate that an entry has been invalidated
|
CONTENT_CANCEL, CONTENT_DELETE, CONTENT_NEW, CONTENT_PROMOTE, CONTENT_UPDATE, RESOURCE_COMMIT, RESOURCE_DELETE, RESOURCE_NEW, RESOURCE_ROLLBACK, RESOURCE_UPDATE, STRING_CONTENT_DELETE, STRING_CONTENT_NEW, STRING_CONTENT_UPDATE
Constructor and Description |
---|
EMarketingSpotResourceManager() |
Modifier and Type | Method and Description |
---|---|
void |
commit(com.ibm.commerce.context.content.events.ContentData contentData)
This method commits the changes in the workspace to the base edition.
|
com.ibm.commerce.context.content.resources.ManagedResourceKey |
getManagedResourceKey(java.util.Map boKeyMap)
Returns the business object key.
|
com.ibm.commerce.context.content.resources.ManagedResourceKey |
getManagedResourceKey(java.lang.Object resource)
Returns the business object key.
|
java.util.Map |
handleUniqueIndexViolations(com.ibm.commerce.context.content.events.ContentData contentData)
This method will compare UI conflicts within the EMSPOT table
in the workspace and will modify them based on action from configuration.
|
static void |
invalidate(java.sql.Connection productionConnection,
java.lang.String baseCacheInvalidationKey,
java.lang.String marketingCacheInvalidationKey,
java.lang.String dataId)
This method invalidates cached marketing information.
|
static void |
issueEMarketingSpotNameInvalidations(java.util.Map<java.lang.String,java.lang.String> invalidatedEMarketingSpotEntries,
com.ibm.commerce.context.content.events.ContentData contentData,
java.sql.Connection authoringConnection,
java.sql.Connection productionConnection)
This method will invalidate individual entries in the base cache
related to e-Marketing Spots.
|
void |
issueInvalidations(com.ibm.commerce.context.content.events.ContentData contentData,
boolean setupProductionInvalidations)
This method will invalidate individual entries
related to e-Marketing Spot changes made in a workspace.
|
static void |
issueInvalidationsBasedOnMarketingContent(java.util.Map contentEntries,
com.ibm.commerce.context.content.events.ContentData contentData,
java.sql.Connection authoringConnection,
java.sql.Connection productionConnection)
This method will invalidate individual entries in the base and marketing caches
related to content changes made in a workspace.
|
java.lang.String |
postPublish(com.ibm.commerce.context.content.events.ContentData contentData)
This method will setup invalidations on the production environment
for individual entries in the base dynacache and marketing distributed map
related to e-Marketing Spot changes made in a workspace.
|
void |
processPostPublishData(java.lang.String postPublishData)
Process the post-publish data on production server.
|
void |
rollback(com.ibm.commerce.context.content.events.ContentData contentData)
This method rolls back the workspace by undoing all changes.
|
static java.util.List |
setupInvalidation(java.sql.Connection authoringConnection,
java.sql.Connection productionConnection,
com.ibm.commerce.context.content.events.ContentData contentData,
java.lang.String tableName,
java.lang.String primaryKeyColumnName,
java.lang.String baseCacheInvalidationKey,
java.lang.String marketingCacheInvalidationKey,
java.lang.String uniqueIdentifierColumnName,
java.lang.String uniqueIdentifierInvalidationKey,
java.util.Map invalidatedEntries,
java.lang.String customSql)
This method will query the authoring database to get the changes made in the workspace
for the specified table.
|
createManagedResource, deleteManagedResource, deleteRelatedManagedResources, fetchUniqueIndexViolations, getLockData, getLockData, getManagedResourceData, getManagedResourceDataCount, getMetaData, getResourceContainer, handleForeignKeyViolations, handleUniqueIndexViolations, isLocked, isLocked, lockManagedResource, publish, relockManagedResource, setMetaData, setResourceContainer, synchronize, unlockManagedResource, updateManagedResource
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createManagedResource, deleteManagedResource, getLockData, getLockData, getManagedResourceData, getManagedResourceDataCount, getMetaData, getResourceContainer, isLocked, isLocked, lockManagedResource, publish, relockManagedResource, setMetaData, setResourceContainer, synchronize, unlockManagedResource, updateManagedResource
public static final java.lang.String COPYRIGHT
public static final java.lang.String INVALIDATED_ENTRY_FLAG
public void commit(com.ibm.commerce.context.content.events.ContentData contentData) throws com.ibm.commerce.context.content.resources.exception.ResourceException
commit
in interface com.ibm.commerce.context.content.resources.ResourceManager
commit
in class com.ibm.commerce.context.content.resources.AbstractResourceManagerImpl
contentData
- The content data to commit.ResourceUpdateException
- This is thrown when there is a problem performing the commit operation.
This usually occurs when the commit causes data integrity problems.com.ibm.commerce.context.content.resources.exception.ResourceException
ResourceManager.commit(com.ibm.commerce.context.content.events.ContentData)
public com.ibm.commerce.context.content.resources.ManagedResourceKey getManagedResourceKey(java.util.Map boKeyMap) throws java.lang.Exception
boKeyMap
- A map that represents the business object.java.lang.Exception
- - Problem when resolving the managed resource key.public com.ibm.commerce.context.content.resources.ManagedResourceKey getManagedResourceKey(java.lang.Object resource) throws java.lang.Exception
resource
- The business object access bean.java.lang.Exception
- - Problem when resolving the managed resource key.public java.util.Map handleUniqueIndexViolations(com.ibm.commerce.context.content.events.ContentData contentData) throws com.ibm.commerce.context.content.resources.exception.ResourceException
handleUniqueIndexViolations
in class com.ibm.commerce.context.content.resources.AbstractResourceManagerImpl
contentData
- The content data of workspace/task group/task to check for UI violations.com.ibm.commerce.context.content.resources.exception.ResourceException
- This is thrown when there is a problem performing the primary key delete/update operation.com.ibm.commerce.context.content.resources.ResourceManager#
public static void invalidate(java.sql.Connection productionConnection, java.lang.String baseCacheInvalidationKey, java.lang.String marketingCacheInvalidationKey, java.lang.String dataId) throws java.sql.SQLException
productionConnection
parameter is not null,
then a row is inserted in the CACHEIVL database table on the production database.
That will allow the cached entry to be invalidated when the DynaCacheInvalidation
scheduled job runs on the production database.
If the productionConnection
parameter is null, then invalidations
are issued to the local base dynacache and marketing distributed maps.
An invalidation is issued against the base cache when the baseCacheInvalidationKey
parameter is specified. The invalidation will have the format baseCacheInvalidationKey:dataId
when dataId is specified, otherwise the invalidation will be baseCacheInvalidationKey.
An invalidation is issued against the marketing cache when the marketingCacheInvalidationKey
parameter is specified. The invalidation will have the format marketingCacheInvalidationKey:dataId
when dataId is specified, otherwise the invalidation will be marketingCacheInvalidationKey.productionConnection
- The connection to the production database. Provide a value to
create entries in the production environment CACHEIVL database table. Set to null to
issue invalidations in the authoring environment.baseCacheInvalidationKey
- The text to use for invalidation against the base cache.marketingCacheInvalidationKey
- The text to use for invalidation against the marketing cache.dataId
- The ID of the object for which to issue the invalidation.java.sql.SQLException
public static void issueEMarketingSpotNameInvalidations(java.util.Map<java.lang.String,java.lang.String> invalidatedEMarketingSpotEntries, com.ibm.commerce.context.content.events.ContentData contentData, java.sql.Connection authoringConnection, java.sql.Connection productionConnection) throws com.ibm.commerce.context.content.resources.exception.ResourceException
invalidatedEMarketingSpotEntries
- A map where the keys are e-Marketing Spot IDs.contentData
- The content data.authoringConnection
- The connection to the authoring database.productionConnection
- The connection to the production database.com.ibm.commerce.context.content.resources.exception.ResourceException
- A problem occurs in the invalidation processing.public void issueInvalidations(com.ibm.commerce.context.content.events.ContentData contentData, boolean setupProductionInvalidations) throws com.ibm.commerce.context.content.resources.exception.ResourceException
contentData
- The content data.setupProductionInvalidations
- If this is true, then the CACHEIVL entries will be created
on the production database. This is used for a Quick Publish. If this parameter if false,
then the local dynacache base cache and distributed map invalidations will be issued.com.ibm.commerce.context.content.resources.exception.ResourceException
- A problem occurs in the invalidation processing.public static void issueInvalidationsBasedOnMarketingContent(java.util.Map contentEntries, com.ibm.commerce.context.content.events.ContentData contentData, java.sql.Connection authoringConnection, java.sql.Connection productionConnection) throws com.ibm.commerce.context.content.resources.exception.ResourceException
contentEntries
- A map where the keys are the collateral IDs associated with the changed content.contentData
- The content data.authoringConnection
- The connection to the authoring database.productionConnection
- The connection to the production database.com.ibm.commerce.context.content.resources.exception.ResourceException
- A problem occurs in the invalidation processing.public java.lang.String postPublish(com.ibm.commerce.context.content.events.ContentData contentData) throws com.ibm.commerce.context.content.resources.exception.ResourceException
postPublish
in interface com.ibm.commerce.context.content.resources.ResourceManager
postPublish
in class com.ibm.commerce.context.content.resources.AbstractResourceManagerImpl
contentData
- The content data.com.ibm.commerce.context.content.resources.exception.ResourceException
- A problem occurs in the post-publish event processing.public void processPostPublishData(java.lang.String postPublishData) throws com.ibm.commerce.exception.ECException
processPostPublishData
in interface com.ibm.commerce.context.content.resources.postpublish.PostPublishDataProcessor
processPostPublishData
in class com.ibm.commerce.context.content.resources.AbstractResourceManagerImpl
postPublishData
- the post-publish data to be processed.com.ibm.commerce.exception.ECException
- an exception may be thrown when processing the data.public void rollback(com.ibm.commerce.context.content.events.ContentData contentData) throws com.ibm.commerce.context.content.resources.exception.ResourceException
issueInvalidations
to issue invalidations
to the base dynacache (if enabled) and the marketing distributed map in the authoring environment.rollback
in interface com.ibm.commerce.context.content.resources.ResourceManager
rollback
in class com.ibm.commerce.context.content.resources.AbstractResourceManagerImpl
contentData
- The content data to commit.com.ibm.commerce.context.content.resources.exception.ResourceException
- This is thrown when there is a problem performing the rollback.ResourceManager.rollback(com.ibm.commerce.context.content.events.ContentData)
public static java.util.List setupInvalidation(java.sql.Connection authoringConnection, java.sql.Connection productionConnection, com.ibm.commerce.context.content.events.ContentData contentData, java.lang.String tableName, java.lang.String primaryKeyColumnName, java.lang.String baseCacheInvalidationKey, java.lang.String marketingCacheInvalidationKey, java.lang.String uniqueIdentifierColumnName, java.lang.String uniqueIdentifierInvalidationKey, java.util.Map invalidatedEntries, java.lang.String customSql) throws java.sql.SQLException
authoringConnection
- The connection to the authoring database.productionConnection
- The connection to the production database.contentData
- The content data.tableName
- The name of the database table for which to get workspace changes.primaryKeyColumnName
- The column associated with the primary key of the database table.baseCacheInvalidationKey
- The text to use for invalidation against the base cache.marketingCacheInvalidationKey
- The text to use for invalidation against the marketing cache.uniqueIdentifierColumnName
- The column name associated with the unique identifier of the
database table. This is an optional field. This is used by e-Marketing Spots which issue
invalidations based on the e-Marketing Spot name when an e-Marketing Spot is created.
Invalidations for updates and deletions use the e-Marketing Spot ID.uniqueIdentifierInvalidationKey
- The text to use for invalidation against the base cache
when an e-Marketing is created. This is an optional field and should only be specified when
uniqueIdentifierColumnName is specified.invalidatedEntries
- This is a map of the unique IDs of entries that have already been
determined that require invalidation.customSql
- An alternative to passing a single tableName
and
primaryKeyColumnName
, a custom SQL can be provided to query the modified
resources.java.sql.SQLException