Class ecm.model.ContentItem


Extends ecm.model.Item.
Represents a single content item in the repository. Content items include documents, folders, and other items. Each content item is associated with a content class that describes the metadata for the item.
Defined in: <ecm\model\ContentItem.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 
ecm.model.ContentItem(properties)
Constructs a content item.

Field Summary

Field Attributes Field Name and Description
 
If not null, the ContentItem represents a compound document.
 
The size of the content in bytes, if there is content.
 
A boolean that is true if the item is the most current version.
 
A boolean indicating that the content item is declared as part of a record.
 
A boolean indicating if the document has a hold applied.
 
A boolean value indicating if this content item is an instance of a hierarchical item type.
 
itemId 
A string value holding the item id.
 
 
The object store containing the FileNet P8 content item.
 
If the content item is updated, this field will contain the id that the item originally had.
 
An array of ecm.model.Permission objects defining access rights on this content item.
 
A boolean that is true if this is the root container.
 
A boolean that is true if this is a FileNet P8 repository.
 
vsId 
A string value holding the version series id.
Fields borrowed from class ecm.model.Item:
attributes, dataObject, deleted, entryTemplateId, locked, lockedUser, mimetype, parent, privileges, repository, resultSet
Fields borrowed from class ecm.model._ModelObject:
categorization, id, isRecurring, name, nameFilter, pane, status, type, userId

Method Summary

Method Attributes Method Name and Description
 
addNotelog(callback, errorback, content, createVersion, background)
Appends content to the notelog of this item.
 
addRelated(templateName, attributes, permissions, children, parents, callback, errorCallback)
 
addTags(callback, errorback, skipOnChange, skipOnChange)
Adds tags to the item.
 
addToFolder(items, folderAddCallback)
Adds one or more items to this folder.
 
checkIn(templateName, criteria, contentSourceType, mimeType, filename, content, childComponentValues, permissions, securityPolicyId, newVersion, checkInAsMinorVersion, autoClassify, callback, isBackgroundRequest, uploadProgress, onError, parameters)
Checks in this item to the repository using the content stream.
 
checkInRedaction(redactionContent, mimeType, callback, documentTitle, mimeType, documentTitle)
Checks in this item to the repository using the content stream.
 
checkInUsingForm(templateName, contentSourceType, filename, form, securityPolicyId, newVersion, checkInAsMinorVersion, autoClassify, callback, onError)
Checks in this item to the repository using a form object to submit the content and other settings.
 
<static>  
ecm.model.ContentItem.ContentItem.registerFactory(factory)
Static function that registers a factory for sub-classes of ContentItem.
 
copyToFolder(items, callback, destinationRepositoryId, templateName)
Copies one or more items to this folder.
 
If found, deletes the provided item from the folder's content cache based on the filter type.
 
deleteShare(callback)
Removes a share from a document copied to Box.
 
Demotes a major version to a minor version.
 
Returns an instance of ecm.model.ChildComponent for the specified child component.
 
Returns an instance of ecm.model.ContentClass for the content class that is associated with this content item.
 
getContentUrl(resultSet)
Returns a URL to retrieve the content of the document.
 
getMarkingValues(properties)
Retrieves the marking set values for the content class of this item.
 
getPageImageRequestParameters(pageNo, scale, rotation, inverted, brightness, contrast, displayableWidth, displayableHeight)
Returns a Javascript Object to create an image of a page of the document.
 
getPageImageUrl(pageNo, scale, rotation, inverted, brightness, contrast, displayableWidth, displayableHeight, resultSet)
Returns a URL to create an image of a page of the document.
 
getShareData(callback)
Returns information about whether the item is shared.
 
Returns the item ID of a document in this version seriese that is shared.
 
Returns the version number of a document in this version series that is shared.
 
Returns a ContentItem.SHARE_STATUS enum value giving the share status of the document.
 
Returns the social count of the given type if availble.
 
Returns the name of the tags property for this item.
 
Returns true if this item has content.
 
hasPrivilege(privilege)
Returns true if the item has the specified privilege.
 
Returns a boolean indicating if the user has permissions to delete shares.
 
Returns a boolean to the callback indicating if the user has permissions to delete the share.
 
isAttributeHidden(attributeId)
Returns true if the specified attribute is hidden.
 
isAvailableForBoxCollaboration(collaborationType, repositoryCheckOnly)
Determines whether this item can be collaborated on with the given type of Box collaboration feature, such as Box share.
 
isAvailableForSocialCollaboration(type, repositoryCheckOnly)
Determines whether this item can be collaborated on with the given type of social collaboration feature, such as likes (recommendations) or comments.
 
isBoxSharable(repositoryCheckOnly)
Returns true if this item can be marked as Box sharable by the current user.
 
isChildComponentHidden(childComponentId)
Returns true if the specified child component is hidden.
 
isCommentable(repositoryCheckOnly)
Returns true if this item can be commented on by the current user.
 
isDownloadCountable(repositoryCheckOnly)
Returns true if the repository supports download counts and this item can be downloaded by the current user.
 
Returns true if this folder's contents have been retrieved.
 
Returns true if this item can have a notelog.
 
isRecommendable(repositoryCheckOnly)
Returns true if this item can be marked as recommendable by the current user.
 
Returns true if the item is a system object.
 
isTaggable(repositoryCheckOnly)
Returns true if this item can be marked as taggable by the current user.
 
Returns true if this item is viewable.
 
moveToFolder(items, oldFolder, moveCallback, permissions, inheritSecurity)
Moves one or more items to this folder.
 
onChange(item)
This event is called for any change to the content item.
 
onCollaborate(socialItem, added, skipOnChange)
Fired when collaborated on this item.
 
onCommentChanged(comment, added)
Fired when a comment has changed for the item.
 
Promotes a minor version to a major version.
 
Erases any cached contents and triggers onChange, causing this item to be refreshed in any widgets.
 
removeFromFolder(items, folderRemoveCallback)
Removes one or more items from this folder.
 
retrieveAllItemsAndSubFolders(parent, callback, params)
Retrieves all items under the specified folder to the specified depth.
 
Retrieves an ecm.model.ResultSet object containing all versions for this item.
 
retrieveAttributes(callback, backgroundRequest, noOnChange, onError)
Retrieves all attributes for the item.
 
retrieveChildComponent(childName, callback)
Retrieves all values for a specified child component.
 
retrieveComments(callback, errorback)
Retrieves the comments of this item.
 
Retrieves the download records for a FileNet P8 document.
 
retrieveEntryTemplateFolderAssociations(callback, rootFolderId, getParentAssociations)
Retrieves Entry Templates that are associated with the folder.
 
retrieveFolderContents(folderOnly, callback, orderBy, descending, noCache, teamspaceId, filterType, parent, criteria)
Retrieves the contents of this folder.
 
Returns a list of folders (ContentItems) that the item is filed into.
 
retrieveNotelogs(callback, errorback, background)
Retrieves the notelog of this item.
 
Retrieves the permissions for this content item.
 
 
retrieveRecommendations(callback, errorback)
Retrieves the recommendations made to this item.
 
retrieveRelated(relationship, resultType, callback, errorCallback, noCache)
Retrieves compound document related items.
 
retrieveTags(callback, errorback)
Retrieves the item's tags.
 
retrieveTeamspace(callback, params)
Only valid for folders, if the folder is in a teamspace instance, retrieve the Teamspace object for FileNet P8.
 
retrieveThumbnail(callback, params)
Retrieves the thumbnail for the content item.
 
retrieveVersion(version, callback)
Returns an instance of ecm.model.ContentItem for the requested version of this content item.
 
saveAttributes(attributes, newTemplatename, childComponentValues, permissions, checkIn, callback, isBackgroundRequest, onError, params)
Updates the attribute values of this item.
 
saveEntryTemplateFolderAssociations(callback, entryTemplateFolderAssociations, checkIn)
Saves Entry Templates that are associated with the folder.
 
share(data, callback)
Shares a document to Box.
 
Removes any cached folder contents so that they will be retrieved from the server on the next call to retrieveFolderContents.
 
Removes any cached related items so that they will be retrieved from the server on the next call to retrieveRelated.
 
update(item, skipOnChange)
Updates this item from the contents of the passed-in item.
 
updateNotelogs(callback, errorback, content, createVersion, background)
Updates the notelog of this item.
Methods borrowed from class ecm.model.Item:
containsValue, getAttributeFormat, getAttributeType, getAttrLabel, getDisplayValue, getItemValue, getMimeClass, getModifyDate, getModifyUser, getPath, getStateClass, getUserInfo, getValue, getValues, hasAttribute, isAttributeReadOnly, isDeclareRecordEntryTemplate, isDocumentEntryTemplate, isEntryTemplate, isFolder, isFolderEntryTemplate, isSystemProperty, setValue, setValues
Methods borrowed from class ecm.model._ModelObject:
destroy, own, toString

Constructor Detail

ecm.model.ContentItem(properties)

Constructs a content item.
Parameters:
properties
The properties for the content item. The properties can be any of the public fields as defined below and on ecm.model.Item and ecm.model._ModelObject.

Field Detail

compoundDocumentType

If not null, the ContentItem represents a compound document. The value, when not null, indicates the type of compound document.

contentSize

The size of the content in bytes, if there is content.
Since:
2.0.3

currentVersion

A boolean that is true if the item is the most current version. (FileNet P8 only)

declaredAsRecord

A boolean indicating that the content item is declared as part of a record. The records management can apply additional restrictions on the document when it is part of a record.

hasHold

A boolean indicating if the document has a hold applied. (IBM Content Manager OnDemand and IBM Content Manager only.)

isHierarchicalItemType

A boolean value indicating if this content item is an instance of a hierarchical item type. (IBM Content Manager only)
Since:
2.0.3.5

itemId

A string value holding the item id. (IBM Content Manager only)
Since:
2.0.3

modifyPermissions

Deprecated:
Deprecated in 2.0.3. The Item model privModifyPermissions should be used instead.

objectStore

The object store containing the FileNet P8 content item.

Note: This object store can be different from the object store that is related to the repository in cases such as when searches are performed across object stores.


originalId

If the content item is updated, this field will contain the id that the item originally had. The id can change for certain types of updates, such as changing the content class.

permissions

An array of ecm.model.Permission objects defining access rights on this content item.

rootFolder

A boolean that is true if this is the root container.

showCheckoutForReservation

A boolean that is true if this is a FileNet P8 repository. A checkout icon should be shown when this is true because the item has a reservation.

vsId

A string value holding the version series id. (FileNet P8 only)

Method Detail

addNotelog(callback, errorback, content, createVersion, background)

Appends content to the notelog of this item.
Parameters:
callback
A function that is called after the notelog is retrieved.
errorback
A function that is called after an error occurs.
content
The content that will be appended to the notelog.
createVersion
Specification of whether to create a new notelog version. The result also depends on the setting of notelog part version control in the Content Manager server.
background
Since:
2.0.2

addRelated(templateName, attributes, permissions, children, parents, callback, errorCallback)

Parameters:
templateName
attributes
permissions
children
parents
callback
errorCallback

addTags(callback, errorback, skipOnChange, skipOnChange)

Adds tags to the item.
Parameters:
callback
A function that is called after the tags are added.
errorback
A function that is called after an error occurs.
skipOnChange
A boolean indicating if an onChange event should be skipped.
skipOnChange

addToFolder(items, folderAddCallback)

Adds one or more items to this folder.
Parameters:
items
An item Id string, an array of item Id strings, an item object, or an array of item objects.
folderAddCallback
A callback function that is invoked once the action is complete.

checkIn(templateName, criteria, contentSourceType, mimeType, filename, content, childComponentValues, permissions, securityPolicyId, newVersion, checkInAsMinorVersion, autoClassify, callback, isBackgroundRequest, uploadProgress, onError, parameters)

Checks in this item to the repository using the content stream.
Parameters:
templateName
The item's content class name. For example, the document's content class name, not an entry template name.
criteria
An array that contains item property objects. The value of each property object is assigned or changed when the item is checked in. Include the following attributes for each property object in your array:
  • name: The "id" of the property, from the property's AttributeDefinition object
  • datatype: The "dataType" of the property, from the property's AttributeDefinition object
  • label: The "name" of the property, from the property's AttributeDefinition object
  • value: The value to assign to the property, from the caller of the method. This value is stored in the repository when the item is checked in.
  • displayValue: The "display value" of the property. Typically, the same as "value".

Exceptions for updating the item property values in the repository when the item is checked in:
  • When an item property is not included in the array, the current value for that item property is retained in the repository.
  • When the value property is specified for an item property object, but the current value in the repository is the same, the current value for that item property is retained in the repository.
contentSourceType
A string value that identifies the content source type.
  • "Folder"
  • "Document"
  • "Item" (no content)
  • "ExternalURL" (FileNet P8 only)
mimeType
A string value that identifies the MIME type of the content. If you provide an empty string (""), the repository determines the MIME type from the file extension.
filename
A string value that contains one of the following values:
  • For a "Document" check in: the file name of the document.
  • For an "ExternalURL" check in: the location of the file associated with this item.
content
The file content stream. A W3C File Object, see http://www.w3.org/TR/FileAPI/#dfn-file.
childComponentValues
An array of child component values. (Content Manager only.) For other repository types, provide an empty array ([])
permissions
The permissions to be saved. To keep the current permissions for the item, provide a null value. To change the permissions for the item, provide an array of permission objects. For more information about permission objects, see ecm.model.Permission.
securityPolicyId
A string value that contains a security policy id. (FileNet P8 only.) This value can be null. A security policy defines the rules for automatically changing the permissions when a new version is created, such as a release version, minor version, or deprecated version.
newVersion
A boolean value indicating whether to create a new version.(Content Manager only.) For other repository types, pass a null value.
checkInAsMinorVersion
A boolean value indicating whether the item should be checked in as a minor version. (FileNet P8 only.) If the value is TRUE, a new minor version of the item is created. If the value is FALSE, a new major version of the item is created.
autoClassify
A boolean value indicating whether the item should be auto-classified. (FileNet P8 only) Set autoClassify to TRUE to set class and properties automatically when you add a document. The autoClassify value might not matter for checkIn of an existing document.
callback
A callback function to be called after the item has been checked in. If the check in succeeds, the callback function is called with the updated item: callback(ecm.model.ContentItem). If invalid property values prevented the check in, the callback function is called with "undefined" for the updated item and the field errors for the invalid property values: callback(undefined, response.fieldErrors).
isBackgroundRequest
A boolean flag indicating that this add request should be placed in a background process.
uploadProgress
A boolean value indicating whether the event listener is added for upload progress event.
onError
parameters
Since:
2.0.3.5 A callback function called if there is an error returned from the request., 2.0.3.6 An object holding additional parameters to be passed in the request.

checkInRedaction(redactionContent, mimeType, callback, documentTitle, mimeType, documentTitle)

Checks in this item to the repository using the content stream.
Parameters:
redactionContent
A JSON object from Daeja redaction process with info to retrieve redacted content on server side
mimeType
MIME type of the redacted content
callback
A callback function to be called after the item has been checked in. If the check in succeeds, the callback function is called with the updated item: callback(ecm.model.ContentItem). If invalid property values prevented the check in, the callback function is called with "undefined" for the updated item and the field errors for the invalid property values: callback(undefined, response.fieldErrors).
documentTitle
An optional string value to update document title property during check in
mimeType
documentTitle

checkInUsingForm(templateName, contentSourceType, filename, form, securityPolicyId, newVersion, checkInAsMinorVersion, autoClassify, callback, onError)

Checks in this item to the repository using a form object to submit the content and other settings. Use this method when checking in content under a browser that does not support HTML5, such as Internet Explorer version 9 or earlier.
Parameters:
templateName
The item's content class name. For example, the document's content class name, not an entry template name.
contentSourceType
A string value that indicates the content source type.
  • "Folder"
  • "Document"
  • "Item" (no content)
  • "ExternalURL" (FileNet P8 only)
    filename
    A string value that contains one of the following values:
    • For a "Document" check in: the file name of the document.
    • For an "ExternalURL" check in: the location of the file associated with this item.
    form
    A form object named "fileUploadForm" that contains the input file, criterias, childComponentValues, acl, and an IFRAME. For an example of the content of the form object, see "fileUploadForm" in ecm/widget/templates/AddContentItemGeneralPane.html. Include the following attributes for the "fileUploadForm":
    • For more information about the criterias attribute, see the checkIn method, criteria attribute.
    • For more information about the childComponentValues attribute, see the checkIn method, childComponentValues attribute.
    • For more information about the acl attribute, see the checkIn method, permissions attribute.
    securityPolicyId
    A string value that contains a security policy id. (FileNet P8 only.) This value can be null. A security policy defines the rules for automatically changing the permissions when a new version is created, such as a release version, minor version, or deprecated version.
    newVersion
    A boolean value indicating whether to create a new version.(Content Manager only.) For other repository types, pass a null value.
    checkInAsMinorVersion
    A boolean value indicating whether the item should be checked in as a minor version. (FileNet P8 only.) If the value is TRUE, a new minor version of the item is created. If the value is FALSE, a new major version of the item is created.
    autoClassify
    A boolean value indicating whether the item should be auto-classified. (FileNet P8 only) Set autoClassify to TRUE to set class and properties automatically when you add a document. The autoClassify value might not matter for checkIn of an existing document.
    callback
    A callback function to be called after the item has been checked in. If the check in succeeds, the callback function is called with the updated item: callback(ecm.model.ContentItem). If invalid property values prevented the check in, the callback function is called with "undefined" for the updated item and the field errors for the invalid property values: callback(undefined, response.fieldErrors).
    onError
    Since:
    2.0.3.5 A callback function called if there is an error returned from the request.

    clone()


    <static> ecm.model.ContentItem.ContentItem.registerFactory(factory)

    Static function that registers a factory for sub-classes of ContentItem.
    Parameters:
    factory
    A factory object with createFromJSON() method to possibly create a sub-class of ContentItem from JSON. The factory method should return null when the given JSON is not one for known sub-classes, giving chances for other factories to create one or falling back to the default ContentItem construction.

    copyToFolder(items, callback, destinationRepositoryId, templateName)

    Copies one or more items to this folder.
    Parameters:
    items
    An item Id string, an array of item Id strings, an item object, or an array of item objects.
    callback
    A callback function that is invoked once the action is complete.
    destinationRepositoryId
    An optional source repository Id.
    templateName
    An optional Class name to used for new items.

    deleteItemFromFolderContentCache(item, filterType)

    If found, deletes the provided item from the folder's content cache based on the filter type.
    Parameters:
    item
    The item to be deleted.
    filterType
    The type of cache stored.

    deleteShare(callback)

    Removes a share from a document copied to Box.
    Parameters:
    callback
    A function that is called after the share has been deleted.
    Since:
    2.0.3.6

    demoteVersion()

    Demotes a major version to a minor version. (FileNet P8 only)

    getChildComponent(id)

    Returns an instance of ecm.model.ChildComponent for the specified child component.
    Parameters:
    id
    The identifier of the child component.

    getContentClass()

    Returns an instance of ecm.model.ContentClass for the content class that is associated with this content item.

    getContentUrl(resultSet)

    Returns a URL to retrieve the content of the document. For multi-segment or multi-part documents, this URL will only retrieve the first segment or part.
    Parameters:
    resultSet
    Optional. Specify the resultSet to use as a basis for mapping content retrieval to the correct document version. If not specified, this item's resultSet property will be referenced, if present.

    getMarkingValues(properties)

    Retrieves the marking set values for the content class of this item.
    Parameters:
    properties
    An array of current property values that will be merged with the marking set values.

    getPageImageRequestParameters(pageNo, scale, rotation, inverted, brightness, contrast, displayableWidth, displayableHeight)

    Returns a Javascript Object to create an image of a page of the document. This object is to be used with a JSON request.
    Parameters:
    pageNo
    The page index (starting at 1 for the first page).
    scale
    The scale of the page. 1.0 is the page at actual size (using 96 dpi). There are also special values of -1.0 for fit width, -2.0 for fit height, and -3.0 for fit page.
    rotation
    The rotation of the page. 0 is no rotation, 1 is rotated 90 degrees, 2 is rotated 180 degrees, 3 is rotated 270 degrees.
    inverted
    Boolean, if true the page is color inverted.
    brightness
    The brightness of the page, a value from 0.0 (darkest) to 2.0 (lightest), with 1.0 being original brightness.
    contrast
    The contrast of the page, a value from 0.0 (lowest contrast) to 2.0 (highest contrast), with 1.0 being original contrast.
    displayableWidth
    The width in pixels available for display of the page. This is used in calculations of scale for fit width and fit page.
    displayableHeight
    The height in pixels available for display of the page. This is used in calculations of scale for fit height and fit page.

    getPageImageUrl(pageNo, scale, rotation, inverted, brightness, contrast, displayableWidth, displayableHeight, resultSet)

    Returns a URL to create an image of a page of the document.
    Parameters:
    pageNo
    The page index (starting at 1 for the first page).
    scale
    The scale of the page. 1.0 is the page at actual size (using 96 dpi). There are also special values of -1.0 for fit width, -2.0 for fit height, and -3.0 for fit page.
    rotation
    The rotation of the page. 0 is no rotation, 1 is rotated 90 degrees, 2 is rotated 180 degrees, 3 is rotated 270 degrees.
    inverted
    Boolean, if true the page is color inverted.
    brightness
    The brightness of the page, a value from 0.0 (darkest) to 2.0 (lightest), with 1.0 being original brightness.
    contrast
    The contrast of the page, a value from 0.0 (lowest contrast) to 2.0 (highest contrast), with 1.0 being original contrast.
    displayableWidth
    The width in pixels available for display of the page. This is used in calculations of scale for fit width and fit page.
    displayableHeight
    The height in pixels available for display of the page. This is used in calculations of scale for fit height and fit page.
    resultSet
    Optional. Specify the resultSet to use as a basis for mapping content retrieval to the correct document version. If not specified, this item's resultSet property will be referenced, if present.

    getShareData(callback)

    Returns information about whether the item is shared.
    Parameters:
    callback
    A function that is called after the recommendations are retrieved.
    Since:
    2.0.3.6

    getSharedItemId()

    Returns the item ID of a document in this version seriese that is shared. P8 only.
    Since:
    2.0.3.6

    getSharedVersionNumber()

    Returns the version number of a document in this version series that is shared.
    Since:
    2.0.3.6

    getShareStatus()

    Returns a ContentItem.SHARE_STATUS enum value giving the share status of the document.
    Since:
    2.0.3.6

    getSocialCount(type)

    Returns the social count of the given type if availble. Returns -1 if the count is not available. Counts can be retrieved by using the ecm.model.ContentItem.retrieveAttributes method.
    Parameters:
    type
    The type of the social collaboration as defined in ecm.model.SocialItem.TYPE.
    Since:
    2.0.3

    getTagsPropertyName()

    Returns the name of the tags property for this item.
    Since:
    2.0.3.5

    hasContent()

    Returns true if this item has content.

    hasPrivilege(privilege)

    Returns true if the item has the specified privilege.
    Parameters:
    privilege
    The identifier of the privilege to test.

    hasPrivilegeToDeleteShare()

    Returns a boolean indicating if the user has permissions to delete shares. (For P8, call hasPrivilegeToDeleteShareCallback in order to make sure the access mask is retrieved.)
    Since:
    2.0.3.6

    hasPrivilegeToDeleteShareCallback(callback)

    Returns a boolean to the callback indicating if the user has permissions to delete the share.
    Parameters:
    callback
    Since:
    2.0.3.6

    isAttributeHidden(attributeId)

    Returns true if the specified attribute is hidden.
    Parameters:
    attributeId

    isAvailableForBoxCollaboration(collaborationType, repositoryCheckOnly)

    Determines whether this item can be collaborated on with the given type of Box collaboration feature, such as Box share. Checks whether the social feature that is given by the type parameter is available in the repository where the item is stored, and whether the current user has the security privileges to collaborate on the item. Returns {Boolean} true if the given type of Box collaboration is available on this item.
    Parameters:
    collaborationType
    The type of the Box collaboration as defined in ecm.model.BoxCollaborationRecord.COLLABORATION_TYPE. Checks all types if not set.
    repositoryCheckOnly
    A boolean value indicating whether to check if the type is available in the repository without checking if the current user has the security privileges to collaborate.
    Since:
    2.0.3.6

    isAvailableForSocialCollaboration(type, repositoryCheckOnly)

    Determines whether this item can be collaborated on with the given type of social collaboration feature, such as likes (recommendations) or comments. Checks whether the social feature that is given by the type parameter is available in the repository where the item is stored, and whether the current user has the security privileges to collaborate on the item. Returns {Boolean} true if the given type of social collaboration is available on this item.
    Parameters:
    type
    The type of the social collaboration as defined in ecm.model.SocialItem.TYPE. Checks all types if not set.
    repositoryCheckOnly
    A boolean value indicating whether to check if the type is available in the repository without checking if the current user has the security privileges to collaborate.
    Since:
    2.0.3

    isBoxSharable(repositoryCheckOnly)

    Returns true if this item can be marked as Box sharable by the current user.
    Parameters:
    repositoryCheckOnly
    A boolean value indicating whether to check if the type is available in the repository only without checking if the current user has the security privileges.
    Since:
    2.0.3.6

    isChildComponentHidden(childComponentId)

    Returns true if the specified child component is hidden.
    Parameters:
    childComponentId

    isCommentable(repositoryCheckOnly)

    Returns true if this item can be commented on by the current user.
    Parameters:
    repositoryCheckOnly
    A boolean value indicating whether to check if the type is available in the repository only without checking if the current user has the security privileges.
    Since:
    2.0.2

    isDownloadCountable(repositoryCheckOnly)

    Returns true if the repository supports download counts and this item can be downloaded by the current user.
    Parameters:
    repositoryCheckOnly
    A boolean value indicating whether to check if the type is available in the repository only without checking if the current user has the security privileges.
    Since:
    2.0.3

    isFolderContentsRetrieved(filterType)

    Returns true if this folder's contents have been retrieved.
    Parameters:
    filterType
    A string value holding the filter type for retrieving folder contents

    isNotelogable()

    Returns true if this item can have a notelog.

    isRecommendable(repositoryCheckOnly)

    Returns true if this item can be marked as recommendable by the current user.
    Parameters:
    repositoryCheckOnly
    A boolean value indicating whether to check if the type is available in the repository only without checking if the current user has the security privileges.
    Since:
    2.0.3

    isSystemItem()

    Returns true if the item is a system object.

    isTaggable(repositoryCheckOnly)

    Returns true if this item can be marked as taggable by the current user.
    Parameters:
    repositoryCheckOnly
    A boolean value indicating whether to check if the type is available in the repository only without checking if the current user has the security privileges.
    Since:
    2.0.3

    isViewable()

    Returns true if this item is viewable.

    moveToFolder(items, oldFolder, moveCallback, permissions, inheritSecurity)

    Moves one or more items to this folder.
    Parameters:
    items
    An item Id string, an array of item Id strings, an item object, or an array of item objects.
    oldFolder
    An ecm.model.ContentItem object for the current folder containing the items to be moved.
    moveCallback
    A callback function that is invoked once the action is complete.
    permissions
    An optional array of ecm.model.Permission objects to be applied the item after the move.
    inheritSecurity
    An optional boolean to indicate if the item should inherit security from it's parent folder after the move.

    onChange(item)

    This event is called for any change to the content item. This includes events that retrieve additional attribute information or that update attribute information about the item.
    Parameters:
    item
    An ecm.model.ContentItem object.

    onCollaborate(socialItem, added, skipOnChange)

    Fired when collaborated on this item.
    Parameters:
    socialItem
    Instance of ecm.model.SocialItem.
    added
    A boolean value indicating whether the social item was added (true) or edited (false)
    skipOnChange
    A boolean value to skip calling onChange() method.
    Since:
    2.0.3

    onCommentChanged(comment, added)

    Fired when a comment has changed for the item.
    Parameters:
    comment
    Instance of ecm.model.Comment.
    added
    A boolean value indicating whether the comment was added (true) or edited (false)
    Deprecated:
    replaced by onCollaborate().
    Since:
    2.0.2

    promoteVersion()

    Promotes a minor version to a major version. (FileNet P8 only)

    refresh()

    Erases any cached contents and triggers onChange, causing this item to be refreshed in any widgets.

    removeFromFolder(items, folderRemoveCallback)

    Removes one or more items from this folder.
    Parameters:
    items
    An item Id string, an array of item Id strings, an item object, or an array of item objects.
    folderRemoveCallback
    A callback function that is invoked once the action is complete.

    retrieveAllItemsAndSubFolders(parent, callback, params)

    Retrieves all items under the specified folder to the specified depth.
    Parameters:
    parent
    The parent folder ecm.model.ContentItem object.
    callback
    A function, invoked with a list of ecm.model.ResultSet result sets, which provides access to the folder contents.
    params
    An Object containing parameters for the retrieval request(s). Parameters include:
    • depth - The depth to travse within the folder tree.
    • foldersOnly - Only the nested folders are retrieved.
    • callback -
    • orderBy - The attribute ID of the attribute by which to sort the contents, if any.
    • descending - If true, then sorting will be in descending order.
    • teamspaceId - If working in a teamspace context, the teamspace ID.
    • filterType - Filters the contents (supersedes foldersOnly).
    • criteria - An object hold the filter critieria.
    • pageSize - Number of items to retrieve per page.

    retrieveAllVersions(callback)

    Retrieves an ecm.model.ResultSet object containing all versions for this item.
    Parameters:
    callback
    A function that is called when the version retrieval has completed.

    retrieveAttributes(callback, backgroundRequest, noOnChange, onError)

    Retrieves all attributes for the item. Depending on how the item was originally created, it might contain only a subset of the attributes. This function will retrieve any additional missing attributes.
    Parameters:
    callback
    A function that is called when the attribute retrieve has completed.
    backgroundRequest
    A boolean value indicating whether this request should be run in the background (can be null).
    noOnChange
    A boolean value indicating whether onChange should be run after retrieving the item's attributes (can be null).
    onError
    Since:
    2.0.3 A callback function called if there is an error returned from the request.

    retrieveChildComponent(childName, callback)

    Retrieves all values for a specified child component.
    Parameters:
    childName
    A string value holding the child name to retrieve.
    callback
    A function that is called when the child component retrieval has completed.

    retrieveComments(callback, errorback)

    Retrieves the comments of this item.
    Parameters:
    callback
    A function that is called after comments are retrieved.
    errorback
    Since:
    2.0.2

    retrieveDownloadRecords(callback)

    Retrieves the download records for a FileNet P8 document.
    Parameters:
    callback
    A function that is called after the records are retrieved.
    Since:
    2.0.2

    retrieveEntryTemplateFolderAssociations(callback, rootFolderId, getParentAssociations)

    Retrieves Entry Templates that are associated with the folder.
    Parameters:
    callback
    A function that is called after the associated entry templates are retrieved.
    rootFolderId
    The folder id that the association search will stop when reaching this id.
    getParentAssociations
    The boolean value that control if just retrieving parent assoications, not retrieve current folder's.
    Since:
    2.0.3

    retrieveFolderContents(folderOnly, callback, orderBy, descending, noCache, teamspaceId, filterType, parent, criteria)

    Retrieves the contents of this folder.
    Parameters:
    folderOnly
    Only the nested folders are retrieved.
    callback
    A function, invoked with a ecm.model.ResultSet result set, which provides access to the folder contents.
    orderBy
    The attribute ID of the attribute by which to sort the contents, if any.
    descending
    If true, then sorting will be in descending order.
    noCache
    If true, then the contents will not be cached.
    teamspaceId
    If working in a teamspace context, the teamspace ID.
    filterType
    Filters the contents (supersedes foldersOnly).
    parent
    A parent folder ecm.model.ContentItem object.
    criteria
    An object hold the filter critieria.

    retrieveFoldersFiledIn(callback)

    Returns a list of folders (ContentItems) that the item is filed into.
    Parameters:
    callback
    A callback function that is called after the folders have been retrieved. Passes an array of ecm.model.ContentItem objects as a parameter.

    retrieveNotelogs(callback, errorback, background)

    Retrieves the notelog of this item.
    Parameters:
    callback
    A function that is called after the notelog is retrieved.
    errorback
    A function that is called after an error occurs.
    background
    Since:
    2.0.2

    retrievePermissions(callback)

    Retrieves the permissions for this content item.
    Parameters:
    callback
    A callback function called after the permission have been retrieved. Passes an array of ecm.model.Permission objects as a parameter.

    retrieveProcessInformation(callback)

    Parameters:
    callback

    retrieveRecommendations(callback, errorback)

    Retrieves the recommendations made to this item.
    Parameters:
    callback
    A function that is called after the recommendations are retrieved.
    errorback
    A function that is called after an error occurs.
    Since:
    2.0.3

    retrieveRelated(relationship, resultType, callback, errorCallback, noCache)

    Retrieves compound document related items. This call can be used to retrieve parents or children of a compound document, and can return either related document ContentItems or related Reference items. The response passed to the callback will contain a ResultSet of the related items or references, depending on how the function was called.
    Parameters:
    relationship
    Specify either "parents" or "children". If omitted or set to any other value, "children" will be assumed.
    resultType
    Specify either "items", "cds" or "references". If omitted or set to any other value, "items" will be assumed.
    callback
    Function to call on successful completion of the request.
    errorCallback
    Function to call on failed completion of the request.
    noCache
    Since:
    2.0.3

    retrieveTags(callback, errorback)

    Retrieves the item's tags.
    Parameters:
    callback
    A function that is called after tags are retrieved.
    errorback
    A function that is called after an error occurs.
    Since:
    2.0.3

    retrieveTeamspace(callback, params)

    Only valid for folders, if the folder is in a teamspace instance, retrieve the Teamspace object for FileNet P8. The folder path determines whether it will try to fetch the teamspace (by checking for "ClbTeamspaces" in the path). If "ClbTeamspaces" is not in the path, then this method will not try to get the object.
    Parameters:
    callback
    A function that is called when the version retrieval has completed, with the Teamspace object as the argument, or null if no teamspace.
    params
    An object containing parameters to control the request to the server. For example, you can set the retrieve to be performed in the background. See ecm.model.Request for a list of parameters supported by a server request.

    retrieveThumbnail(callback, params)

    Retrieves the thumbnail for the content item. This method only supports the Box repository type.
    Parameters:
    callback
    A function that is called when the thumbnail retrieval has completed.
    params
    An object containing additional parameters and request callbacks. Parameters include:
    • requestHeaders - Parameters intended for the Request Header. When requestHeaders is provided, the caller is responsible for optionally setting the "Cache-Control" request header, as a default option will not be set. When requestHeaders is not provided, "Cache-Control" "no-cache" is used.
    • requestParams - Parameters intended for the URL (for GET requests) or request body (for POST requests).
    • cancellable - Flag indicating if the request can be canceled
    • notifyOnCancel - Flag indicating that if a cancellable request is canceled, a notification will be sent to the service, so that it can clean up and exit immediately
    • backgroundRequest - Flag indicating if the request should be run in the background.
    • requestFailedCallback - Callback method called when a request returns from the server with errors.

    retrieveVersion(version, callback)

    Returns an instance of ecm.model.ContentItem for the requested version of this content item.
    Parameters:
    version
    Identifies a specific version to return. This can be a specific version string or one of the following special strings:
    • "released"

      On FileNet P8 and CMIS, this is the released version. On Content Manager, this is the same as "current".

    • "current"

      The current version. On FileNet P8 and CMIS, if minor versions exist this will be the newest minor version, otherwise it will be the released version.

    • "reservation"

      On FileNet P8 and CMIS, this is the check out reservation version. On Content Manager, this is the same as the "current" version. On FileNet P8 and CMIS, if there is no reservation version (no checkout) then null is returned.

    callback
    A function that is called when the version retrieval has completed.

    saveAttributes(attributes, newTemplatename, childComponentValues, permissions, checkIn, callback, isBackgroundRequest, onError, params)

    Updates the attribute values of this item. The attributes are saved to the repository.
    Parameters:
    attributes
    An object containing the attribute values, keyed by attribute identifier.
    newTemplatename
    The new content class for the content item.
    childComponentValues
    The child component values to be save. (IBM Content Manager only)
    permissions
    The permissions to be saved
    checkIn
    A boolean value indicating whether this operation should check in the item.
    callback
    A function that is invoked after the attributes have been updated. If errors are found with the attribute values, an object is passed to this callback which indicates the field, error message, and values in error.
    isBackgroundRequest
    A boolean flag indicating that this add request should be placed in a background process.
    onError
    A callback function that is called if there is an error returned when updating this item.
    params

    saveEntryTemplateFolderAssociations(callback, entryTemplateFolderAssociations, checkIn)

    Saves Entry Templates that are associated with the folder.
    Parameters:
    callback
    A function that is called after the associated entry templates are saved
    entryTemplateFolderAssociations
    An array of EntryTemplateFolderAssociation. It will be saved as annotation to p8 folder.
    checkIn
    A boolean value indicating whether this operation should check in the item.
    Since:
    2.0.3

    share(data, callback)

    Shares a document to Box.
    Parameters:
    data
    An object holding data about the share to be created.
    callback
    A function that is called after the recommendations are retrieved.
    Since:
    2.0.3.6

    unloadFolderContents()

    Removes any cached folder contents so that they will be retrieved from the server on the next call to retrieveFolderContents. This differs from refresh in that an onChange event is not fired. It is usually used in situations where the folder contents have known to have changed but the folder itself is not visible.

    unloadRelated()

    Removes any cached related items so that they will be retrieved from the server on the next call to retrieveRelated. This differs from refresh in that an onChange event is not fired. It is usually used in situations where the related items have known to have changed but the item itself is not visible.

    update(item, skipOnChange)

    Updates this item from the contents of the passed-in item. The update is allowed only if it is for the same document. The context of this item (result set, parent, and repository) is preserved.
    Parameters:
    item
    An ecm.model.ContentItem object to update.
    skipOnChange
    A boolean value indicating whether the onChange event should be called as part of this update process.

    updateNotelogs(callback, errorback, content, createVersion, background)

    Updates the notelog of this item.
    Parameters:
    callback
    A function that is called after the notelog is retrieved.
    errorback
    A function that is called after an error occurs.
    content
    The content that will be appended to the notelog.
    createVersion
    Specification of whether to create a new notelog version. The result also depends on the setting of notelog part version control in the Content Manager server.
    background
    Since:
    2.0.2