findObjects (parentKey, filter, callback, errorCallback)
parentKey. Key of the folder within which the object is to be searched.
filter. JSON object that contains search parameters.
callback. The callback procedure.
errorCallback. Callback procedure on error.
The findObjects method finds repository objects by specified parameters.
The following parameters are available for JSON object of the filter parameter:
Levels. Nesting level of the repository folders that take part in search.
IncludeRoot. Search in root folder.
HideEmptyFolders. Hide the folders that do not contain search results.
HideAllFolders. Do not show folders.
Limit. Maximum number of objects included in search results.
HiddenContainers. Do not show containers enumerated in this attribute.
FindInfo : { ... }. Advanced search parameters:
Active: Boolean. Indicates if advanced search parameters are used.
Text: String. Search field.
Attribute: FindInfoAttribute. Search attribute.
CaseSensitive: Boolean. Case sensitivity.
WholeWordsOnly: Boolean. Match whole words.
ScanNestedNamespaces: Boolean. Search in nested objects.
ScanHiddenFolders: Boolean. Search in hidden folders.
ClassId. Search classes.
Classes. Search classes.
Containers. Collection of objects' classes considered as containers.
To execute the example, the page must contain a connection to repository named mb (see Example of Creating the Navigator Component). To the browser console output an array of object descriptions for the objects that meet search conditions:
mb.findObjects(0,
{Filter: {
FindInfo: {
Active: true,
Text: "FindMe",
Attribute: PP.Mb.FindInfoAttribute.Name,
} }
}, function (sender, args)
{
var loadedObjects = JSON.parse(args.ResponseText).GetObjectsResult.objects;
console.log(loadedObjects.its);
})
After executing the example the browser console displays an array of object descriptions for the objects whose names contain the FindMe combination.
See also: