Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
WCBasicAdminGuide.pdf
Скачиваний:
71
Добавлен:
23.03.2015
Размер:
3.31 Mб
Скачать

of the exported template. This file is also known as the business XML file and contains information that is used when creating a container from this template (for example, folder structure, access control policy rules, and so on).

Additional files that make up the contents of the exported template. If unzipped, these files are put in the CONTENTS directory. For example, the ZIP file of a program or project template could contain documents and document templates that then belong in the CONTENTS directory.

Required Contents of ZIP File Used for Importing a Context Template

The ZIP file you use to import a context template must have the same basic structure as the ZIP created when exporting a context template (as described in the previous section). The ZIP file must contain the following:

An XML file at the top level of the ZIP that contains the definition of the context template itself, such as name and container class of the template. This corresponds to the TAG-ContainerTemplate_<integer>.xml file that is generated in an export. For more information on the content of this file, see Contents of Top-level XML File for Imported Templates on page 400

The business XML file (which is defined as coming from the CONTENTS directory) that lists the contents of the template you want to import and contains information that is used when creating a container from this template (for example, folder structure, access control policy rules, and so on). This is also known as the TAG-0.xml file that is generated on export. The name of this file must match the file named in the zipEntry element in the top-level XML file. For more information on the content of the business XML file, see Creating Business XML Files for Context Templates on page 398

Additional files to include in the contents of the template you want to import. These files are named in the business XML file to be added as content items through the use of the contentItem element. Before creating the ZIP file, put these files in the CONTENTS directory. Examples of files that can be in this directory are documents and document templates that you want to import as part of a Windchill ProjectLink project template.

Note

The file used could also be a JAR file rather than a ZIP file.

Understanding Context Templates

401

Note

The ZIP file created by selecting the Download action from the right-click actions menu of a context template row on the Templates table cannot be used as the template data file for creating a context template using the import from file icon ; it does not contain all of the required information that is needed to create a new context template. The downloaded ZIP file can be used to update an existing context template or create a template using the new template icon .

Contents of Top-level XML File for Imported Templates

The top-level XML file is used to define the template that you are importing. The file must begin with the following lines:

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE ContainerTemplate SYSTEM "standardX20.dtd">

The content of the top-level XML file is defined by the following DTD element:

<!ELEMENT ContainerTemplate (name,

description?,

containerClassName,

defaultValuesRule?,

locale?,

enabled?,

updateIf?,

(xmlText | loadPath | zipEntry)?)>

The following example illustrates how to use the ContainerTemplate element to define the template you want to import. The example is for a Windchill PDMLink product template as signified by the use of wt.pdmlink.PDMLinkProduct in the containerClassName element.

In the example, the name of the template is DEMO Product Template and, when the template is imported, it is enabled and visible. The business XML file that contains the content of the template is contained in the CONTENTS/ DEMOProductTemplate.xml file that is in the imported ZIP file:

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE ContainerTemplate SYSTEM "standardX20.dtd">

<ContainerTemplate>

<name>DEMO Product Template</name>

<description>A description of the DEMO template</description>

<containerClassName>wt.pdmlink.PDMLinkProduct</containerClassName>

402

PTC Windchill® Basic Administration Guide

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]