Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

oracle.ide.db
Class PropertyDisplayRegistry

java.lang.Object
  extended by oracle.ide.db.PropertyDisplayRegistry

public final class PropertyDisplayRegistry
extends java.lang.Object

Registry of displayable Strings for properties and property values.

Since:
11

Nested Class Summary
static class PropertyDisplayRegistry.Plugin
          This class facilitates the PropertyDisplayRegistry's extensibility.
 
Method Summary
static java.lang.String getDisplayName(java.lang.String propName)
          Returns a displayable (translated) name for the given property.
static java.lang.String getDisplayName(java.lang.String propName, DBObjectProvider pro, DBObject obj)
          Returns a displayable (translated) name for the given property in the context of the given provider.
static PropertyDisplayRegistry getInstance()
           
static java.lang.String getPropValueDisplay(java.lang.String propName, java.lang.Object value)
          Returns a displayable (translated) name for the given property value.
 void registerBundle(java.util.ResourceBundle bundle)
          Registers a bundle of diplay names.
 void registerDisplayName(java.lang.String propName, java.lang.String displayName)
          Registers a display name for the given property name.
 void registerPlugin(PropertyDisplayRegistry.Plugin plugin)
          Registers a new plugin to this registry that provides display names for properties.
 boolean unregisterBundle(java.util.ResourceBundle bundle)
          Unregisters the given bundle of display names.
 boolean unregisterPlugin(PropertyDisplayRegistry.Plugin plugin)
          Unregisters the given registry plugin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static PropertyDisplayRegistry getInstance()

getDisplayName

public static final java.lang.String getDisplayName(java.lang.String propName)
Returns a displayable (translated) name for the given property.


getDisplayName

public static final java.lang.String getDisplayName(java.lang.String propName,
                                                    DBObjectProvider pro,
                                                    DBObject obj)
Returns a displayable (translated) name for the given property in the context of the given provider. Whilst most properties have a generic name, some are specific to a provider.

Parameters:
propName - the property name to look up
pro - the DBObjectProvider implementation
obj - the object the property is on

getPropValueDisplay

public static final java.lang.String getPropValueDisplay(java.lang.String propName,
                                                         java.lang.Object value)
Returns a displayable (translated) name for the given property value.

Parameters:
propName - the name of the property (single name only, not a property path).
value - the property value
Returns:
a translated string to represent the property value in the UI, or the property value as a String if no translated version is available.

registerBundle

public void registerBundle(java.util.ResourceBundle bundle)
Registers a bundle of diplay names. The bundle keys must be the property name to look up. Built in (API) property names cannot be overriden.

When registering new properties, ensure they are included in the API metadata if appropriate.

Parameters:
bundle - the bundle of names to register.
See Also:
Metadata.registerProperty(java.lang.String, java.lang.Class, java.lang.Class, java.lang.Class...)

unregisterBundle

public boolean unregisterBundle(java.util.ResourceBundle bundle)
Unregisters the given bundle of display names.


registerDisplayName

public void registerDisplayName(java.lang.String propName,
                                java.lang.String displayName)
Registers a display name for the given property name. This should be used as a last resort if it is inappropriate to register a new ResourceBundle.

When registering new properties, ensure they are included in the API metadata if appropriate.

See Also:
Metadata.registerProperty(java.lang.String, java.lang.Class, java.lang.Class, java.lang.Class...)

registerPlugin

public void registerPlugin(PropertyDisplayRegistry.Plugin plugin)
Registers a new plugin to this registry that provides display names for properties.

See Also:
PropertyDisplayRegistry.Plugin

unregisterPlugin

public boolean unregisterPlugin(PropertyDisplayRegistry.Plugin plugin)
Unregisters the given registry plugin.


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

Copyright © 1997, 2010, Oracle. All rights reserved.