|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.prefs.registry.PrefsRegistry
@Deprecated public class PrefsRegistry
This class is responsible for managing the Preferences Registry. The Preference
Registry consists of two parts. The first is the Registry of Localized
Preference data such as Perference Names, Descriptions and so forth. The
second part is the Preference Meta-Data such as information on the type of
Preference, The UI Renderer etc. Most methods will require a Fully Qualified
keyname as an argument. A Fully Qualified Preference keyname is of the form:
/wt/prefs/delegates/DelegateOrderThe prefRegisty[_XX_YY].class files (where optionally the XX is the language and YY is the country, such as prefRegistry_en_US.class) will exist for each of the supported locales in Windchill, and contain the Preference Localized Data for all Preferences shipped with the Windchill product. The custRegistry is the customized registry. Windchill provides an empty custRegistry.rbInfo file which may be customized by the customizers to meet the locale requirements of a customer. Any key may exist in both the customized registry and the preference registry, however the customized value will be retrieved first if it exists and will supercede the Windchill registry entry. This is useful if a customer wishes to expand/decrease the information provided for a preference, or rename a preference from the client side. See the registry rbInfo files for details on the correct format to use for the key/names if creating entries in the rbInfo files. Instructions on the compiling rbInfo files should be located in the Windchill Customizers Guide.
Along with Preference Registry rbInfo files, there are a pair of properties
files which are used to store non-localized data which may be required for
the use of certain preferences. This may include information such as a
class name to invoke for the given preference, a Preference Type etc. These files
are located in the wt/prefs/registry under the codebase folder and are called:
Like the registry files, these files will load the Preference properties
first followed by the customization properties second overriding any
properties that are in common. Thus the customized file has the 'final say'
on the given property. The format of the property values are described in
the properties files themselves. Values may be retrieved using the
getValue(String,[String]) methods below.
Alternatively, a grouping
of properties may be obtained via the
getValues(String,String) method.
The properties files can be reloaded dynamically at runtime without having
to shutdown the MethodServer and restarting by invoking the method
reloadProperties() or by invoking this class from the command
prompt (if in a development environment) using java
wt.prefs.registry.PrefsRegistry
Supported API: true
Extendable: false
| Method Summary | |
|---|---|
static String |
getLocalizedDescription(String keyname,
Locale aLocale)
Deprecated. |
static String |
getLocalizedName(String keyname,
Locale aLocale)
Deprecated. |
static String |
getLocalizedShortDescription(String keyname,
Locale aLocale)
Deprecated. |
static String |
getLocalizedValue(String keyname,
String constant,
Locale locale)
Deprecated. |
static HashMap |
getLocalizedValues(String keyname,
String constant,
Locale locale)
Deprecated. |
static Vector |
getRegistryKeys()
Deprecated. |
static String |
getValue(String keyname,
String suffix)
Deprecated. |
static HashMap |
getValues(String keyname,
String suffix)
Deprecated. |
static void |
initializeProperties()
Deprecated. |
static void |
main(String[] args)
Deprecated. |
static void |
reloadProperties()
Deprecated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static final String getLocalizedName(String keyname,
Locale aLocale)
keyname - The preference key.aLocale - The locale of the key
public static final String getLocalizedDescription(String keyname,
Locale aLocale)
keyname - The preference key.aLocale - The locale of the key
public static final String getLocalizedShortDescription(String keyname,
Locale aLocale)
keyname - The preference key. Do not have suffix.aLocale - The locale of the key
public static Vector getRegistryKeys()
SUFFIX_TOKEN
will be parsed off. Essentially, it returns a vector of all the keys
for which there is some registry entry for.
public static String getLocalizedValue(String keyname,
String constant,
Locale locale)
keyname - The fully Qualified Preference Key name.constant - The constant (either defined above or not). Following constants are suppported:
TYPE, DISPLAY_NAME, DESCRIPTION, SHORT_DESCRIPTION, DEFAULT, VALID_VALUES, USER_VISIBLElocale - The locale for the value
public static HashMap getLocalizedValues(String keyname,
String constant,
Locale locale)
/wt/test/Sample%VALID_VALUES=ACCEPT_BUTTON,DENY_BUTTONgetLocalizedValues() method
would expect a keyname of /wt/test/Sample
and a constant of %VALID_VALUES. This would then be queried
in the properties files. The values ACCEPT_BUTTON and
DENY_BUTTON would then be requested from the registry under the
registry key of /wt/test/Sample%VALID_VALUES.ACCEPT_BUTTON
for example, and this value would be placed in the HashMap.
keyname - The name of the preference keyconstant - The optional constant to append to the keylocale - The locale of the Preference values.
public static final String getValue(String keyname,
String suffix)
keyname - The key name for the preference.suffix - The optional suffix (without the SUFFIX_TOKEN)
public static HashMap getValues(String keyname,
String suffix)
/wt/test/Sample%VALID_VALUES=ACCEPT_FLAG,DENY_FLAGACCEPT_FLAG and DENY_FLAG) these properties are
looked up in the Prefernce Property files. Any values found will be returned
in the map. If the value can not be found, the map will contain the value
obtained from the reference (for example ACCEPT_FLAG) for both
the map key and value.
%VALID_VALUES
was used, however any suffix is valid.
keyname - The keyname to retrievesuffix - The suffix to retrive the information under.
public static void initializeProperties()
throws IOException
IOException - Thrown if there is an error reading the files.
public static void reloadProperties()
throws IOException,
WTException
IOException - Thown if there is an error reading the files.
WTExceptionpublic static void main(String[] args)
args - (ignored)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||