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.
|
protected static java.lang.String[] | NONPUBLISH_COLUMNS
This represents the non-published columns.
|
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 |
---|---|
protected void | auditActionOnManagedResource(ActivityToken activityToken, java.lang.Object resource, java.lang.String action)
This method audits the action of the managed resource.
|
protected boolean | canCurrentActivityModifyResource(ActivityToken activityToken, ManagedResourceKey managedResourceKey, java.lang.String action)
This method indicates whether another activity has modified the managed resource by calling the isLocked(ActivityToken, ManagedResourceKey) method.
|
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.
|
protected abstract java.lang.Object | createResource(java.lang.Object resource)
This method creates the specified resource by persisting the resource data.
|
protected java.lang.Object | createResourceInWorkspace(ContentContext context, java.lang.Object createData)
This method creates the resource in the workspace.
|
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.
|
protected abstract void | deleteResource(java.lang.Object resource)
This method deletes the specified resource by removing the resource data from the persistent store.
|
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.
|
protected abstract java.lang.Object | getManagedResource(java.lang.Object managedResource)
This method returns the object that represents the managed resource key.
|
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.
|
protected java.lang.Object[] | getRelatedResources(java.lang.Object relatedResource)
This method returns the resources for the current resource manager that are related to the specified resource.
|
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.
|
protected boolean | isApproveForeignKeyViolationActionEnabled()
This method determines whether merge unique index violations are enabled for this resource.
|
protected boolean | isApproveUniqueIndexViolationActionEnabled()
This method determines whether approve unique index violations are enabled for this resource.
|
protected boolean | isDuplicateKeyException(java.sql.SQLException sqlException)
This method returns where the SQL Exception represents a duplicate key exception.
|
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.
|
protected void | lockManagedResource(ActivityToken activityToken, ManagedResourceKey managedResourceKey, java.lang.String action)
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.
|
protected abstract void | updateResource(java.lang.Object resource)
This method updates the specified resource by persisting the resource data.
|
protected void | updateResourceInWorkspace(ContentContext context, java.lang.Object resource, java.lang.String action)
This method updates or deletes the record in the workspace tables.
|
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
public static final java.lang.String STRING_CONTENT_UPDATE
public static final java.lang.String STRING_CONTENT_DELETE
protected static final java.lang.String[] NONPUBLISH_COLUMNS
public AbstractResourceManagerImpl()
public void setMetaData(ManagedResourceMetaData managedResourceMetaData)
public ManagedResourceMetaData getMetaData()
public ResourceContainer getResourceContainer()
public void setResourceContainer(ResourceContainer container)
protected boolean canCurrentActivityModifyResource(ActivityToken activityToken, ManagedResourceKey managedResourceKey, java.lang.String action) throws ResourceException
protected void auditActionOnManagedResource(ActivityToken activityToken, java.lang.Object resource, java.lang.String action) throws ResourceException
public void deleteRelatedManagedResources(ActivityToken activityToken, java.lang.Object relatedResource) throws ResourceException
public void lockManagedResource(ActivityToken activityToken, ManagedResourceKey managedResourceKey) throws ResourceException
protected void lockManagedResource(ActivityToken activityToken, ManagedResourceKey managedResourceKey, java.lang.String action) throws ResourceException
public void unlockManagedResource(ActivityToken activityToken, ManagedResourceKey managedResourceKey) throws ResourceException
public void relockManagedResource(ActivityToken activityToken, ManagedResourceKey managedResourceKey) throws ResourceException
public boolean isLocked(ActivityToken activityToken, ManagedResourceKey managedResourceKey) throws ResourceException
public LockData getLockData(ManagedResourceKey managedResourceKey) throws ResourceException
public boolean[] isLocked(ActivityToken activityToken, ManagedResourceKey[] managedResourceKey) throws ResourceException
public LockData[] getLockData(ManagedResourceKey[] managedResourceKey) throws ResourceException
protected boolean isDuplicateKeyException(java.sql.SQLException sqlException)
public java.lang.Object createManagedResource(ActivityToken activityToken, java.lang.Object creationData) throws ResourceException
public void updateManagedResource(ActivityToken activityToken, java.lang.Object resource) throws ResourceException
public void deleteManagedResource(ActivityToken activityToken, java.lang.Object resource) throws ResourceException
protected void updateResourceInWorkspace(ContentContext context, java.lang.Object resource, java.lang.String action) throws java.lang.Exception
protected java.lang.Object createResourceInWorkspace(ContentContext context, java.lang.Object createData) throws java.lang.Exception
protected java.lang.Object[] getRelatedResources(java.lang.Object relatedResource) throws java.lang.Exception
protected abstract java.lang.Object getManagedResource(java.lang.Object managedResource) throws java.lang.Exception
protected abstract java.lang.Object createResource(java.lang.Object resource) throws javax.ejb.DuplicateKeyException, java.lang.Exception
protected abstract void updateResource(java.lang.Object resource) throws java.lang.Exception
protected abstract void deleteResource(java.lang.Object resource) throws java.lang.Exception
public void commit(ContentData contentData) throws ResourceException
public void rollback(ContentData contentData) throws ResourceException
public void publish(ContentData contentData, ContentPublisher publisher) throws ResourceException
public void synchronize(ContentData contentData) throws ResourceException
public java.lang.String postPublish(ContentData contentData) throws ResourceException
public void processPostPublishData(java.lang.String postPublishData) throws ECException
public java.util.List<LockData> getManagedResourceData(java.lang.String taskGroupId, char filter) throws ResourceException
public int getManagedResourceDataCount(java.lang.String taskGroupId) throws ResourceException
public java.util.Map handleUniqueIndexViolations(ContentData contentData) throws ResourceException
public java.util.Map handleUniqueIndexViolations(ContentData contentData, int action) throws ResourceException
public java.util.Map fetchUniqueIndexViolations(ContentData contentData, int action) throws ResourceException
public java.util.List handleForeignKeyViolations(ContentData contentData, int action) throws ResourceException
protected boolean isApproveUniqueIndexViolationActionEnabled()
protected boolean isApproveForeignKeyViolationActionEnabled()