Loading Objects with Security Labels Using a CSV File
To load a data with security labels using a CSV file, add the securityLabels attribute for an object as a string containing a slash (/) separated list of security label name/value pairs, where the names and values are the same as those specified in the security labels configuration file and are separated by an equal (=) sign, without an extraneous white space. Once you convert the CSV file to XML, the XML file will contain a csvsecurityLabels element with its value set to the same string as specified in the CSV file. The location of the element depends on the DTD definition for the object type. The DTD definitions can be found in the <Windchill>/codebase/registry/ixb/dtds/standardX20.dtd directory, where <Windchill> is the location where Windchill is installed.
The following is an example of the CSV file format for a document with multiple security labels.
Document,,ImportDoc1,Imported Document,48124,Document,descriptive text,DESIGN,/Default/Folder1,,,Basic,,,ApplicationData,EGadWork.xls,,,A,1,CORPORATE_PROPRIETARY=PRV/EXPORT_CONTROL=DNE/THIRD_PARTY_PROPRIETARY=CompanyA
Using the CSV2XML utility, convert your CSV file to XML for loading. The resulting XML file should look like the following example. For more information on the CSV2XML utility, see About the CSV2XML Utility.
<?xml version="1.0" ?><!DOCTYPE NmLoader SYSTEM "standardX20.dtd">
<NmLoader>
<csvDocument handler="wt.doc.LoadDoc.createGeneral" >
<csvuser></csvuser>
<csvname>ImportDoc1</csvname>
<csvtitle>Imported Document</csvtitle>
<csvnumber>48124</csvnumber>
<csvtype>Document</csvtype>
<csvdescription>descriptive text</csvdescription>
<csvdepartment>DESIGN</csvdepartment>
<csvsaveIn>/Default/Folder1</csvsaveIn>
<csvteamTemplate></csvteamTemplate>
<csvdomain></csvdomain>
<csvlifecycletemplate>Basic</csvlifecycletemplate>
<csvlifecyclestate></csvlifecyclestate>
<csvtypedef></csvtypedef>
<csvprimarycontenttype>ApplicationData</csvprimarycontenttype>
<csvpath>EGadWork.xls</csvpath>
<csvformat></csvformat>
<csvcontdesc></csvcontdesc>
<csvversion>A</csvversion>
<csviteration>1</csviteration>
<csvsecurityLabels>CORPORATE_PROPRIETARY=PRV/EXPORT_CONTROL=DNE/THIRD_PARTY_PROPRIETARY=CompanyA</csvsecurityLabels>
</csvDocument>
</NmLoader>
After creating your XML load file, run the load.data target in the CCD utility. For more information, see Deploying Code and Configuration Package.
Was this helpful?