com.ibm.commerce.catalog.content.resources
Class AttributeValueResourceManager
- java.lang.Object
-
- com.ibm.commerce.context.content.resources.AbstractResourceManagerImpl
-
- com.ibm.commerce.context.content.resources.AbstractEntityBeanResourceManagerImpl
-
- com.ibm.commerce.catalog.content.resources.AbstractEntityBeanCacheInvIDGenResourceManagerImpl
-
- com.ibm.commerce.catalog.content.resources.AttributeValueResourceManager
-
- All Implemented Interfaces:
- PostPublishDataProcessor, RelatedResourceManager, ResourceManager
public class AttributeValueResourceManager extends AbstractEntityBeanCacheInvIDGenResourceManagerImpl implements RelatedResourceManager, ResourceManager
The resource manager for managing the creation, update and deletion of attribute values.
-
-
Field Summary
-
Fields inherited from class com.ibm.commerce.context.content.resources.AbstractResourceManagerImpl
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 Summary
Constructors Constructor and Description AttributeValueResourceManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
createRelatedManagedResources(ActivityToken activityToken, java.lang.Object relatedResource, java.lang.Object createData)
Creates all the resources related to a given parent resource based on the original creation data.void
deleteRelatedManagedResources(ActivityToken activityToken, java.lang.Object relatedResource)
Deletes all the related resources that has a relation to the catalog entry or attribute for the given content context.EntityBeanCreationData
getEntityCreationData(java.lang.Object ManagedResource)
ManagedResourceKey
getManagedResourceKey(EntityBeanCreationData ecd)
ManagedResourceKey
getManagedResourceKey(java.util.Map boKeyMap)
This method returns the managed resource key.ManagedResourceKey
getManagedResourceKey(java.lang.Object managedResource)
This method returns the managed resource key.static AttributeValueResourceManager
getUniqueInstance()
Retrieves the singleton of the resource manager.void
reset()
This method must be called to clear the thread local variables used by this resource manager.void
setAttributeValue(java.lang.Object attributevalue)
This method sets the attribute value for the managed resource (AttributeValueAccessBean)void
updateRelatedManagedResources(ActivityToken activityToken, java.lang.Object relatedResource)
Updates all the resources related to a given parent resource.-
Methods inherited from class com.ibm.commerce.catalog.content.resources.AbstractEntityBeanCacheInvIDGenResourceManagerImpl
postPublish, processPostPublishData
-
Methods inherited from class com.ibm.commerce.context.content.resources.AbstractResourceManagerImpl
commit, createManagedResource, deleteManagedResource, fetchUniqueIndexViolations, getLockData, getLockData, getManagedResourceData, getManagedResourceDataCount, getMetaData, getResourceContainer, handleForeignKeyViolations, handleUniqueIndexViolations, handleUniqueIndexViolations, isLocked, isLocked, lockManagedResource, publish, relockManagedResource, rollback, setMetaData, setResourceContainer, synchronize, unlockManagedResource, updateManagedResource
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.commerce.context.content.resources.ResourceManager
commit, createManagedResource, deleteManagedResource, getLockData, getLockData, getManagedResourceData, getManagedResourceDataCount, getMetaData, getResourceContainer, isLocked, isLocked, lockManagedResource, postPublish, publish, relockManagedResource, rollback, setMetaData, setResourceContainer, synchronize, unlockManagedResource, updateManagedResource
-
-
-
-
Method Detail
-
getUniqueInstance
public static AttributeValueResourceManager getUniqueInstance()
Retrieves the singleton of the resource manager.- Returns:
- The Resource Manager.
-
getEntityCreationData
public EntityBeanCreationData getEntityCreationData(java.lang.Object ManagedResource) throws java.lang.Exception
- Throws:
java.lang.Exception
- See Also:
com.ibm.commerce.content.resources.ManagedResourceManager#getEntityCreationData(Object)
-
getManagedResourceKey
public ManagedResourceKey getManagedResourceKey(EntityBeanCreationData ecd) throws java.lang.Exception
- Throws:
java.lang.Exception
- See Also:
com.ibm.commerce.content.resources.ManagedResourceManager#getManagedResourceKey(EntityCreationData)
-
getManagedResourceKey
public ManagedResourceKey getManagedResourceKey(java.util.Map boKeyMap) throws java.lang.Exception
Description copied from interface:ResourceManager
This method returns the managed resource key.- Specified by:
getManagedResourceKey
in interfaceResourceManager
- Parameters:
boKeyMap
- A map that represents the managed resource.- Returns:
- Returns a managed resource key
- Throws:
java.lang.Exception
- This is thrown if a problem occurs when obtaining the managed resource key for the record.- See Also:
com.ibm.commerce.content.resources.ManagedResourceManager#getManagedResourceKey(Map)
-
getManagedResourceKey
public ManagedResourceKey getManagedResourceKey(java.lang.Object managedResource) throws java.lang.Exception
Description copied from interface:ResourceManager
This method returns the managed resource key.- Specified by:
getManagedResourceKey
in interfaceResourceManager
- Parameters:
managedResource
- The resource to return the managed resource key of.- Returns:
- Returns a managed resource key
- Throws:
java.lang.Exception
- This is thrown if a problem occurs when obtaining the managed resource key for the record.- See Also:
com.ibm.commerce.content.resources.ManagedResourceManager#getManagedResourceKey(Object)
-
deleteRelatedManagedResources
public void deleteRelatedManagedResources(ActivityToken activityToken, java.lang.Object relatedResource) throws ResourceException
Deletes all the related resources that has a relation to the catalog entry or attribute for the given content context.- Specified by:
deleteRelatedManagedResources
in interfaceRelatedResourceManager
- Overrides:
deleteRelatedManagedResources
in classAbstractResourceManagerImpl
- Parameters:
activityToken
- The current activity.relatedResource
- The related resource.- Throws:
java.lang.Exception
- A problem when deleting the child resources.ResourceException
- This is thrown if a problem occurs when deleting the child resources.- See Also:
com.ibm.commerce.content.resources.RelatedResourceManager#deleteRelatedManagedResources(ActivityToken, Object)
-
createRelatedManagedResources
public void createRelatedManagedResources(ActivityToken activityToken, java.lang.Object relatedResource, java.lang.Object createData) throws ResourceException
Description copied from interface:RelatedResourceManager
Creates all the resources related to a given parent resource based on the original creation data.- Specified by:
createRelatedManagedResources
in interfaceRelatedResourceManager
- Parameters:
activityToken
- The current activity.relatedResource
- The parent resource.createData
- The original creation data.- Throws:
ResourceException
- on any problem creating resources- See Also:
com.ibm.commerce.content.resources.RelatedResourceManager#createRelatedManagedResources(ActivityToken, Object, Object)
-
updateRelatedManagedResources
public void updateRelatedManagedResources(ActivityToken activityToken, java.lang.Object relatedResource) throws ResourceException
Description copied from interface:RelatedResourceManager
Updates all the resources related to a given parent resource.- Specified by:
updateRelatedManagedResources
in interfaceRelatedResourceManager
- Parameters:
activityToken
- The current activity.relatedResource
- The parent resource.- Throws:
ResourceException
- on any problem updating the child resources- See Also:
com.ibm.commerce.content.resources.RelatedResourceManager#updateRelatedManagedResources(ActivityToken, Object)
-
setAttributeValue
public void setAttributeValue(java.lang.Object attributevalue)
This method sets the attribute value for the managed resource (AttributeValueAccessBean)- Parameters:
attributevalue
- The attribute value for the managed resource (AttributeValueAccessBean)
-
reset
public void reset()
This method must be called to clear the thread local variables used by this resource manager.
-
-