public interface ResourceManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM Copyright.
|
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.
|
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 number of locked objects within the workspace.
|
ManagedResourceKey |
getManagedResourceKey(java.util.Map record)
This method returns the managed resource key.
|
ManagedResourceKey |
getManagedResourceKey(java.lang.Object resource)
This method returns the managed resource key.
|
ManagedResourceMetaData |
getMetaData()
This method returns the metadata of the resource manager.
|
ResourceContainer |
getResourceContainer()
This method returns the resource container owning the resource manager.
|
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 |
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 metadata of the resource manager.
|
void |
setResourceContainer(ResourceContainer resourceContainer)
This method sets the resource container owning the resource manager.
|
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 new current changes.
|
static final java.lang.String COPYRIGHT
ManagedResourceMetaData getMetaData()
void setMetaData(ManagedResourceMetaData managedResourceMetaData)
managedResourceMetaData
- The managed resource metadata.ResourceContainer getResourceContainer()
void setResourceContainer(ResourceContainer resourceContainer)
resourceContainer
- The resource container.java.lang.Object createManagedResource(ActivityToken activityToken, java.lang.Object creationData) throws ResourceException
activityToken
- The current activity.creationData
- The data needed to create the object.ResourceException
- This is thrown when a problem occurs creating the resource.void updateManagedResource(ActivityToken activityToken, java.lang.Object resource) throws ResourceException
activityToken
- The current activity.resource
- The resource to update.ResourceException
- This is thrown when a problem occurs updating the resource.void deleteManagedResource(ActivityToken activityToken, java.lang.Object resource) throws ResourceException
activityToken
- The current activity.resource
- The resource to delete.ResourceException
- This is thrown when a problem occurs deleting the resource.void lockManagedResource(ActivityToken activityToken, ManagedResourceKey managedResourceKey) throws ResourceException
activityToken
- The current activity.managedResourceKey
- The business object to lock.ResourceException
- This is thrown if the resource is already locked by another activity then
the exception will be thrown.void unlockManagedResource(ActivityToken activityToken, ManagedResourceKey managedResourceKey) throws ResourceException
activityToken
- The current activitymanagedResourceKey
- The business object.ResourceException
- This is thrown if the resource is already locked by another activity then
the exception will be thrown.void relockManagedResource(ActivityToken activityToken, ManagedResourceKey managedResourceKey) throws ResourceException
activityToken
- The current activity.managedResourceKey
- The business object.ResourceException
- This is thrown if the resource is already locked by another activity then
the exception will be thrown.boolean isLocked(ActivityToken activityToken, ManagedResourceKey managedResourceKey) throws ResourceException
activityToken
- The current activity.managedResourceKey
- The business object.ResourceException
- This is thrown if a problem occurs when determining if the managed resource is locked.LockData getLockData(ManagedResourceKey managedResourceKey) throws ResourceException
managedResourceKey
- The business object.ResourceException
- This is thrown if a problem occurs when retrieving the lock data.boolean[] isLocked(ActivityToken activityToken, ManagedResourceKey[] managedResourceKey) throws ResourceException
activityToken
- The current activity.managedResourceKey
- The business objects to check.ResourceException
- This is thrown if a problem occurs when determining if the managed resources are locked.LockData[] getLockData(ManagedResourceKey[] managedResourceKey) throws ResourceException
managedResourceKey
- The business objects.ResourceException
- This is thrown if a problem occurs when retrieving the lock data.ManagedResourceKey getManagedResourceKey(java.util.Map record) throws java.lang.Exception
record
- A map that represents the managed resource.java.lang.Exception
- This is thrown if a problem occurs when obtaining the managed resource key for the record.ManagedResourceKey getManagedResourceKey(java.lang.Object resource) throws java.lang.Exception
resource
- The resource to return the managed resource key of.java.lang.Exception
- This is thrown if a problem occurs when obtaining the managed resource key for the record.void commit(ContentData contentData) throws ResourceException
contentData
- The content data to commit.ResourceException
- A problem performing the commit operation.
Mostly this occurs when the commit causes data integrity problems.void rollback(ContentData contentData) throws ResourceException
contentData
- The content data to commit.ResourceException
- This is thrown if a problem occurs when performing the rollback.void synchronize(ContentData contentData) throws ResourceException
contentData
- The content data to synchronize. This data will not
include task and task group because the entire workspace needs to be
synchronized.ResourceException
- This is thrown if a problem occurs when performing the commit operation.
Mostly this occurs when the commit causes data integrity problems.void publish(ContentData contentData, ContentPublisher publisher) throws ResourceException
contentData
- The publishing content data information.publisher
- The publisher.ResourceException
java.lang.String postPublish(ContentData contentData) throws ResourceException
contentData
- The content data.ResourceException
- This is thrown if a problem occurs in the post-publish event processing.java.util.List<LockData> getManagedResourceData(java.lang.String taskGroupId, char filter) throws ResourceException
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.int getManagedResourceDataCount(java.lang.String taskGroupId) throws ResourceException
taskGroupId
- the task group identifierResourceException
- This is thrown if a problem occurs when retrieving the lock data.