|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPropertyFilter
Interface which allows custom property filtering, for specified Java property container types and specified JavaBean properties. JavaBean properties can be any combination of 'standard properties' and 'extended properties' (added by a PropertyProvider).
An overview of custom sorting and filtering is provided in the package documentation at com.bea.content.paging
NOTE: custom property filters are designed for small datasets (narrow queries returning a hundred or less objects). They may not scale well for large datasets.
Use this interface when you want to add support for filtering (or override existing support for filtering) a specific property, such as String getName(), on a specific Java type, such as com.bea.content.Node.
Basically, this specifies a custom IFilter<T> implementation defining IFilter.accept( ContentContext, T ) where T is the property value, NOT the object value, for some combination the following: - one or more Java types (such as Node, VirtualNode, etc) - one or more JavaBean properties on these Java types. (such as Node.getName, etc)
This can be used to override an existing filtering approach for specific properties, and do something special.
At most one property on one type will be filtered on at a time.
For example, one might write an IPropertyFilter to override the default filtering of the String 'name' property on com.bea.content.Node, to ignore nodes with Node names starting with 'test'. In this case, the Filter method would be IFilter.accept( ContentContext, String propVal )
Field Summary | |
---|---|
static ContextKey |
PROPERTY_FILTER_KEY CONTEXT KEYS (optional) specifies an ordered List<IPropertyFilter> used for filtering. |
Method Summary | |
---|---|
Set<FilterMethod> |
getFilterMethods(ContentContext context, Class<?> propertyContainerTypeClass, String propertyName) For the specified Java type, and the specified property name, which filter methods are valid? |
Set<String> |
getFilterProperties(ContentContext context, Class<?> propertyContainerTypeClass) For the specified Java type, which JavaBean properties does this property filter support? a property filter can support multiple JavaBean properties on a specified Java type. |
void |
setState(ContentContext context, String propertyName, FilterMethod filterMethod, String filterString, Locale filterLocale) called BEFORE the filter.accept() method is invoked, to configure the filter state |
Methods inherited from interface com.bea.content.paging.internal.IFilter |
---|
accept |
Methods inherited from interface com.bea.content.paging.internal.ITypeSupport |
---|
getSupportedTypes |
Field Detail |
---|
static final ContextKey PROPERTY_FILTER_KEY
A set of IPropertyFilter(s) is provided by default; this key lets you add additional IPropertyFilter obbjects.
Multiple IPropertyFilter(s) can apply for a given type, such as Node. A single IPropertyFilter can apply for a given property on a type.
Method Detail |
---|
Set<String> getFilterProperties(ContentContext context, Class<?> propertyContainerTypeClass) throws RepositoryException
The property container type class may be any of those returned by ITypeSupport.getSupportedTypes( ContentContext ).
For example, a single IPropertyFilter implementation class might support custom filtering on the 'name' and 'modifiedDate' properties of com.bea.content.Node, and the 'path' property of com.bea.content.ObjectClass.
At most one of these properties will be filtered upon at any given time.
Must return a Set, though the Set can be empty. NULL is not a valid return value.
RepositoryException
Set<FilterMethod> getFilterMethods(ContentContext context, Class<?> propertyContainerTypeClass, String propertyName) throws RepositoryException
The property container type class may be any of those returned by ITypeSupport.getSupportedTypes( ContentContext ). The property name may be any of those returned by getFilterProperties( ContentContext, Class ).
Must return a Set, though the Set can be empty. NULL is not a valid return value.
RepositoryException
void setState(ContentContext context, String propertyName, FilterMethod filterMethod, String filterString, Locale filterLocale) throws RepositoryException
RepositoryException
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010, Oracle. All rights reserved.