Class ecm.model.SearchConfiguration

Represents the configuration information that is used for the search builder and runtime.

Usage:

var searchConfig = SearchConfiguration.getSearchConfiguration({
"repository": repository
});


Defined in: <ecm\model\SearchConfiguration.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 
Constructs a SearchConfiguration object.

Field Summary

Field Attributes Field Name and Description
 
Query capability type constants (CMIS only).
 
Data type constants.
 
Object type constants.
 
Operator constants.
 
Text search type constants.

Method Summary

Method Attributes Method Name and Description
 
Returns true if the repository supports building searches.
 
Returns true if the repository supports building unified searches.
 
Returns true if the current user has sufficient privileges to save a search.
 
Returns true if the current user has sufficient privileges to save a unified search.
 
filterAttributeDefinitions(attributeDefinitions, options)
Returns an array containing only attributes that are suitable for defining search criteria.
 
filterOperators(operators, dataType)
Returns an array of operators filtered per the repository configuration.
 
getDataTypeLabel(dataType, capitalized)
Returns the label for the given data type.
 
Returns the ID of the default attribute definition for given object type.
 
Returns a value that determines the default search type.
 
Returns an array of property names that are configured to be filtered for the given object type.
 
Returns true if a search should match all the property criteria by default.
 
getNameProperty(objectType)
Returns the name property for the given object type.
 
getOperators(dataType, cardinality, choiceList, textSearchable, nullable, usesLongColumn, hasDependentAttributes, unfiltered)
Returns an array of operators compatible with the search criterion described by the given meta data.
 
getOperatorSelectOptions(dataType, cardinality, choiceList, textSearchable, nullable, usesLongColumn, hasDependentAttributes)
Returns an array of operator selection objects compatible with the search criterion described by the given meta data.
 
getRootClassId(objectType)
Returns the ID of the root class for the given object type.
 
Returns an array of default columns for the given object type.
 
Returns an array of default magazine columns for the given object type.
 
Returns true if the repository supports search folders.
 
Returns true if the given query compatibility type is "bothseparate" (CMIS only).
 
Returns true if the given query compatibility type is "fulltextonly" (CMIS only).
 
Returns true if the repository supports appending of search results.
 
Returns true if the repository supports changing the results display.
 
Returns true if the given text search type is supported by the repository.
 
isUserProperty(name, repositoryType)
Returns true if the given property is classified as being a user property, i.e.
 
Calls "callback" with an object containing the maximum length for the name and description defined by the search class.
<static>  
ecm.model.SearchConfiguration.SearchConfiguration.getSearchConfiguration(args)
Static function that returns an instance of the search configuration

Constructor Detail

ecm.model.SearchConfiguration()

Constructs a SearchConfiguration object.

Field Detail

CAPABILITY_QUERY

Query capability type constants (CMIS only).

DATA_TYPE

Data type constants.

OBJECT_TYPE

Object type constants.

OPERATOR

Operator constants.

TEXT_SEARCH_TYPE

Text search type constants.

Method Detail

canBuildSearches()

Returns true if the repository supports building searches.

canBuildUnifiedSearches()

Returns true if the repository supports building unified searches.

canSaveSearches()

Returns true if the current user has sufficient privileges to save a search.

canSaveUnifiedSearches()

Returns true if the current user has sufficient privileges to save a unified search.

filterAttributeDefinitions(attributeDefinitions, options)

Returns an array containing only attributes that are suitable for defining search criteria.
It supports the following filter options:

objectType: The object type for which to get the attributes that are configured to be filtered
allowHidden: Indicates whether hidden attributes are allowed in the filtered array
allowNonSearchable: Indicates whether non-searchable attributes are allowed in the filtered array

Parameters:
attributeDefinitions
The array of ecm.model.AttributeDefinition objects to be filtered
options
An object holding the filter options

filterOperators(operators, dataType)

Returns an array of operators filtered per the repository configuration.
Parameters:
operators
The operators to be filtered.
dataType
The search criterion's data type.

getDataTypeLabel(dataType, capitalized)

Returns the label for the given data type.
Parameters:
dataType
The data type
capitalized
Indicates whether the label is capitalized (optional)
Since:
2.0.2

getDefaultAttributeDefinitionId(objectType)

Returns the ID of the default attribute definition for given object type.
Parameters:
objectType
The object type for which to get the default attribute definition ID

getDefaultSearchType()

Returns a value that determines the default search type.

getFilteredProperties(objectType)

Returns an array of property names that are configured to be filtered for the given object type.
Parameters:
objectType
The object type for which to get the array of filtered property names.

getMatchAll()

Returns true if a search should match all the property criteria by default.

getNameProperty(objectType)

Returns the name property for the given object type.
Parameters:
objectType
The object type for which to get the name property.

getOperators(dataType, cardinality, choiceList, textSearchable, nullable, usesLongColumn, hasDependentAttributes, unfiltered)

Returns an array of operators compatible with the search criterion described by the given meta data.
Parameters:
dataType
The search criterion's data type.
cardinality
The search criterion's cardinality.
choiceList
The search criterion's choice list.
textSearchable
Indicates whether the search criterion supports text search.
nullable
Indicates whether the search criterion supports searching for NULL values.
usesLongColumn
Indicates whether the search criterion uses long column (P8 only).
hasDependentAttributes
Indicates whether the search criterion has dependent attributes (CM only).
unfiltered
Indicates whether the operators should not to be filtered as per the repository settings.
Deprecated:
As of 2.0.3.4. Use AttributeDefinition.availableOperators or SearchCriterion.availableOperators.

getOperatorSelectOptions(dataType, cardinality, choiceList, textSearchable, nullable, usesLongColumn, hasDependentAttributes)

Returns an array of operator selection objects compatible with the search criterion described by the given meta data. Each object in the array contains the operator value and the corresponding localized label.
Parameters:
dataType
The search criterion's data type.
cardinality
The search criterion's cardinality.
choiceList
The search criterion's choice list.
textSearchable
Indicates whether the search criterion supports text search.
nullable
Indicates whether the search criterion supports searching for NULL values.
usesLongColumn
Indicates whether the search criterion uses long column (P8 only).
hasDependentAttributes
Indicates whether the search criterion has dependent attributes (CM only).
Deprecated:
As of 2.0.3.4. Use AttributeDefinition.getAvailableOperatorsSelectOptions or SearchCriterion.getAvailableOperatorsSelectOptions.

getRootClassId(objectType)

Returns the ID of the root class for the given object type.
Parameters:
objectType
The object type for which to get the root class ID

getSearchDefaultColumns(objectType)

Returns an array of default columns for the given object type.
Parameters:
objectType
The object type for which to get the array of default columns.

getSearchMagazineDefaultColumns(objectType)

Returns an array of default magazine columns for the given object type.
Parameters:
objectType
The object type for which to get the array of default columns.
Since:
2.0.2

hasSearchFolders()

Returns true if the repository supports search folders.

isCmisCapabilityQueryBothSeperated(type)

Returns true if the given query compatibility type is "bothseparate" (CMIS only).
Parameters:
type
The query compatibility type to be evaluated.

isCmisCapabilityTextOnly(type)

Returns true if the given query compatibility type is "fulltextonly" (CMIS only).
Parameters:
type
The query compatibility type to be evaluated.

isResultsAppendSupported()

Returns true if the repository supports appending of search results.

isResultsDisplaySupported()

Returns true if the repository supports changing the results display.

isTextSearchTypeSupported(type)

Returns true if the given text search type is supported by the repository.
Parameters:
type
The text search type to be evaluated.

isUserProperty(name, repositoryType)

Returns true if the given property is classified as being a user property, i.e., Creator.
Parameters:
name
The name the property to be evaluated.
repositoryType
The type of repository that the property belongs to (optional).

retrieveNameAndDescriptionMaxLength(callback)

Calls "callback" with an object containing the maximum length for the name and description defined by the search class.
The values are retrieved from local cache if available; otherwise, they are retrieved asynchronously.
For example:

callback({
nameMaxLengh: 256,
descriptionMaxLength: 256
});

Parameters:
callback

<static> ecm.model.SearchConfiguration.SearchConfiguration.getSearchConfiguration(args)

Static function that returns an instance of the search configuration
Parameters:
args
Object containing arguments to use when constructing the search configuration object.