Customizing service.properties
The service delegate mechanism uses Java property files to specify the delegates that are used for each service for a given set of criteria. The main property file is named service.properties and is located in /Windchill/codebase/.
Instead of adding new entries to the service.properties file, or overriding existing entries in it, use a separate file. This file must have entries with the same format as those in service.properties. To use the new property file, add the file’s full path (relative to the system classpath) to a comma-separated list of files in the following property located in wt.properties:
wt.services.applicationcontext.WTServiceProviderFromProperties.
customPropertyFiles
Consider the example of creating a new wt.identity.DisplayIdentification delegate. The DisplayIdentification service is an interface that defines methods for creating strings that identify an object for user interface display purposes. In service.properties, several entries exist for the DisplayIdentification service, as follows:
* 
Indentation in this example indicates a continuation of the preceding line, necessary for presentation in the manual. The entry for each property in a property file can be on only one line.
Each entry maps a class or interface, such as wt.part.WTPart, to a class that implements the interface wt.identity.DisplayIdentification, such as wt.identity.DisplayIdentificationWTPartDelegate. If a customization includes a subclass of WTPart named AcmePart, and that part has different display identification needs than WTPart, a new delegate must be implemented. After the delegate class is implemented, it is used only when the correct entry has been added to a service delegate property file. To do so, perform the following steps:
1. Create a new property file named acme_part_services.properties to contain all entries for service delegates that apply to the AcmePart class.
2. Put this property file in a directory where it will not be deleted if your Windchill installation is reinstalled or upgraded, for example: <Windchill>/src/com/acme/part. Place a copy in <Windchill>/codebase/com/acme/part.
3. Add the name of the new property file to the list of files specified in the wt.properties file property named wt.services.applicationcontext.WTServiceProviderFromProperties.customPropertyFiles, using the following procedure:
a. Create a new declarative xconf file, for example, <Windchill>/src/com/acme/part/acme_part_services.xconf that looks like the following:
b. Modify the customPropertyFiles property in <Windchill>/codebase/wt.properties and generate the acme_part_services.properties file by executing the new xconf file from a windchill shell as follows:
xconfmanager -i
src/com/acme/part/acme_part_services.xconf -p
4. Restart the method server in order for the change to take effect.
도움이 되셨나요?