Working with Properties > Property Files > Adding a Custom Service Provider Property File
Adding a Custom Service Provider Property File
Solution Elements
Element
Type
Description
custom.site.xconf
XCONF
XCONF file to add or modify Windchill properties.
Location in module: <customizationRootDirectory>/configurations/xconf/custom.site.xconf
Properties in the wt.properties file to declare your new service provider property file.
wt.services.applicationcontext.WTServiceProviderFromProperties.customPropertyFiles
wt.services.applicationcontext.WTServiceProviderFromProperties.defaultPropertyFiles
wt.services.applicationcontext.TypeBasedServiceProviderFromProperties.defaultPropertyFiles
wt.services.applicationcontext.TypeBasedServiceProviderFromProperties.customPropertyFiles
sitepart.xconf
XCONF
XCONF file to declare your new service provider.
Location in module: <customizationRootDirectory>/module1/main/xconf/ext/sitepart/sitepart.xconf
For more information on properties, see Property Files.
Modular Structure for Customization
<customizationRootDirectory>
├── configurations
│ └── xconf
│ └── custom.site.xconf
└── module1
├── descriptor.xml
└── main
└── xconf
└── ext
└── sitepart
└── sitepart.xconf
Procedure
1. Create a new declarative XCONF file for your new service provider file that contains the entries defining the new services. For example: <customizationRootDirectory>/module1/main/xconf/ext/sitepart/sitepart.xconf.
2. Add the following property in the custom.site.xconf file.
wt.services.applicationcontext.WTServiceProviderFromProperties.customPropertyFiles
Suppose you want to name the new service provider file name as ext/sitepart/sitepart.properties. Specify the property in the following manner:
<AddToProperty name="wt.services.applicationcontext.WTServiceProviderFromProperties.customPropertyFiles" value="ext/sitepart/sitepart.properties" />
The AddtoProperty statement declares that the file ext/sitepart/sitepart.properties (a path relative to the codebase directory) should be added as a value to the wt.services.applicationcontext.WTServiceProviderFromProperties.customPropertyFiles property in the wt.properties file. This step avoids any conflict with the property values when you later install other PTC products that require their own service provider property values.
Deploy Customization on Development Environment
For information on the CCD process for deployment, see Deploy Your Customizations on Your Development Environment
After deployment is complete, an entry for sitepart.xconf is automatically added to <WT_HOME>/declarations.xconf. The sitepart.properties file is created in the <WT_HOME>/codebase/ext/sitepart folder.
這是否有幫助?