Configuring a Domain
To configure a domain create the following folder structure along with the required JSON files at the custom configuration path:
<Windchill>/codebase/rest/custom/domain
<Domain Folder>
<Version Folder>
complexType
entity
import.json
import.js
<Domain JSON File>
While configuring a domain, create the <Domain Folder>. The name of folder is the name of the domain identifier. The domain identifier of the domain is the name specified by customizers in the id property in the <Domain JSON File>.
The <Version Folder> is the name for the version of the domain API. There can be multiple version folders under the domain folders, each representing the domain configuration for that version. These folders are named v1, v2, v3 and so on. The <Version Folder> contains subfolders that contain the configuration files for entities, complex types, and configuration for domain imports.
The folder complexType contains configuration files for OData complex types. If your domain contains complex types, this folder will contain a .json file for each complex type defined in the domain. In OData, complex types are structures of primitive types, and are used to combine related properties. For example, the PTC domain defines a complex type called EnumType that combines two string properties, Value and Display. The EnumType complex type is used to represent a Windchill enumeration type. Value represents the property value persisted in the database. Display represents the localized property value used for display.
The entity folder contains two configuration files, a .json and a .js file, for each entity in the domain. The .json file specifies the properties of the entity being configured and the .js file contains its hook implementations.
The import.json file specifies the other domains that are imported into the domain being configured. Importing other domains in a domain is an OData capability that allows EDM of the imported domains to be used in the referencing domain. For example, PTC Common domain, which is a domain provided by PTC in Windchill REST Services, is imported by all other domains. It contains common constructs, such as, common complex types EnumType.
The import.js file contains implementations for unbound functions and actions. This file is needed only if unbound actions and functions are defined in the domain.
The <Domain JSON File> is a JSON file with the same name as the domain identifier of the domain, and has .json specified as extension in its file name. For example, for the Product Management domain, this file is called ProdMgmt.json. The <Domain JSON File> contains the metadata configuration for the domain. This file contains properties such as, domain name, domain identifier, and so on.
これは役に立ちましたか?