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 :
d2/sdk/commands/create.folder.type.filters
- static
- .addFilters(newFilters)
- .filter(types) ⇒
Array.<object>
- inner
- ~FolderTypeFilterCondition ⇒
boolean
- ~FolderTypeFilterCondition ⇒
- static
CreateFolderTypeFilter.addFilters(newFilters)
To manually register new type filters without using the 'extension' way.
Kind: static method of CreateFolderTypeFilter
Param | Type | Description |
---|---|---|
newFilters | Array.<FolderTypeFilterCondition> | Array of callbacks that returns |
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.
Param | Type | Description |
---|---|---|
types | Array.<object> | Documentum types. |
types[].name | string | 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.
Param | Type | Description |
---|---|---|
typeData | object | Data representing a Documentum type |
typeData.name | string | Name of the documentum type |