Application Context Service/Resource Properties
These are properties, generally used by a factory class, for locating a delegate, service, or resource. They have one of the following formats:
wt.services/svc/default/<Service Type>/< Selector >|null/<Requestor>/<Service
Priority Number>=<Service Class Name>/<duplicate or singleton>
or
wt.services/rsc/default/<Resource Type>/<Selector>|null/<Requestor>/<Service
Priority Number>=<Resource Name>
The first format is used to locate a Java service or delegate class to perform a function or provide a service. The second format is used to locate a resource file --- for example, a HTML template file or an icon image file
Definitions
Service Type = the type of service or delegate referenced by this property
Resource Type = the type of resource referenced by this property
Selector = an identifier used to specify the context in which this service or resource is to be used (for example, an action name)
Requestor = the object class for which the service, delegate, or resource is to be used
Service Priority Number = a priority rating used to choose between valid delegates (see below)
Service Class Name = name of delegate or service class for the given Service Type, Selector, and Requestor
Resource Name = name or resource for given Resource Type, Selector, and Requestor
Duplicate or singleton = a flag to indicate whether the server should instantiate a shared instance of a delegate class or create a new one for each use. If neither is specified, duplicate will be used.
This is an example property for a template processor:
wt.services/svc/default/wt.enterprise.TemplateProcessor/AddAlternates/
wt.part.WTPartMaster/0=wt.part.AlternatesLocalSearchProcessor/duplicate
where
Service Type = "wt.enterprise.TemplateProcessor"
Selector = the action name "AddAlternates"
Requestor = "wt.part.WTPartMaster"
* 
Any service class that incorporates an HTTPState object should be made duplicate. This would include instances of BasicTemplateProcessor, and FormTaskDelegate, NavBarActionDelegate.
If a factory receives a request for a service or resource class for a given requestor object class but no property entry for that requestor class is found, the factory will attempt to find an entry for the parent class or interface of the requestor class. If no entry for the parent class or interface is found, a search will be made for an entry for the parent of the parent or interface, and so on. It could happen that entries for two or more parent classes or interfaces are found. If the entries have different service priority numbers, the one with the lowest number will be selected. If the entries have the same service priority number, the one selected is arbitrary.
To be loaded correctly at runtime, files containing application context service properties must be listed for one of the following properties in wt.properties:
wt.services.applicationcontext.WTServiceProviderFromProperties.defaultPropertyFiles
wt.services.applicationcontext.WTServiceProviderFromProperties.customPropertyFiles
Property files will be loaded in the order listed, and files listed for defaultPropertyFiles will be loaded before those for customPropertyFiles. If the same property is found in more than one file, the value for the one loaded last will be used. Any custom properties should be placed in the latter list.
Except for the need to separate application context service properties from ordinary properties and the effect of load order, the grouping of properties into various properties files is unimportant to the system and based primarily on ease of maintenance. If a TemplateProcessor property is put in the htmltemplate.properties file instead of service.properties the system will still find it.
Many of the more heavily customized service property files are not created or edited directly but instead are generated from xml files. XML files used to generate property files have the same name as the associated property file but have the additional extension “.xconf”. For example, the XML file used to generate service.properties is called service.properties.xconf. See Managing Customizations for more information on xconf files.
If you need to add application context property entries for your custom HTML clients, we recommend you put them in a new properties file or files used only for your customizations. This file should be added to the list of files for WTServiceProviderFromProperties.customPropertyFiles using the xconfmanager utility. This procedure is described in Managing Customizations .
Est-ce que cela a été utile ?