public abstract class AbstractResourceManagerImpl extends java.lang.Object implements ResourceManager, PostPublishDataProcessor
Modifier and Type | Field and Description |
---|---|
static java.lang.Character |
CONTENT_CANCEL
This is a constant that represents that the resource has been cancelled.
|
static java.lang.Character |
CONTENT_DELETE
This is a constant that represents that the resource has been deleted.
|
static java.lang.Character |
CONTENT_NEW
This is a constant that represents that the resource is new.
|
static java.lang.Character |
CONTENT_PROMOTE
This is a constant that represents that the resource has been promoted.
|
static java.lang.Character |
CONTENT_UPDATE
This is a constant that represents that the resource has been updated.
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
static char |
RESOURCE_COMMIT
This is a constant that represents that the resource has been promoted.
|
static char |
RESOURCE_DELETE
This is a constant that represents that the resource has been deleted.
|
static char |
RESOURCE_NEW
This is a constant that represents that the resource is new.
|
static char |
RESOURCE_ROLLBACK
This is a constant that represents that the resource has been canceled.
|
static char |
RESOURCE_UPDATE
This is a constant that represents that the resource has been updated.
|
static java.lang.String |
STRING_CONTENT_DELETE
This is a
String version of the corresponding constant. |
static java.lang.String |
STRING_CONTENT_NEW
This is a
String version of the corresponding constant. |
static java.lang.String |
STRING_CONTENT_UPDATE
This is a
String version of the corresponding constant. |
Constructor and Description |
---|
AbstractResourceManagerImpl()
This is the default constructor for this class.
|
Modifier and Type | Method and Description |
---|---|
void |
commit(ContentData contentData)
This method commits the changes in the workspace to the base edition.
|
java.lang.Object |
createManagedResource(ActivityToken activityToken,
java.lang.Object creationData)
This method creates a new instance of the resource.
|
void |
deleteManagedResource(ActivityToken activityToken,
java.lang.Object resource)
This method deletes the current instance of the resource with the new current changes.
|
void |
deleteRelatedManagedResources(ActivityToken activityToken,
java.lang.Object relatedResource)
This method deletes all the resources that has a relation to the resource for the given
content context.
|
java.util.Map |
fetchUniqueIndexViolations(ContentData contentData,
int action)
This method when enabled for a resource manager will compare UI conflicts for
resources in the workspace and return in a map.
|
LockData |
getLockData(ManagedResourceKey managedResourceKey)
This method returns the lock information for the specified business object.
|
LockData[] |
getLockData(ManagedResourceKey[] managedResourceKey)
This method returns the lock information for the specified business objects.
|
java.util.List<LockData> |
getManagedResourceData(java.lang.String taskGroupId,
char filter)
This method returns the list of all locks for objects of this resource manager associated to the
provided workspace task group id.
|
int |
getManagedResourceDataCount(java.lang.String taskGroupId)
This method returns the count of all objects currently modified in the specified context of the
taskgroup.
|
ManagedResourceMetaData |
getMetaData()
This method returns the metadata for the current resource manager.
|
ResourceContainer |
getResourceContainer()
This method returns the resource container associated to the resource manager.
|
java.util.List |
handleForeignKeyViolations(ContentData contentData,
int action)
This method when enabled for a resource manager will compare UI conflicts for
resources in the workspace and will modify them based on action provided as parameter.
|
java.util.Map |
handleUniqueIndexViolations(ContentData contentData)
This method when enabled for a resource manager will compare UI conflicts for
resources in the workspace and will modify them based on action from configuration.
|
java.util.Map |
handleUniqueIndexViolations(ContentData contentData,
int action)
This method when enabled for a resource manager will compare UI conflicts for
resources in the workspace and will modify them based on action provided as parameter.
|
boolean |
isLocked(ActivityToken activityToken,
ManagedResourceKey managedResourceKey)
This method returns whether the specified business object is locked and cannot be
modified by the current activity.
|
boolean[] |
isLocked(ActivityToken activityToken,
ManagedResourceKey[] managedResourceKey)
This method returns whether the specified business objects are locked and cannot be
modified by the current activity.
|
void |
lockManagedResource(ActivityToken activityToken,
ManagedResourceKey managedResourceKey)
This method locks the specified business object based on the current activity information.
|
java.lang.String |
postPublish(ContentData contentData)
This method processes a post-publish event.
|
void |
processPostPublishData(java.lang.String postPublishData)
This method processes post-publish data on production server.
|
void |
publish(ContentData contentData,
ContentPublisher publisher)
This method publishes the resource manager.
|
void |
relockManagedResource(ActivityToken activityToken,
ManagedResourceKey managedResourceKey)
This method updates the lock information for the specified business object.
|
void |
rollback(ContentData contentData)
This method rolls back the workspace by undoing all changes.
|
void |
setMetaData(ManagedResourceMetaData managedResourceMetaData)
This method sets the resource manager metadata that contains the configuration
information for the resource manager.
|
void |
setResourceContainer(ResourceContainer container)
This method sets the associated resource container.
|
void |
synchronize(ContentData contentData)
This method synchronizes the specified workspace.
|
void |
unlockManagedResource(ActivityToken activityToken,
ManagedResourceKey managedResourceKey)
This method unlocks the business object.
|
void |
updateManagedResource(ActivityToken activityToken,
java.lang.Object resource)
This method updates the current instance of the resource with the current changes.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getManagedResourceKey, getManagedResourceKey
public static final java.lang.String COPYRIGHT
public static final char RESOURCE_NEW
public static final char RESOURCE_UPDATE
public static final char RESOURCE_DELETE
public static final char RESOURCE_COMMIT
public static final char RESOURCE_ROLLBACK
public static final java.lang.Character CONTENT_NEW
public static final java.lang.Character CONTENT_UPDATE
public static final java.lang.Character CONTENT_DELETE
public static final java.lang.Character CONTENT_PROMOTE
public static final java.lang.Character CONTENT_CANCEL
public static final java.lang.String STRING_CONTENT_NEW
String
version of the corresponding constant.public static final java.lang.String STRING_CONTENT_UPDATE
String
version of the corresponding constant.public static final java.lang.String STRING_CONTENT_DELETE
String
version of the corresponding constant.public AbstractResourceManagerImpl()
public void setMetaData(ManagedResourceMetaData managedResourceMetaData)
setMetaData
in interface ResourceManager
managedResourceMetaData
- The resource manager metadata.public ManagedResourceMetaData getMetaData()
getMetaData
in interface ResourceManager
public ResourceContainer getResourceContainer()
getResourceContainer
in interface ResourceManager
public void setResourceContainer(ResourceContainer container)
setResourceContainer
in interface ResourceManager
container
- The resource container.public void deleteRelatedManagedResources(ActivityToken activityToken, java.lang.Object relatedResource) throws ResourceException
activityToken
- The current activity.relatedResource
- The related resource.ResourceException
- This is thrown if a problem occurs when deleting the child resources.public void lockManagedResource(ActivityToken activityToken, ManagedResourceKey managedResourceKey) throws ResourceException
lockManagedResource
in interface ResourceManager
activityToken
- The current activity.managedResourceKey
- The business object to lock.ResourceException
- This is thrown if the resource is already locked by another activity.public void unlockManagedResource(ActivityToken activityToken, ManagedResourceKey managedResourceKey) throws ResourceException
unlockManagedResource
in interface ResourceManager
activityToken
- The current activitymanagedResourceKey
- The business object.ResourceException
- This is thrown if there is a problem performing the unlock.public void relockManagedResource(ActivityToken activityToken, ManagedResourceKey managedResourceKey) throws ResourceException
relockManagedResource
in interface ResourceManager
activityToken
- The current activity.managedResourceKey
- The business object.ResourceException
- This is thrown if there is a problem performing the relock.public boolean isLocked(ActivityToken activityToken, ManagedResourceKey managedResourceKey) throws ResourceException
isLocked
in interface ResourceManager
activityToken
- The current activity.managedResourceKey
- The business object.ResourceException
- This is thrown if there is a problem performing the is lock query.public LockData getLockData(ManagedResourceKey managedResourceKey) throws ResourceException
getLockData
in interface ResourceManager
managedResourceKey
- The business object.ResourceException
- This is thrown if there is a problem retrieving the lock data.public boolean[] isLocked(ActivityToken activityToken, ManagedResourceKey[] managedResourceKey) throws ResourceException
isLocked
in interface ResourceManager
activityToken
- The current activity.managedResourceKey
- The business objects to check.ResourceException
- This is thrown if there is a problem performing the lock check for all managed resources.public LockData[] getLockData(ManagedResourceKey[] managedResourceKey) throws ResourceException
getLockData
in interface ResourceManager
managedResourceKey
- The business objects.ResourceException
- This is thrown if there is a problem getting the lock data for the managed resources.public java.lang.Object createManagedResource(ActivityToken activityToken, java.lang.Object creationData) throws ResourceException
createManagedResource
in interface ResourceManager
activityToken
- The current activity.creationData
- The data needed to create the object.ResourceException
- This is thrown when a problem occurs creating the resource.public void updateManagedResource(ActivityToken activityToken, java.lang.Object resource) throws ResourceException
updateManagedResource
in interface ResourceManager
activityToken
- The current activity.resource
- The resource to update.ResourceException
- This is thrown when a problem occurs updating the resource.public void deleteManagedResource(ActivityToken activityToken, java.lang.Object resource) throws ResourceException
deleteManagedResource
in interface ResourceManager
activityToken
- The current activity.resource
- The resource to delete.ResourceException
- This is thrown when a problem occurs deleting the resource.public void commit(ContentData contentData) throws ResourceException
commit
in interface ResourceManager
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.ResourceException
- A problem performing the commit operation.
Mostly this occurs when the commit causes data integrity problems.ResourceManager.commit(com.ibm.commerce.context.content.events.ContentData)
public void rollback(ContentData contentData) throws ResourceException
rollback
in interface ResourceManager
contentData
- The content data to commit.ResourceUpdateException
- This is thrown when there is a problem performing the rollback.ResourceException
- This is thrown if a problem occurs when performing the rollback.ResourceManager.rollback(com.ibm.commerce.context.content.events.ContentData)
public void publish(ContentData contentData, ContentPublisher publisher) throws ResourceException
publish
in interface ResourceManager
contentData
- The publishing content data information.publisher
- The publisher.ResourceException
public void synchronize(ContentData contentData) throws ResourceException
synchronize
in interface ResourceManager
contentData
- The content data to synchronize. This data will not
include the task and task group because the entire workspace needs to be
synchronized.ResourceException
- This is thrown when there is a problem performing the commit operation.
This usually occurs when the commit causes data integrity problems.public java.lang.String postPublish(ContentData contentData) throws ResourceException
postPublish
in interface ResourceManager
contentData
- The content data.ResourceException
- This is thrown when a problem occurs in the post-publish event processing.public void processPostPublishData(java.lang.String postPublishData) throws ECException
processPostPublishData
in interface PostPublishDataProcessor
postPublishData
- The post-publish data to be processed.ECException
- This is thrown when a problem occurs when processing the data.public java.util.List<LockData> getManagedResourceData(java.lang.String taskGroupId, char filter) throws ResourceException
getManagedResourceData
in interface ResourceManager
taskGroupId
- the task group identifier to retrieve the list of locks for.filter
- the filter on data to retrieve.ResourceException
- This is thrown if a problem occurs when retrieving the lock data.public int getManagedResourceDataCount(java.lang.String taskGroupId) throws ResourceException
getManagedResourceDataCount
in interface ResourceManager
taskGroupId
- the task group identifier to retrieve the list of locks for.ResourceException
- This is thrown if a problem occurs when retrieving the lock data.public java.util.Map handleUniqueIndexViolations(ContentData contentData) throws ResourceException
contentData
- The content data of workspace/task group/task to check for UI violations.ResourceException
- This is thrown when there is a problem performing the commit operation.com.ibm.commerce.context.content.resources.ResourceManager#
public java.util.Map handleUniqueIndexViolations(ContentData contentData, int action) throws ResourceException
contentData
- The content data of workspace/task group/task to check for UI violations.action
- Parameter to specify the action to be performed when a unique index
violation is detected on an asset.ResourceException
- This is thrown when there is a problem performing the commit operation.com.ibm.commerce.context.content.resources.ResourceManager#
public java.util.Map fetchUniqueIndexViolations(ContentData contentData, int action) throws ResourceException
contentData
- The content data of workspace/task group/task to check for UI violations.action
- Parameter to specify the action to be performed when a unique index
violation is detected on an asset.ResourceException
- This is thrown when there is a problem performing the commit operation.com.ibm.commerce.context.content.resources.ResourceManager#
public java.util.List handleForeignKeyViolations(ContentData contentData, int action) throws ResourceException
contentData
- The content data of workspace/task group/task to check for UI violations.action
- Parameter to specify the action to be performed when a unique index
violation is detected on an asset.ResourceException
- This is thrown when there is a problem performing the commit operation.com.ibm.commerce.context.content.resources.ResourceManager#