|
AdobeBridgeCS5SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--CustomSearchExtensionHandler
Demonstrates how to implement a custom node search with a node-handling extension.
Shows how to implement an ExtensionHandler and ExtensionModel with customized search over a node hierarchy. This sample uses SearchDefinition, SearchCriteria, SearchSpecification and SearchCondition objects from the Bridge scripting DOM to implement the custom search features.
The getSearchDefinition() method in the script-defined ExtensionModel returns a SearchDefinition object, which Bridge uses to display a customized Find dialog. The Find dialog has 3 sections; the Source section, the Criteria section and the Results section.
The Source section shows the current thumbnail, at which to start the search.
In the Criteria section, each of the 3 elements is customized using SearchCriteria and Operand objects. Custom search field values include 'Custom String' and 'Custom Boolean'.
The Results section displays two custom check boxes, "SDKSearch: Search subfolders" and "SDKSearch: Search hidden files". If you select "SDKSearch: Search subfolders" the search is performed recursively through subfolders. (The other checkbox is not considered.)
This search only supports "OR" searches; you can expand it to include "AND" searches.
The script-defined node extensions are defined by two supporting classes, SDKSystem and SDKNode; see the documentation on these classes for more detail on their capabilities.
The run() function of this sample creates several nodes of the type SDKNode, and one manager (SDKSystem) object. It stores the node-identifying prefix and root node in the SDKSystem (manager) object.
The run() function also creates the ExtensionHandler object, whose definition includes the 'makeModel()' method, which Bridge uses to create the ExtensionModel object at node-display time. The run() function also registers the ExtensionHandler, associating it with the node-identifying prefix.
See the Adobe Bridge CS5 JavaScript Guide for more details of node-handling mechanisms
you can implement.
See:
Field Summary | |
String |
requiredContext
The context in which this sample can run. |
Constructor Summary | |
CustomSearchExtensionHandler()
|
Method Summary | |
Boolean
|
canRun()
Determines whether sample can be run given current context. |
Object
|
initModel(csModel, sys)
Initialize the model and define the methods that this model supports |
Boolean
|
run()
Functional part of this sample, creates several nodes of the type SDKNode, and one manager (SDKSystem) object, which stores the node-identifying prefix and root node. |
Field Detail |
String requiredContext
Constructor Detail |
CustomSearchExtensionHandler()
Method Detail |
Boolean canRun()
Object initModel(csModel, sys)
sys
- The manager object for the handled nodes
behModel
- The model for the handled nodes
Boolean run()
Also creates the ExtensionHandler object, whose definition includes the 'makeModel()' method, which Bridge uses to create the ExtensionModel object at node-display time.
The handler defines the getBridgeUriForSearch() method, and the model defines the getSearchDefinition() method, which together implement the custom search. Registers the ExtensionHandler, associating it with the node-identifying prefix.
|
AdobeBridgeCS5SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |