Tutorials > Content management > Create a content-managed resource > Make the resource content managed

< Previous | Next >


Specify a managed resource

To specify a managed asset, a resource within a resource container must be created to represent the asset. A resource container is a collection of resources that are related to each other. Resource containers are typically classified into components such as catalog or marketing promotions in which the set of resources are dependent in terms of data integrity.

Resources and resource containers are configured through xml files that are located...

The file wc-resource-containers.xml contains a list of all of the managed resource containers. Each resource container has one or more resource manager groupings specified.

Resource Containers are specified in the wc-resource-containers.xml file within the wc:ResourceContainer tag. All containers are specified within this file and must be ordered to maintain data integrity such that containers with data dependency (such as foreign key references) to other containers must be specified after the referenced container. The key attributes of a container within the xml are the following:

Below is a sample of wc:ResourceContainer definition. See the XSD in the above directory for full implementation details.

<wc:ResourceContainer  
    name="CatalogContainer" 
    className="com.ibm.commerce.catalog.content.resources.CatalogContainer"
    configurationFile="content-management/wc-catalog-resource-managers.xml"
/>

Resources are specified in the configuration file of a container (for a list of existing managed assets, refer to Managed Assets). Managed content assets are specified within a wc:ManagedResource tag and must be ordered to maintain data integrity such that resources with data dependency to other resources must be specified after the referenced resource. The key attributes of a resource within the xml are the following:

In addition a resource may be identified as a related resource when an action on one resource causes a similar action on the related resource. For example, a related resource may be a table which has a foreign key relationship with a cascade such that deleting the parent resource also deletes the related resource.

Similarly, managed operational assets are specified within a wc:OperationalResource tag. The key attributes of a resource within the xml are the following:

The following is a sample definition of a file. See the XSD in the above directory for full implementations.

<?xml version="1.0" ?>
<ContentManagementManagedResources>

<ContentManagedData>
 
<ManagedResource  
    name="CATALOG" 
    abClassName="com.ibm.commerce.catalog.objects.CatalogAccessBean"
    resMgrClassName="com.ibm.commerce.catalog.content.resources.CatalogResourceManager" 
    managed="1" 
    primaryKey="CATALOG_ID" 
    businessKey
    WhereClause="CATALOG_ID = ? "/>
</ContentManagedData>
 
 
<OperationalResource name="ORDERS" abClassName="" />
 
<OperationalResource name="ORDERITEMS" abClassName="" />

</OperationalData>
</ContentManagementManagedResources>

< Previous | Next >


+

Search Tips   |   Advanced Search