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

E13403-04

oracle.jdeveloper.audit.extension
Class ExtensionBean

java.lang.Object
  extended by oracle.jdeveloper.audit.extension.ExtensionBean
Direct Known Subclasses:
Category, Metric, Rule, Transform

public abstract class ExtensionBean
extends java.lang.Object

An abstract base class for a bean defined from an extension manifest.

This class defines methods to get id and extensionId, and to set and get bean and property labels and descriptions. These methods do not follow JavaBeans conventions, to avoid interfering with a subclass that wishes to define a JavaBeans property named, for example, "label".

Subclass properties should be bound, which means in practice that the setters should fire property change events. This class provides a complete set of firePropertyChange methods to make this convenient.

The id "property" is used to identify the bean for purposes of determining equality and for marshalling and unmarshalling instances.


Field Summary
static java.lang.String DESCRIPTION_KEY
          The key for the description of a bean or bean property.
static java.lang.String LABEL_KEY
          The key for the label of a bean or bean property.
static java.lang.String SHORT_LABEL_KEY
          The key for the short label of a bean.
static java.lang.String TIP_KEY
          The key for the tip of a bean or bean property.
 
Constructor Summary
protected ExtensionBean()
          Creates a bean.
protected ExtensionBean(java.lang.String id, java.lang.String extensionId)
          Creates a bean.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
protected  void copyInternalState(ExtensionBean copy, java.util.IdentityHashMap<java.lang.Object,java.lang.Object> context)
          Copies internal subclass state as part of creating a copy of this bean.
 ExtensionBean createCopy(java.util.IdentityHashMap<java.lang.Object,java.lang.Object> context)
          Creates a copy of this bean.
 java.lang.String description()
          Gets the localized description of this bean.
 boolean equals(java.lang.Object object)
           
 java.lang.String extensionId()
          Gets the extension id that defines this bean.
 void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
           
 void firePropertyChange(java.lang.String propertyName, double oldValue, double newValue)
           
 void firePropertyChange(java.lang.String propertyName, float oldValue, float newValue)
           
 void firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
           
 void firePropertyChange(java.lang.String propertyName, long oldValue, long newValue)
           
 void firePropertyChange(java.lang.String propertyName, java.lang.Object[] oldValue, java.lang.Object[] newValue)
           
 void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
           
 java.lang.String formattedString(java.lang.String key)
          Gets a localized string for this bean.
 java.lang.String formattedString(java.lang.String key, java.lang.Object context)
          Gets a localized string for this bean.
 int hashCode()
           
 java.lang.String id()
          Gets the unique identifier of this bean.
 java.lang.String label()
          Gets the localized label of this bean, or null if none.
 java.lang.String labelOrId()
          Gets the localized label of this bean, or the id if none.
 void logError(java.lang.String message, java.lang.Object... parameters)
          Logs an error message related to this extension bean.
 void logWarning(java.lang.String message, java.lang.Object... parameters)
          Logs an error message related to this extension bean.
 java.lang.String propertyDescription(java.lang.String propertyName)
          Gets the localized description of a property of this bean, or null if none.
 java.lang.String propertyLabel(java.lang.String propertyName)
          Gets the localized label of a property of this bean, or null if none.
 java.lang.String propertyString(java.lang.String propertyName, java.lang.String kind)
          Gets a localized string for a property of this bean.
 java.lang.String propertyTip(java.lang.String propertyName)
          Gets the localized tip text of a property of this bean, or null if none.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
protected  void setCompatibilityBundle(java.util.ResourceBundle bundle, java.lang.String prefix)
           
 void setStrings(java.util.Map<java.lang.String,java.lang.String> strings)
          Sets localized strings for this bean.
 java.util.Map<java.lang.String,DeferredSetter> setters()
          Gets the deferred setters for this transform.
 java.lang.String shortLabel()
          Gets the localized short label of this bean, or null if none.
 java.lang.String string(java.lang.String key)
          Gets a localized string for this bean.
 java.util.Map<java.lang.String,java.lang.String> strings()
          Gets the localized strings for this bean.
 java.lang.String tip()
          Gets the localized tip text of this bean, or null if none.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LABEL_KEY

public static final java.lang.String LABEL_KEY
The key for the label of a bean or bean property.

See Also:
labelOrId(), propertyLabel(java.lang.String), Constant Field Values

SHORT_LABEL_KEY

public static final java.lang.String SHORT_LABEL_KEY
The key for the short label of a bean.

See Also:
shortLabel(), Constant Field Values

TIP_KEY

public static final java.lang.String TIP_KEY
The key for the tip of a bean or bean property.

See Also:
tip(), propertyTip(java.lang.String), Constant Field Values

DESCRIPTION_KEY

public static final java.lang.String DESCRIPTION_KEY
The key for the description of a bean or bean property.

See Also:
description(), propertyDescription(java.lang.String), Constant Field Values
Constructor Detail

ExtensionBean

protected ExtensionBean()
Creates a bean. This constructor assumes that the Audit framework will inject values for the id and extensionId fields.


ExtensionBean

protected ExtensionBean(java.lang.String id,
                        java.lang.String extensionId)
Creates a bean.

Parameters:
id - The unique identifier of this bean.
extensionId - The id of the extension which created this bean.
Method Detail

createCopy

public ExtensionBean createCopy(java.util.IdentityHashMap<java.lang.Object,java.lang.Object> context)
                         throws java.lang.reflect.InvocationTargetException
Creates a copy of this bean. The copy is created as follows:

Parameters:
context - A map which allows subclasses to preserve object identity when copying a graph of extension beans.
Returns:
A copy of this bean.
Throws:
java.lang.reflect.InvocationTargetException

copyInternalState

protected void copyInternalState(ExtensionBean copy,
                                 java.util.IdentityHashMap<java.lang.Object,java.lang.Object> context)
                          throws java.lang.reflect.InvocationTargetException
Copies internal subclass state as part of creating a copy of this bean.

Parameters:
copy - The partially initialized copy.
context - A map which allows subclasses to preserve object identity when copying a graph of extension beans.
Throws:
java.lang.reflect.InvocationTargetException
See Also:
createCopy(java.util.IdentityHashMap)

id

public java.lang.String id()
Gets the unique identifier of this bean.


extensionId

public java.lang.String extensionId()
Gets the extension id that defines this bean.


setters

public java.util.Map<java.lang.String,DeferredSetter> setters()
Gets the deferred setters for this transform.


logError

public void logError(java.lang.String message,
                     java.lang.Object... parameters)
Logs an error message related to this extension bean.


logWarning

public void logWarning(java.lang.String message,
                       java.lang.Object... parameters)
Logs an error message related to this extension bean.


labelOrId

public final java.lang.String labelOrId()
Gets the localized label of this bean, or the id if none.

See Also:
label()

label

public java.lang.String label()
Gets the localized label of this bean, or null if none.

See Also:
LABEL_KEY

shortLabel

public java.lang.String shortLabel()
Gets the localized short label of this bean, or null if none.

See Also:
SHORT_LABEL_KEY

tip

public java.lang.String tip()
Gets the localized tip text of this bean, or null if none.

See Also:
TIP_KEY

description

public java.lang.String description()
Gets the localized description of this bean. If not set, gets null. The typical use of the description is in a help text area; HTML markup is expected.

See Also:
DESCRIPTION_KEY

propertyLabel

public java.lang.String propertyLabel(java.lang.String propertyName)
Gets the localized label of a property of this bean, or null if none.

See Also:
LABEL_KEY

propertyTip

public java.lang.String propertyTip(java.lang.String propertyName)
Gets the localized tip text of a property of this bean, or null if none.

See Also:
TIP_KEY

propertyDescription

public java.lang.String propertyDescription(java.lang.String propertyName)
Gets the localized description of a property of this bean, or null if none.

See Also:
TIP_KEY

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

setCompatibilityBundle

protected void setCompatibilityBundle(java.util.ResourceBundle bundle,
                                      java.lang.String prefix)

string

public java.lang.String string(java.lang.String key)
Gets a localized string for this bean.

Parameters:
key - the bean-defined kind of the localized string to get.

formattedString

public java.lang.String formattedString(java.lang.String key)
Gets a localized string for this bean.

Parameters:
key - the bean-defined key of the localized string to get.

formattedString

public java.lang.String formattedString(java.lang.String key,
                                        java.lang.Object context)
Gets a localized string for this bean.

Parameters:
key - the bean-defined key of the localized string to get.
context - the context

setStrings

public void setStrings(java.util.Map<java.lang.String,java.lang.String> strings)
Sets localized strings for this bean.


strings

public java.util.Map<java.lang.String,java.lang.String> strings()
Gets the localized strings for this bean.


propertyString

public java.lang.String propertyString(java.lang.String propertyName,
                                       java.lang.String kind)
Gets a localized string for a property of this bean.

Parameters:
kind - the bean-defined kind of localized string to get.
propertyName - the name of the property.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               java.lang.Object oldValue,
                               java.lang.Object newValue)

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               java.lang.Object[] oldValue,
                               java.lang.Object[] newValue)

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               boolean oldValue,
                               boolean newValue)

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               int oldValue,
                               int newValue)

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               long oldValue,
                               long newValue)

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               float oldValue,
                               float newValue)

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               double oldValue,
                               double newValue)

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.