The <ATG9dir>/Motorprise/config/atg/userprofiling/userProfile.xml file is combined with the userProfile.xml files from ATG Business Commerce, DSS, and DPS. These files are combined per the rules of XML combination to produce one XML file that is then parsed and used to describe the item types in the repository. (For more information about XML file combination, see the XML File Combination section of the Nucleus: Organizing JavaBean Components chapter in the ATG Programming Guide.) The combined file is reparsed each time the Profile Adapter Repository starts and it is never written out to disk, so we only need to maintain the separate files, not the combined one.

This approach allows users to define the user profile in a layered structure For example, the <ATG9dir>/Motorprise/config/atg/userprofiling/userProfile.xml defines only those properties, which are specific to Motorprise. It “adds on” to the already existing user profile definition.

The underlying storage of the user profile repository is a relational database. The SQL Profile Repository is used to expose that data via the Repository API. In the XML file, we describe the mapping of repository items to the relational database tables and columns.

We used the following SQL script to create the database schema to store the user profile data:

<ATG9dir>Motorprise/sql/db_components/solid/b2b_user_orddet_ddl.sql

---------------------------------------------------
-- Profile extensions of B2BStore
--
-- The use_org_XXX columns are not used in the first release
-- of Dynamo 5.5 but are present to allow for planned changes
-- in the data model of the B2BStore solution set in a future
-- release By adding the columns now we can update the data
-- model without requiring any database migration.
--
----------------------------------------------------
CREATE TABLE b2b_user_info (
  id        VARCHAR(40)     NOT NULL references dps_user(id),
     num_orders     INTEGER,
     avg_order_amt     DOUBLE PRECISION,
     use_org_approver     NUMERIC(1) CHECK(use_org_approver in (0,1)),
     use_org_costctr      NUMERIC(1) CHECK(use_org_costctr in (0,1)),
     use_org_billaddr     NUMERIC(1) CHECK(use_org_billaddr in (0,1)),
     use_org_shipaddr     NUMERIC(1) CHECK(use_org_shipaddr in (0,1)),
     use_org_payment      NUMERIC(1) CHECK(use_org_payment in (0,1)),
     use_org_vendors      NUMERIC(1) CHECK(use_org_vendors in (0,1)),
     use_org_purchlst     NUMERIC(1) CHECK(use_org_purchlst in (0,1)),
        PRIMARY KEY(id)
);
--
-- The table for the organization which contains logo image, and
-- authorization flags for credit cards, invoices, store credit
-- and gift certificates.
--
-- The use_prnt_XXX columns are not used in the first release
-- of Dynamo 5.5 but are present to allow for planned changes
-- in the data model of the B2BStore solution set in a future
-- release By adding the columns now we can update the data
-- model without requiring any database migration.
--
CREATE TABLE b2b_org_info (
  org_id       VARCHAR(40)     NOT NULL references dps_organization(org_id),
  logo            VARCHAR(40)     ,
  cc_auth                NUMERIC(1)            CHECK(cc_auth in (0,1)),
  invoice_auth           NUMERIC(1)            CHECK(invoice_auth in (0,1)),
  store_crdt_auth        NUMERIC(1)            CHECK(store_crdt_auth in (0,1)),
  gift_crt_auth          NUMERIC(1)            CHECK(gift_crt_auth in (0,1)),
  use_prnt_approver      NUMERIC(1) CHECK(use_prnt_approver in (0,1)),
  use_prnt_costctr       NUMERIC(1) CHECK(use_prnt_costctr in (0,1)),
  use_prnt_billaddr      NUMERIC(1) CHECK(use_prnt_billaddr in (0,1)),
  use_prnt_shipaddr      NUMERIC(1) CHECK(use_prnt_shipaddr in (0,1)),
  use_prnt_payment       NUMERIC(1) CHECK(use_prnt_payment in (0,1)),
  use_prnt_vendors       NUMERIC(1) CHECK(use_prnt_vendors in (0,1)),
  use_prnt_purchlst      NUMERIC(1) CHECK(use_prnt_purchlst in (0,1)),
  PRIMARY KEY (org_id)
);

COMMIT WORK;

GRANT SELECT ON b2b_user_info TO PUBLIC;
GRANT SELECT ON b2b_org_info TO PUBLIC;

ALTER TABLE b2b_user_info SET PESSIMISTIC;
ALTER TABLE b2b_org_info SET PESSIMISTIC;

COMMIT WORK;

After the profiles have been extended, an ACC user can set up profiles for customer organizations. Then, the administrator for that customer organization can create and edit users and suborganizations for that customer organization, using the Company Admin pages on the Motorprise web site.

 
loading table of contents...