|
Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPropertyProvider
Interface to expose one or more 'extended' properties, for specified Java property container types. These extended properties can then be used when sorting and filtering.
An overview of custom sorting and filtering is provided in the package documentation
at com.bea.content.paging
NOTE: custom property providers 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 sort and filter on new dimensions for a given Java property container type.
You could also use this interface if you want to expose custom ObjectClass type-specific properties, as sortable and filterable properties.
Basically, the implementation lists which 'extended' properties it exposes, and defines how to produce a property value (such as the String 'objectClassName' property), given an object of one or more property container type (such as com.bea.content.Node).
For example, suppose you want to sort com.bea.content.Node objects on objectClassName, but there is no String getObjectClassName() method available which provides this property. You could write an IPropertyProvider which exposed an 'objectClassName' property, and compute the property value by calling aNode.getType().getName(). After doing this, and registering the PropertyProvider, you could then sort Nodes on this property.
Extended properties, as well as all standard properties, can be used when searching (if the property type is Comparable or has a custom sorting support), and filtering (if the property type implements IFilter or has custom filtering support).
During retrieval, three methods are called.
NOTE: the impementation class should define its public property accessor methods with no arguments such as public String getObjectClassName( ) {...} The type extension system will invoke these methods via reflection.
Field Summary | |
---|---|
static ContextKey |
PROPERTY_PROVIDER_KEY
CONTEXT KEYS (optional) specifies an ordered List |
Method Summary | |
---|---|
Map<String,PropertyDescriptor> |
getExtendedProperties(ContentContext context,
Class propertyContainerTypeClass)
For the specified property container Java type, which 'extended' properties does this provider supply, and what method can be invoked to supply each extended property? |
void |
reset()
called AFTER the retrieval method is invoked, to notify the implementation class so it can release its state. |
void |
setState(ContentContext context,
Object obj)
called BEFORE the retrieval method is invoked, to configure the provider state. |
Methods inherited from interface com.bea.content.paging.internal.ITypeSupport |
---|
getSupportedTypes |
Field Detail |
---|
static final ContextKey PROPERTY_PROVIDER_KEY
Method Detail |
---|
Map<String,PropertyDescriptor> getExtendedProperties(ContentContext context, Class propertyContainerTypeClass) throws RepositoryException
A property provider can support multiple properties, such as String getObjectClassName() and int getSomeExternalSystemIndex().
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
void setState(ContentContext context, Object obj) throws RepositoryException
RepositoryException
void reset() throws RepositoryException
RepositoryException
|
Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |