| java.lang.Object net.sf.jmoney.model2.PropertySet
PropertySet | abstract public class PropertySet (Code) | | A PropertySet contains information about a
property set. A property set is a set of properties
that either:
- form the base set of properties in a data model object
- or are the properties added to a data model object
by a derived class (such property sets are known as
derived property sets)
- or are the properties added to a data model object by
a plug-in (such property sets are know as extension
property sets)
The getBasePropertySet and isExtension methods
can be called to determine in which of the above three categories
a property set lies.
See Also: Property Set Documentation See Also: Property Set Documentation Parameters: E - the type of the implementation object, which must beeither an ExtendableObject or an ExtensionObject author: Nigel Westbury |
Method Summary | |
public static ExtendablePropertySet<E2> | addBaseAbstractPropertySet(Class<E2> classOfImplementationObject, String description) | public static ExtendablePropertySet<E2> | addBaseFinalPropertySet(Class<E2> classOfImplementationObject, String description, IExtendableObjectConstructors<E2> constructors) | public static ExtendablePropertySet<E> | addDerivedAbstractPropertySet(Class<E> classOfImplementationObject, String description, ExtendablePropertySet<? super E> basePropertySet) | public static ExtendablePropertySet<E> | addDerivedFinalPropertySet(Class<E> classOfImplementationObject, String description, ExtendablePropertySet<? super E> basePropertySet, IExtendableObjectConstructors<E> constructors) | public static ExtensionPropertySet<E> | addExtensionPropertySet(Class<E> classOfImplementationObject, ExtendablePropertySet> extendablePropertySet, IExtensionObjectConstructors<E> constructors) | public ScalarPropertyAccessor<V> | addProperty(String name, String displayName, Class<V> classOfValue, int weight, int minimumWidth, IPropertyControlFactory<V> propertyControlFactory, IPropertyDependency<E> propertyDependency) | public ReferencePropertyAccessor<V> | addProperty(String name, String displayName, Class<V> classOfValue, int weight, int minimumWidth, IReferenceControlFactory<E, V> propertyControlFactory, IPropertyDependency<E> propertyDependency) | public ListPropertyAccessor<E2> | addPropertyList(String name, String displayName, ExtendablePropertySet<E2> elementPropertySet, IListGetter<E, E2> listGetter) | public static Collection<ExtendablePropertySet<?>> | getAllExtendablePropertySets() Gets a list of all extendable property sets. | public static Collection<ExtensionPropertySet<?>> | getAllExtensionPropertySets() Gets a list of all extension property sets. | public static ExtendablePropertySet | getExtendablePropertySet(String propertySetId) This method is called when a property set id in plugin.xml references
an extendable property set. | public static ExtensionPropertySet | getExtensionPropertySet(String propertySetId) This method is called when one plug-in wants to access a property
in another plug-in's property set. | public String | getId() | public Class<E> | getImplementationClass() Returns the implementation class for this property set.
The implementation class for a property set is a class that
implements getters and setters for all the properties in
the property set. | abstract protected E | getImplementationObject(ExtendableObject extendableObject) Given an extendable object, return the Java object that contains the
getters and setters for this property set.
If this property set is an extendable property set then this method
should return the passed object as is. | public Collection<ListPropertyAccessor<?>> | getListProperties1() | public Collection<PropertyAccessor> | getProperties1() | public PropertyAccessor | getProperty(String name) Get the property accessor for a property in a
property set.
This method looks in only in the given property set
(it will not look in base property sets or extension
property sets).
Parameters: name - The local name of the property. | public static ExtendablePropertySet<? extends E> | getPropertySet(Class<E> propertySetClass) This method will find the PropertySet object, given the class of an
implementation object. | public Collection<ScalarPropertyAccessor<?>> | getScalarProperties1() | public static void | init() Loads the property sets. | public void | initProperties(String propertySetId) This method is called after all the properties in this property set have
been set. | public boolean | isExtension() | public String | toString() |
isExtension | boolean isExtension(Code) | | |
PropertySet | protected PropertySet()(Code) | | |
getAllExtendablePropertySets | public static Collection<ExtendablePropertySet<?>> getAllExtendablePropertySets()(Code) | | Gets a list of all extendable property sets.
the collection of all property sets |
getAllExtensionPropertySets | public static Collection<ExtensionPropertySet<?>> getAllExtensionPropertySets()(Code) | | Gets a list of all extension property sets.
the collection of all property sets |
getExtensionPropertySet | public static ExtensionPropertySet getExtensionPropertySet(String propertySetId) throws PropertySetNotFoundException(Code) | | This method is called when one plug-in wants to access a property
in another plug-in's property set. Callers must be able to handle
the case where the requested property set is not found. The plug-in
must catch PropertySetNotFoundException and supply appropriate behavior
(not an error from the user's perspective).
|
getId | public String getId()(Code) | | The globally unique id of the property set. |
getImplementationClass | public Class<E> getImplementationClass()(Code) | | Returns the implementation class for this property set.
The implementation class for a property set is a class that
implements getters and setters for all the properties in
the property set. Implementation classes for property sets
have a few other rules they must follow too. For example,
certain constructors must be provided and they must extend
either ExtendableObject or ExtensionObject.
See the documentation on property set implementation classes
for further information.
See Also: doc See Also: on implemetation classes the implementation class |
getImplementationObject | abstract protected E getImplementationObject(ExtendableObject extendableObject)(Code) | | Given an extendable object, return the Java object that contains the
getters and setters for this property set.
If this property set is an extendable property set then this method
should return the passed object as is. If this property set is an
extension property set then this method should get the appropriate
extension object.
Parameters: extendableObject - |
getProperties1 | public Collection<PropertyAccessor> getProperties1()(Code) | | An iterator that iterates over all propertiesin this property set, returning, for each property,the PropertyAccessor object for that property. |
getProperty | public PropertyAccessor getProperty(String name) throws PropertyNotFoundException(Code) | | Get the property accessor for a property in a
property set.
This method looks in only in the given property set
(it will not look in base property sets or extension
property sets).
Parameters: name - The local name of the property. This name does notinclude the dotted prefix. |
getPropertySet | public static ExtendablePropertySet<? extends E> getPropertySet(Class<E> propertySetClass)(Code) | | This method will find the PropertySet object, given the class of an
implementation object. The given class must be an implementation of ExtendableObject
(The class may not be an implementation of an extension
property set).
This method should be called when we have an object, but we do not know
exactly of what derived class the object is. By calling this method,
we can get the actual set of properties for this object.
For example, if one wants to display the properties for
a CapitalAccount object, then call this method to get the property
set for the actual object and you will then see properties for
this particular object (bank account properties if the object
is a bank account, credit card account properties if the
object is a credit card account and so on).
|
init | public static void init()(Code) | | Loads the property sets.
All property sets (both base and extensions) are added to the
net.sf.jmoney.fields extension point.
|
initProperties | public void initProperties(String propertySetId)(Code) | | This method is called after all the properties in this property set have
been set. It completes the initialization of this object.
This cannot be done in the constructor because there may be circular references
between property sets, properties in those property sets, and property sets for
the objects referenced by those properties.
Parameters: propertySetId - |
isExtension | public boolean isExtension()(Code) | | |
|
|