Prod.Browse

2

Class Reference

Overview

This chapter outlines the classes, methods, and returns used to develop and implement XYZ Application. Sample code demonstrating how to use these objects is provided at the end of this chapter.

 

Topic

See Page

XYZ Application classes and methods

XYZ Application classes and methods

See Prod class.

Prod class

See ProdLinkType class.

ProdLinkType class

See ProdType class.

ProdType class

See Coll class.

Coll class

See CollFilter class.

CollFilter class

See CollPropertyDef class.

CollPropertyDef class

See Coll Type class.

Coll Type class

See PropertyDef class.

PropertyDef class

See RestrictedPropertyDef class.

RestrictedPropertyDef class

See Sample code.

Sample code

 

XYZ Application classes and methods

Overview

XYZ Application uses the classes and methods identified in the following table:

.

Class

Method

Prod

AssignToColl

Browse

BrowseByCollID

Create

Delete

GetRelatedproducts

ImportCCFormat

Relateproduct

RemoveFromColl

RemoveRelateproduct

RetrieveRecordCount

Retrieve

Save

ProdLinkType

Browse

Create

Delete

Retrieve

Save

ProdType

Browse

Create

Delete

Retrieve

Save

Coll

Browse

Create

Delete

GetTree

Retrieve

Save

CollFilter

Browse

Create

Delete

Retrieve

Save

CollPropertyDef

Browse

Create

Delete

Retrieve

RetrieveDistinctValues

Save

CollType

Browse

Create

Delete

Retrieve

Save

PropertyDef

Browse

Create

Delete

Retrieve

RetrieveDistinctValues

Save

RestrictedPropertyDef

Browse

Create

Delete

Retrieve

Save

XYZ Application classes and methods

Validation example

Many of XYZ Application's methods return validation rules in the form of an encoded XML product. These products list the values that define each property. In the following example, the validation rules are underlined:

 
<Property id="8" nam="Author" typ="CharValue" validation="&lt;PropertyDef id=&quot;8&quot; nam=&quot;Author&quot; typ=&quot;CharValue&quot; title=&quot;Author&quot; class=&quot;formsModule&quot; datatype=&quot;text&quot; description=&quot;&quot; multiple=&quot;false&quot; mandatory=&quot;true&quot; hidden=&quot;false&quot; readOnly=&quot;false&quot; displayControl=&quot;text&quot; displayHeight=&quot;20&quot; displayWidth=&quot;50&quot; minLength=&quot;1&quot; maxLength=&quot;50&quot; min=&quot;&quot; max=&quot;&quot; enumValues=&quot;&quot; enumDisplay=&quot;&quot; enumAllowNew=&quot;~disabled~&quot; default=&quot;&quot;/&gt;"/>

 

Validation example

Prod class

Purpose

The Prod class provides the methods for tasks such as creating and modifying associations between related families. This class must be registered in order to access XYZ Application. For more information about registering XYZ Application, refer to the Commerce Co, Inc. Installation and Maintenance Guide.

Library (DLLs) names

  • Library: CCproductMgmtLib
  • Program ID: CCproductMgmtLib.Prod
  • Class ID: Prod

Methods

The following table describes methods for this object.

 

Method

Description

AssignToColl

Assigns products to collections.

Browse

Queries for a list of all the products for a specific AppID.

BrowseByCollID

Queries by CollID for all products for a specific collection.

Create

Creates an empty XML product that contains all the properties required by specific type of product.

Delete

Deletes a specific product.

GetRelatedproducts

Gets all products related to a specific product.

 

CCFormat

Imports products from a predefined XML product format.

Relateproduct

Relates one product to another.

RemoveFromColl

Removes a product from a collection.

RemoveRelateproduct

Removes the link of one product to another.

Retrieve

Retrieves a specific product.

Save

Saves the products to the database.

Methods for the Prod class

AppID

Applications can be installed multiple times on a single extranet, as long as each installation (or "instance") has a unique name. Each method uses the AppID parameter to identify a particular installation of an application. For example, XYZ Application can be installed as "ProductCatalog" and as "ProdCatalog." Although the application names are different, each is considered an "instance" of the core application, XYZ Application.

AppID has a one-to-one relationship with "application name" and "application instance" as those terms are used in the Commerce Co, Inc. manuals.

Prod.AssignToColl

Purpose

The AssignToColl method assigns products to collections.

Required permissions

A user must belong to a security collection with the AssignproductToColl permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Sub AssignToColl(

ByVal AppID As String,

ByVal SessionID As String,

ByVal CollID As String,

ByVal productID As String)

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

CollID

ID of the collection to which you are assigning the product.

productID

ID of the product you are assigning to the collection.

 

See also

For further information on productID, see Prod.Create.

For further information on CollID, see Coll.Create.

Prod.Browse

Purpose

The Browse method queries for a list of all products for a specific AppID.

Required permissions

A user must belong to a security collection with the Viewproducts or ViewAllproducts permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Function Browse(

ByVal AppID As String,

ByVal SessionID As String,

Optional Filter As String,

Optional RetrieveLevels As Integer=0,

Optional SortField As String,

Optional StartRow As Integer=-1,

Optional EndRow As Integer=-1,

Optional ReturnPropDefXML As Boolean=False)

As String

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

Filter

Comma delimited collection of criteria. See usage notes.

RetrieveLevels

Specifies which properties and values are returned. See usage notes.

SortField

Name of a property by which to sort the final results. Results are always ascending.

StartRow

First product row to return. Used in pagination. See usage notes

EndRow

Last product row to return. Used in pagination. See usage notes.

ReturnPropDefXML

If true, the property definition XML product is returned.

Returns

This method returns an XML product. A complete XML schema for XYZ Application is included in .

 

<products>

<product id="1" nam="Name">

<Property nam="Prop1" id="1">1</Property>

<Property nam="Prop2" id="2">3</Property>

<Property nam="Prop3" id="3">2</Property>

<Property nam="Prop4" id="4">4 typ="charvalue"</Property>

</product>

</products>

Usage notes

