|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPropertyTypeFilter
Interface which allows custom property type filtering, for specified Java property container types. The property types can be used when filtering both '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 type 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 'property type' which does not implement IFilter, such as Calendar or Date. This support will automatically extend to allow filtering on all the JavaBean properties of the specified property type. For example, Calendar getModifiedDate(), and any other methods returning Calendar.
Basically, this specifies a custom IFilter implementation defining IFilter.accept( ContentContext, T ) where T is a property value of one of the supported property types, NOT an object value, for one or more supported Java property container types (such as Node, VirtualNode, etc).
In this context, 'property types' refers to the return value of JavaBean methods on the Java class, not to a CM Node ObjectClass type.
For example, the com.bea.content.Node type has several methods which return a Calendar type, and this type is not normally filterable. One could add support for filtering the Calendar type for specific container types, such as com.bea.content.Node, and com.bea.content.virtual.version.Version. The implementation might define support for the EQUALS and NOT_EQUALS filter methods. In this case, the Filter method would be IFilter.accept( ContentContext, Object propVal ) where propVal would be invoked with type Calendar.
Field Summary | |
---|---|
static ContextKey |
PROPERTY_TYPE_FILTER_KEY
CONTEXT KEYS (optional) specifies an ordered List |
Method Summary | |
---|---|
Set<FilterMethod> |
getFilterMethods(ContentContext context,
Class<?> propertyContainerTypeClass,
Class<?> propertyTypeClass)
For the specified property container Java type, such as com.bea.content.Node, and the specified property type, such as java.util.Calendar, which com.bea.p13n.pagination.FilterMethod filter methods are supported? |
Set<Class> |
getPropertyTypes(ContentContext context,
Class<?> propertyContainerTypeClass)
For the specified property container Java type, which property types does this filter support? |
void |
setState(ContentContext context,
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_TYPE_FILTER_KEY
For example, one could add filtering capabilities for all properties of type 'Calendar', regardless of the property name.
A set of IPropertyTypeFilter(s) is provided by default; this key lets you add additional IPropertyTypeFilter obbjects.
Multiple IPropertyTypeFilter(s) can apply for a given type, such as Node.
Method Detail |
---|
Set<Class> getPropertyTypes(ContentContext context, Class<?> propertyContainerTypeClass) throws RepositoryException
A property type filter can support multiple property types, such as java.lang.String and java.util.Calendar.
The property container type class may be any of those returned by ITypeSupport.getSupportedTypes( ContentContext ).
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, Class<?> propertyTypeClass) throws RepositoryException
The property container type class may be any of those returned by ITypeSupport.getSupportedTypes( ContentContext ). The property type class may be any of those returned by getSupportedPropertyTypes( ContentContext, Class ).
Must return a Set, though the Set can be empty. NULL is not a valid return value.
RepositoryException
void setState(ContentContext context, FilterMethod filterMethod, String filterString, Locale filterLocale) throws RepositoryException
RepositoryException
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |