constants
Constants : d2/sdk/utils/constants
Some utility constants.
Extends: Object
- Constants :
d2/sdk/utils/constants- .MediaTypes :
Object - .Types :
Object - .MenuTypes :
Object - .ISODateFormats :
Object
- .MediaTypes :
Constants.MediaTypes : Object
Supported AJAX media types.
Kind: static property of Constants
Properties
| Name | Type | Description |
|---|---|---|
| DCTM_JSON | string | "application/vnd.emc.documentum+json". |
| DCTM_XML | string | "application/vnd.emc.documentum+xml". |
| DCTM_D2_V1_JSON | string | "application/vnd.documentum.d2.v1+json". |
Constants.Types : Object
Object types. Used for type equality comparison for NodeModels.
Kind: static property of Constants
Properties
| Name | Type |
|---|---|
| FOLDER | number |
| OBJECT | number |
| REPOSITORY | number |
| CABINET | number |
| DOCUMENT | number |
| RENDITION | number |
| WORKFLOW_STEP | number |
| TASK | number |
| TASK_PERFORMER | number |
| WORKFLOW | number |
| WORKFLOW_EVENT | number |
| TASK_EVENT | number |
number | |
| DQL | number |
| ACCESSOR | number |
Example
define(['d2/sdk/utils/constants'], function(constants){
//supposing 'node' is an instance of NodeModel
if(node.get('type') === constants.Types.FOLDER) {
console.log('This is a folder');
}
});
Constants.MenuTypes : Object
Values used as 'type' query-parameter while making AJAX call to retrieve menu actions associated with a NodeModel
Kind: static property of Constants
Properties
| Name | Type | Description |
|---|---|---|
| CONTEXT | string | 'MenuContext' |
| NEW_OBJECT | string | 'MenuNewObject' |
| USER | string | 'MenuUser' |
| VDOC | string | 'MenuContextVD' |
| SUBMENU_VD_ADD_CHILD | string | 'MenuContextVDAddChildOption' |
| SUBMENU_VD_REPLACE_CHILD | string | 'MenuContextVDReplaceChildOption' |
| TASKS | string | 'MenuContextTasksList' |
| SUBMENU_CHANGE_TASK_PRIORITY | string | 'MenuContextTaskPriority' |
| TASK_DOCUMENTS | string | 'MenuContextTaskDocument' |
| WORKFLOWS | string | 'MenuContextWorkflowOverview' |
| SAVED_SEARCH | string | 'MenuContextSavedSearchObject' |
| SUBMENU_LAUNCH_WORKFLOW | string | 'MenuDocumentWorkflow' |
| DETAIL_RELATIONS | string | 'MenuContextDetailRelations' |
| DETAIL_RENDITIONS | string | 'MenuContextDetailRenditions' |
| DETAIL_VERSIONS | string | 'MenuContextDetailVersions' |
| SUBMENU_SHARE | string | 'MenuDocumentShare' |
| SUBMENU_MASS_UPDATE | string | 'MenuToolsMassUpdate' |
| SUBMENU_DOCUMENT_LIFECYCLE | string | 'MenuDocumentLifeCycle' |
| SUBMENU_DOCUMENT_LIFECYCLE_ATTACH | string | 'MenuDocumentLifeCycleAttach' |
| SUBMENU_DOCUMENT_D2_LIFECYCLE_ATTACH | string | 'MenuDocumentD2LifeCycleAttach' |
Constants.ISODateFormats : Object
Date formats used by D2-REST APIs.
Kind: static property of Constants
Properties
| Name | Type | Description |
|---|---|---|
| DATE_ONLY | string | 'YYYY-MM-DD' |
| DATE_TIME | string | 'YYYY-MM-DDTHH:mm:ss.SSSZZ' |