Each criterion in the CollType is formatted in the following manner: {PropertyName} = `Value'.

Retrieve levels are defined as follows:
-1 returns all properties
0 returns header properties (only in DMproduct database table)
>0 returns some or all user defined properties

-1 entered in the StartRow or the EndRow field returns all rows.

 

Prod.BrowseByCollID

Purpose

The BrowseByCollID method queries by CollID for all products for a specific collection.

Required permissions

A user must belong to a security collection with the Veiwproducts or ViewAllproducts permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Function BrowseByCollID(

ByVal AppID As String,

ByVal SessionID As String,

ByVal CollID As String)

As String

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

CollID

ID of the collection you are querying for products.

Returns

This method returns an XML product. A complete XML schema for XYZ Application is included in .

 

<products>

<product id="" nam="" restricted="" restricteduid="" doctype="" doctypeid="" active="1">

<productNum></productNum>

<Description></Description>

<Property id="2" nam="Model Name Description" typ="CharValue"></Property><Property id="3" nam="Brand" typ="CharValue">

</product>

</products>

See also

For further information on CollID, see Coll.Create.

Prod.Create

Purpose

The Create method creates an empty XML product that contains all the properties required by this type of product.

Required permissions

A user must belong to a security collection with the Addproducts permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Function Create(

ByVal AppID As String,

ByVal SessionID As String,

ByVal ProdType As String)

As String

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

ProdType

Type of product you are creating.

Returns

This method returns an XML product. A complete XML schema for XYZ Application is included in .

 

<products>

<product id="" nam="" restricted="" restricteduid="" active="1" doctype="As-built drawings" doctypeid="2">

<productNum/>

<Description/>

<Property id="8" nam="Author" typ="CharValue" validation="[Encoded XML product. See Validation example]"/>

</product>

</products>

See also

For further information on ProdTypeID, see tProdType.Create.

Prod.Delete

Purpose

The Delete method deletes a specific product.

Required permissions

A user must belong to a security collection with the Deleteproducts permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Sub Delete(

ByVal AppID As String,

ByVal SessionID As String,

ByVal productID As String)

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

productID

ID of the product you are deleting.

Returns

None.

See also

For further information on productID, seeProd.Create.

 

Prod.GetRelatedproducts

Purpose

The GetRelatedproducts method gets all products related to a specific product.

Required permissions

A user must belong to a security collection with the Viewproducts or ViewAllproducts permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Function GetRelatedproducts(

ByVal AppID As String,

ByVal SessionID As String,

ByVal productID As String)

As String

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

productID

The ID of the product for which you are getting related products.

Returns

This method returns an XML product. A complete XML schema for XYZ Application is included in .

 

<products>

<product id="" nam="" restricted="" restricteduid="" doctype="" doctypeid="43" active="" linktype="">

<productNum></productNum>

<Description></Description>

<Property id="3" nam="Brand" typ="CharValue"></Property><Property id="26" nam="Family" typ="CharValue">

</product>

</products>

See also

For further information on productID, see Prod.Create.

Prod.Relateproduct

Purpose

The Relateproduct method relates one product to another.

Required permissions

A user must belong to a security collection with the Viewproducts or ViewAllproducts permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Sub Relateproduct(

ByVal AppID As String,

ByVal SessionID As String,

ByVal productID As String

ByVal LinkToproductID As String

ByVal LinkTypeID As String)

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

productID

ID of the product to which you are linking.

LinkToproductID

ID of the product you are linking.

LinkTypeID

ID of the link type.

Returns

This method returns an XML product. A complete XML schema for XYZ Application is included in .

 

<AssignResponse>True</AssignResponse>

Usage notes

LinkToproductID uses the productID of the product you are linking.

See also

For further information on productID, see Prod.Create.

For further information on LinkTypeID, see ProdLinkType.Create.

Prod.RemoveFromColl

Purpose

The RemoveFromColl method removes a product from a collection.

Required permissions

A user must belong to a security collection with the EditColls permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Sub RemoveFromColl(

ByVal AppID As String,

ByVal SessionID As String,

ByVal CollID As String,

ByVal productID As String)

Returns

None

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

CollID

ID of the collection from which you are removing assignment.

productID

ID of the product you are removing.

See also

For further information on productID, see Prod.Create.

For further information on CollID, see Coll.Create.

 

Prod.RemoveRelateproduct

Purpose

The RemoveRelateproduct method removes the link of one product to another.

Required permissions

A user must belong to a security collection with the Relateproducts permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Sub RemoveRelateproduct(

ByVal AppID As String,

ByVal SessionID As String,

ByVal productID As String,

ByVal LinkToproductID As String,

ByVal LinkTypeID As String)

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

productID

ID of the product from which you are unlinking.

LinkToproduct

ID of the product you are unlinking.

LinkTypeID

ID of the link type.

Returns

None

Usage notes

LinkToproductID uses the productID of the product you are linking.

See also

For further information on productID, see Prod.Create.

For further information on LinkTypeID, see ProdLinkType.Create.

 

Prod.RetrieveRecordCount

Purpose

The RetrieveRecordCount method retrieves the record count.

Method declaration

Retrieve Record Count(

ByVal AppID As String,

ByVal SessionID As String,

Optional ByVal Filter As String)

As String

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

Filter

Filters the record counts retrieved.

Returns

None

Prod.Retrieve

Purpose

The Retrieve method retrieves a specific product.

Required permissions

A user must belong to a security collection with the Viewproducts or ViewAllproducts permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Function Retrieve(

ByVal AppID As String,

ByVal SessionID As String,

ByVal productID As String)

As String

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

productID

ID of the product you are retrieving.

Returns

This method returns an XML product. A complete XML schema for XYZ Application is included in .

 

<products>

<product id="" nam="" restricted="" restricteduid="" doctype="Pressure" doctypeid="" active="">

<productNum></productNum>

<Description></

Description>

<Property id="2" nam="Model Name Description" typ="CharValue" validation="[Encoded XML product. See Validation example]"></Property>

<Property id="3" nam="Brand" typ="CharValue" validation="Encoded XML product. See Validation example]">

</product>

</products>

See also

For further information on productID, see Prod.Create.

Prod.Save

Purpose

The Save method saves the products to the database.

Required permissions

A user must belong to a security collection with the Editproducts permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Function Save(

ByVal AppID As String,

ByVal SessionID As String,

ByVal XML As String)

As String

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

XML

XML product you are saving that is populated with data.

Returns

This method returns an XML product. A complete XML schema for XYZ Application is included in .

 
 

Input XML

 

<products>

<product id='5762' nam='test' restricted='' restricteduid='' active='1' doctype='As-built drawings' doctypeid='2'>

<productNum></productNum>

<Description></Description>

<Property id='8' nam='Author' typ='CharValue' validation='[Encoded XML product. See Validation example]'>2</Property>

</product>

</products>

 

Return XML

 

<products>

<product id="5762" nam="test" restricted="" restricteduid="" active="1" doctype="As-built drawings" doctypeid="2">

<productNum>012</productNum>

<Description>Test</Description>

<Property id="8" nam="Author" typ="CharValue" validation="[Encoded XML product. See Validation example]">2</Property>

</product>

</products>

ProdLinkType class

Purpose

The ProdLinkType class provides the methods for tasks such as creating and modifying product link types. This class must be registered in order to access XYZ Application. For more information about registering XYZ Application, refer to the Commerce Co, Inc. Installation and Maintenance Guide.

Library (DLLs) names

  • Library: CCproductMgmtLib
  • Program ID: CCproductMgmtLib.ProdLinkType
  • Class ID: ProdLinkType

Methods

The following table describes methods for this object.

 

Method

Description

Browse

Queries for a list of all product link types for a specific AppID.

Create

Creates an empty XML product used to create a new product link type.

Delete

Deletes a specific product link type.

Retrieve

Retrieves a specific product link type.

Save

Saves product link types to the database.

Methods for the ProdLinkType class

AppID

Applications can be installed multiple times on a single extranet, as long as each installation (or "instance") has a unique name. Each method uses the AppID parameter to identify a particular installation of an application. For example, XYZ Application can be installed as "ProductCatalog" and as "ProdCatalog." Although the application names are different, each is considered an "instance" of the core application, XYZ Application.

AppID has a one-to-one relationship with "application name" and "application instance" as those terms are used in the Commerce Co, Inc. manuals.

ProdLinkType.Browse

Purpose

The Browse method queries for a list of all product link types for a specific AppID.

Required permissions

A user must belong to a security collection with the ViewproductLinkTypes permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Function Browse(

ByVal AppID As String,

ByVal SessionID As String)

As String

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

Returns

This method returns an XML product. A complete XML schema for XYZ Application is included in .

 

<ProdLinkTypes>

<ProdLinkType nam="Name" id="1" />

<ProdLinkType nam="Name" id="2" />

</ProdLinkTypes>

ProdLinkType.Create

Purpose

The Create method creates an empty XML product used to create a new product link type.

Required permissions

A user must belong to a security collection with the AddproductLinkTypes permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Function Create(

ByVal AppID As String,

ByVal SessionID As String)

As String

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

Returns

This method returns an XML product. A complete XML schema for XYZ Application is included in .

 

<ProdLinkTypes><ProdLinkType nam="" id=""/></ProdLinkTypes>

ProdLinkType.Delete

Purpose

The Delete method deletes a specific product link type.

Required permissions

A user must belong to a security collection with the DeleteproductLinkTypes permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Sub Delete(

ByVal AppID As String,

ByVal SessionID As String,

ByVal ProdLinkTypeID As String)

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

ProdLinkTypeID

ID of the product link type you are deleting.

Returns

None.

See also

For further information on ProdLinkTypeID, see ProdLinkType.Create.

 

ProdLinkType.Retrieve

Purpose

The Retrieve method retrieves a specific product link type.

Required permissions

A user must belong to a security collection with the ViewproductLinkTypes permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Function Retrieve(

ByVal AppID As String,

ByVal SessionID As String,

ByVal ProdLinkTypeID As String)

As String

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

ProdLinkTypeID

ID of the product link type you are retrieving.

Returns

This method returns an XML product. A complete XML schema for XYZ Application is included in .

 

<ProdLinkTypes>

<ProdLinkType nam="Name" id="1" />

</ProdLinkTypes>

See also

For further information on ProdLinkTypeID, ProdLinkType.Create.

 

ProdLinkType.Save

Purpose

The Save method saves product link types to the database.

Required permissions

A user must belong to a security collection with the EditproductLinkTypes permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Function Save(

ByVal AppID As String,

ByVal SessionID As String,

ByVal XML As String)

As String

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

XML

XML product you are saving that is populated with data.

Returns

This method returns an XML product. A complete XML schema for XYZ Application is included in .

 

Input XML

 

<ProdLinkTypes>

<ProdLinkType id='' nam='test'/>

</ProdLinkTypes>

 

OutputXML

 

<ProdLinkTypes>

<ProdLinkType id='1' nam='test'/>

</ProdLinkTypes>

ProdType class

Purpose

The ProdType class provides the methods for tasks such as creating and modifying families for specific categories of product lines. This class must be registered in order to access XYZ Application. For more information about registering XYZ Application, refer to the Commerce Co, Inc. Installation and Maintenance Guide.

Library (DLLs) names

  • Library: CCproductMgmtLib
  • Program ID: CCproductMgmtLib.ProdType
  • Class ID: ProdType

Methods

The following table describes methods for this object.

 

Method

Description

Browse

Queries for all product types for a specific AppID.

Create

Creates an empty XML product used to create a new product type.

Delete

Deletes a specific product type.

Retrieve

Retrieves a specific product type.

Save

Saves product types to the database.

Methods for the ProdType class

AppID

Applications can be installed multiple times on a single extranet, as long as each installation (or "instance") has a unique name. Each method uses the AppID parameter to identify a particular installation of an application. For example, XYZ Application can be installed as "ProductCatalog" and as "ProdCatalog." Although the application names are different, each is considered an "instance" of the core application, XYZ Application.

AppID has a one-to-one relationship with "application name" and "application instance" as those terms are used in the Commerce Co, Inc. manuals.

ProdType.Browse

Purpose

The Browse method queries for all product types for a specific AppID.

Required permissions

A user must belong to a security collection with the ViewproductTypes permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Function Browse(

ByVal AppID As String,

ByVal SessionID As String)

As String

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

Returns

This method returns an XML product. A complete XML schema for XYZ Application is included in .

 

<productTypes>

<productType id="2" nam="As-built drawings">

<Property id="8" nam="Author" priority="1" retrievelevel="1" meta="" validation="[Encoded XML product. See Validation example]"/>

</productType>

</productTypes>

ProdType.Create

Purpose

The Create method creates an empty XML product used to create a new product type.

Required permissions

A user must belong to a security collection with the AddproductTypes permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Function Create(

ByVal AppID As String,

ByVal SessionID As String)

As String

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

Returns

This method returns an XML product. A complete XML schema for XYZ Application is included in .

 

<productTypes>

<productType id='' nam=''><Property id='' nam='' priority='' retrievelevel='' meta=''/>

 

</productType>

</productTypes>

ProdType.Delete

Purpose

The Delete method deletes a specific product type.

Required permissions

A user must belong to a security collection with the DeleteproductTypes permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Sub Delete(

ByVal AppID As String,

ByVal SessionID As String,

ByVal ProdTypeID As String)

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

ProdTypeID

ID of the product type you are deleting.

Returns

None

See also

For further information on ProdTypeID, see ProdType.Create.

 

ProdType.Retrieve

Purpose

The Retrieve method retrieves a specific product type.

Required permissions

A user must belong to a security collection with the ViewproductTypes permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Function Retrieve(

ByVal AppID As String,

ByVal SessionID As String,

ByVal ProdTypeID As String)

As String

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

ProdTypeID

ID of the product type you are retrieving.

Returns

This method returns an XML product. A complete XML schema for XYZ Application is included in .

 

productMgmtProdTypeResponse>

<productTypes>

<productType id="1" nam="Application Notes/Tech. Briefs"><Property id="7" nam="Application" priority="1" retrievelevel="1" meta="" validation="[Encoded XML product. See Validation example]"/>

</productType>

</productTypes>

</productMgmtProdTypeResponse>

See also

For further information on ProdTypeID, see ProdType.Create.

ProdType.Save

Purpose

The Save method saves product types to the database.

Required permissions

A user must belong to a security collection with the EditproductTypes permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Function Save(

ByVal AppID As String,

ByVal SessionID As String,

ByVal XML As String)

As String

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

XML

XML product you are saving that is populated with data.

Returns

This method returns an XML product. A complete XML schema for XYZ Application is included in .

 

Input XML

 

<productTypes>

<productType id='1' nam='test'>

<Property id='1' nam='test' priority='1' retrievelevel='1' meta='1'/>

</productType>

</productTypes>

 

Return XML

 

<productTypes>

<productType id='' nam=''><Property id='' nam='' priority='' retrievelevel='' meta=''/>

</productType>

</productTypes>

Coll class

Purpose

The Coll class provides the methods for tasks such as creating and modifying families. This class must be registered in order to access XYZ Application. For more information about registering XYZ Application, refer to the Commerce Co, Inc. Installation and Maintenance Guide.

Library (DLLs) names

  • Library: CCproductMgmtLib
  • Program ID: CCproductMgmtLib.Coll
  • Class ID: Coll

Methods

The following table describes methods for this object.

 

Method

Description

Browse

Queries for all collections for a specific AppID.

Create

Creates an empty XML product used to create a new collection.

Delete

Deletes a specific collection.

GetTree

Gets all collections under the specified StartNode in hierarchical XML.

Retrieve

Retrieves a specific collection.

Save

Saves collections to the database.

Methods for the Coll class

AppID

Applications can be installed multiple times on a single extranet, as long as each installation (or "instance") has a unique name. Each method uses the AppID parameter to identify a particular installation of an application. For example, XYZ Application can be installed as "ProductCatalog"and as "ProdCatalog." Although the application names are different, each is considered an "instance" of the core application, XYZ Application.

AppID has a one-to-one relationship with "application name" and "application instance" as those terms are used in the Commerce Co, Inc. manuals.

Coll.Browse

Purpose

The Browse method queries for all collections for a specific AppID.

Required permissions

A user must belong to a security collection with the ViewColls permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Browse

(ByVal AppID As String,

ByVal SessionID As String)

As String

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

Returns

This method returns an XML product. A complete XML schema for XYZ Application is included in .

 

<Colls>

<Coll id="172" nam="Electric" collectiontypeid="1" parentid="133">

<Description></Description>

<RestrictedUID></RestrictedUID>

<AssociationID></AssociationID>

<Meta></Meta>

</Coll>

</Colls>

Coll.Create

Purpose

The Create method creates an empty XML product used to create a new collection.

Required permissions

A user must belong to a security collection with the AddColls permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Function Create(

ByVal AppID As String,

ByVal SessionID As String,

Optional ByVal CollType As String)

As String

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

CollType

Optional collection type. See usage notes.

Returns

This method returns an XML product. A complete XML schema for XYZ Application is included in .

 

<Colls>

<Coll id='' nam='' parentid='' collectiontypeid=''>

<Description/>

<Meta/>

</Coll>

</Colls>

 

 

<Colls>

<Coll id="" nam="" parentid="" collectiontypeid="1">

<Description/>

<Meta/>

<Property id="1" nam="Test04/10" typ="CharValue" validation="[Encoded XML product. See Validation example]"/>

</Coll>

</Colls>

 

Usage notes

CollType is required to save properties within the collection. It is optional for 4.0 compatibility.

 

Coll.Delete

Purpose

The Delete method deletes a specific collection.

Required permissions

A user must belong to a security collection with the DeleteColls permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Sub Delete(

ByVal AppID As String,

ByVal SessionID As String,

ByVal CollID As String)

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

CollID

ID of the collection you are deleting.

Returns

None

See also

For further information on CollID, see Coll.Create.

 

Coll.GetTree

Purpose

The GetTree method gets all collections under the specified StartNode in hierarchical XML.

Required permissions

A user must belong to a security collection with the ViewColls permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Function GetTree(

ByVal AppID As String,

ByVal SessionID As String,

Optional ByVal StartNode As String = "")

As String

Parameters

 
AppID

The ID of a particular instance of the XYZ Application application. For more information on AppID, refer to AppID.

SessionID

Session ID of the user who is currently logged on to the system.

StartNode

ID of the collection from which you are starting.

Returns

This method returns an XML product. A complete XML schema for XYZ Application is included in .

 

<CollTree>

<Coll id="37" ID="CC37" nam="Density" parentid="1" collectiontypeid="1">

<RestrictedUID></RestrictedUID>

<AssociationID></AssociationID>

<Coll id="101" ID="CC101" nam="ELITE flowmeter" parentid="37" collectiontypeid="1">

<RestrictedUID></RestrictedUID>

<AssociationID></AssociationID>

</Coll>

<Coll id="103" ID="CC103" nam="Model D flowmeter" parentid="37" collectiontypeid="1">

<RestrictedUID></RestrictedUID>

<AssociationID></AssociationID>

</Coll>

</Coll>

</CollTree>

See also

For further information on CollID, see Coll.Create.

Coll.Retrieve

Purpose

The Retrieve method retrieves a specific collection.

Required permissions

A user must belong to a security collection with the ViewColls permission to access this method. For a detailed description of the permissions associated with XYZ Application, refer to .

The SessionID stores the user's permissions. A developer can call the CCUserSession.HasPermission method to determine whether the user has the required permission. For more information on checking permissions, refer to the Relationship Manager Developer Reference Guide.

Method declaration

Function Retrieve(

ByVal AppID As String,

ByVal SessionID As String,