CentraSite Documentation : CentraSite Developer's Guide : Pluggable Architecture : Customizing Content Pages : Extension Points : Extend Search Dialog by Additional Conditions
Extend Search Dialog by Additional Conditions
Usage
Extend the search dialog by additional conditions, for example, you can add specific search predicates for your own object types.
Attributes
*point="com.centrasite.control.searchPredicate"
*id
*class
Interface
PredicateEditor
*Predicate getPredicate()
(Get predicate to be added by this editor)
*String getLayout()
(Get URL of layout to be rendered)
*String getAdapterClass()
(Get name of adapter class to be used for rendering, must be a subclass of AbstractPredicateAdapter)
*String getPredicateClass()
(Get name of predicate class to be used for rendering, must be a subclass of AbstractPredicate)
The interface Predicate (many implementing classes are already available in CentraSiteUtils.jar) with its abstract subclass AbstractPredicate has the following methods:
*boolean appliesTo(String objectTypeValue, CentraSiteQueryManager qm)
(Check whether this predicate applies to objects of given object type)
*String getInternalType ()
(Get unique internal string representation of type of predicate; not to be localized. You may use a namespace-like notation for your own.)
*String getDisplayType ()
(Get human readable localized representation of type of predicate; CentraSite Control will display it on the left hand side in the Add Condition dialog)
*void validate() throws InvalidPredicateException
(Validate parameters set for this predicate. The InvalidPredicateException should contain a localized message text)
*String getDisplayString () throws Exception
(Get human readable localized string representation of predicate including values predicate; CentraSite Control will display it in the condition table in the header section of the Search Registry dialog)
*boolean requiresEnterpriseLicense()
(Check whether this predicate requires an Enterprise license)
*void addTo (BusinessQuery bq) throws JAXRException
(Add contribution of predicate to given BusinessQuery. This is the worker method applying the predicate to the search result.)
AbstractPredicate also provides implementations for the following methods:
*Used for I18N support
*Locale getLocale()
*Void setLocale(Locale)
*used for persisting predicates as part of queries.
*String toXML ();
*void setFromDom(Element predicateEement, Connection connection)
*used to initialize the search dialog with readonly predicates/conditions which can neither modified or removed:
*void setReadOnly(boolean readOnly);
*boolean isReadOnly();
Abstract base class
AbstractPredicateEditor
Processing
*When you click the appropriate button, this invokes the user-defined Adapter (layout) screen for entering custom search related settings.
*Create an instance of the class
*Execute
Provided by
CentraSite Control
Example
<extension point="com.centrasite.control.searchPredicate"
id="ObjectTypePredicateEditor"
class="com.centrasite.control...ObjectTypePredicateEditor">
</extension>
Copyright © 2005-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback