Skip to main content

create.folder.type.filters

CreateFolderTypeFilter : d2/sdk/commands/create.folder.type.filters

Type filter collection. Defines which Documentum types should be considered while creating a folder.

This collection augments the default functionality of D2-CreateFolder command.

dm_folder is the root Documentum type that represents a folder, any sub-type of it can also represent a folder.

New types could be introduced by extension

Extends: Object
Example (to register an extension, add in extension.json)


{
"d2/sdk/commands/create.folder.type.filters": {
"extensions": {
"mybundle": {
"mybundle/commands/my.folder.type.filter"
}
}
}
}

Example (whereas my.folder.type.filter.js is defined as)


define([], function(){
'use strict';

return function(typeData) {
// This is the function that implements a custom filter condition
return typeData.name === 'my_dctm_custom_folder_type';
};
});

CreateFolderTypeFilter.addFilters(newFilters)

To manually register new type filters without using the 'extension' way.

Kind: static method of CreateFolderTypeFilter

ParamTypeDescription
newFiltersArray.<FolderTypeFilterCondition>

Array of callbacks that returns true or false to include or exclude a type respectively.

CreateFolderTypeFilter.filter(types) ⇒ Array.<object>

To retrieve the list of filtered types that can be used while creating a folder.

Kind: static method of CreateFolderTypeFilter
Returns: Array.<object> - The filtered types.

ParamTypeDescription
typesArray.<object>

Documentum types.

types[].namestring

Name of a Documentum type.

CreateFolderTypeFilter~FolderTypeFilterCondition ⇒ boolean

This is a callback type that implements the condition of a filter.

Kind: inner typedef of CreateFolderTypeFilter
Returns: boolean - Should return true if the type should be included, false otherwise.

ParamTypeDescription
typeDataobject

Data representing a Documentum type

typeData.namestring

Name of the documentum type