com.sage.swt.client.customization
Class QueryFieldsPropertyResolver

java.lang.Object
  extended by com.sage.swt.client.customization.QueryFieldsPropertyResolver
All Implemented Interfaces:
PropertyResolver

public class QueryFieldsPropertyResolver
extends java.lang.Object

A property resolver for properties with QueryFieldList values (in other words, the value is a list rather than an "atomic" value).

This property resolver looks at each property provider that has a proposed QueryFieldList value. The resolver will create a resolved value that contains only those items that show up in every proposed value. In other words, the resolved QueryFieldList value is the intersection of all proposed QueryFieldList values.


Constructor Summary
QueryFieldsPropertyResolver(Property property)
          Constructs a property resolver for the specified property that has a QueryFieldList value.
 
Method Summary
 void addPropertyProvider(PropertyProvider propertyProvider)
           Adds an associated property provider to this resolver.
protected  Property getProperty()
          Gets the property whose value this property resolver will set.
protected  java.util.List<PropertyProvider> getPropertyProviders()
          Gets the list of property providers associated with this property resolver.
 java.lang.Object getPropertyValue(PropertyBag propertyBag)
           Gets the resolved value of the property associated with this resolver.
 void removePropertyProvider(PropertyProvider propertyProvider)
          Removes an associated property provider from this resolver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryFieldsPropertyResolver

public QueryFieldsPropertyResolver(Property property)
Constructs a property resolver for the specified property that has a QueryFieldList value.

Parameters:
property - The property whose (QueryFieldList) value this property resolver will set.
Method Detail

getPropertyValue

public java.lang.Object getPropertyValue(PropertyBag propertyBag)

Gets the resolved value of the property associated with this resolver.

This property resolver looks at each property provider that has a proposed QueryFieldList value. The resolver will create a resolved value that contains only those items that show up in every proposed value. In other words, the resolved QueryFieldList value is the intersection of all proposed QueryFieldList values.

Specified by:
getPropertyValue in interface PropertyResolver
Parameters:
propertyBag - The property bag with the property whose value we want to resolve.
Returns:
The resolved value of the property.

addPropertyProvider

public void addPropertyProvider(PropertyProvider propertyProvider)

Adds an associated property provider to this resolver.

When resolving the value of a property, a property resolver implementation may take into account the order in which property providers are added. For example, a property resolver implementation may have a rule that the last provider added that happens to want to set the property's value "wins".

Specified by:
addPropertyProvider in interface PropertyResolver
Parameters:
propertyProvider - The property provider to associate with this resolver.

removePropertyProvider

public void removePropertyProvider(PropertyProvider propertyProvider)
Removes an associated property provider from this resolver.

Specified by:
removePropertyProvider in interface PropertyResolver
Parameters:
propertyProvider - The property provider to associate with this resolver.

getProperty

protected Property getProperty()
Gets the property whose value this property resolver will set.

Returns:
The property whose value this property resolver will set.

getPropertyProviders

protected java.util.List<PropertyProvider> getPropertyProviders()
Gets the list of property providers associated with this property resolver. The ordering for this list is insertion order.

Returns:
The list of property providers associated with this property resolver.


Copyright © 2011 Sage Software, Inc. All rights reserved.