Class ecm.model.Item
Extends
ecm.model._ModelObject.
Represents an item in a repository. An item can be a document, folder, work item, or other resource that
is managed by the repository.
Typically, an item is obtained from a result set. However, an item can be obtained directly by using the ecm.model.Repository.retrieveItem method.
Important: The attributes or properties of an item might not be completely retrieved initially. To ensure that all attributes of an item are retrieved, call the ecm.model.Item.retrieveAttributes method.
Defined in: <ecm\model\Item.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
ecm.model.Item(properties)
Constructs an item.
|
Field Summary
Field Attributes | Field Name and Description |
---|---|
The attributes object contains the values for the user and system attributes associated with this item.
|
|
A boolean indicating that this repository item is a simple property container.
|
|
A boolean indicating that the item is deleted on the server.
|
|
The identifier of the entry template used to add this item, if any.
|
|
A boolean indicating if the item is locked on the server.
|
|
The userid of the user who has locked the item on the server.
|
|
The type of the item.
|
|
An instance of ecm.model.Item for the item that is the parent of this item, if any.
|
|
A bitstring containing privileges for the item.
|
|
An instance of ecm.model.Repository representing the repository on which this item is (or will be)
stored.
|
|
An instance of ecm.model.ResultSet representing the result set that this item was obtained from, if
any.
|
- Fields borrowed from class ecm.model._ModelObject:
- categorization, id, isRecurring, name, nameFilter, pane, status, type, userId
Method Summary
Method Attributes | Method Name and Description |
---|---|
containsValue(attribute, value)
Returns true if the specified attribute has the value given.
|
|
getAttributeFormat(attribute)
Returns the format of the attribute.
|
|
getAttributeType(attribute)
Returns the type of the attribute.
|
|
getAttrLabel(attribute)
Returns the custom label for this System Property
|
|
Returns an instance of ecm.model.ContentClass for items of this class, if known.
|
|
getDisplayValue(attribute)
Returns the attribute value in a format that can be displayed in the user interface.
|
|
getItemValue(attribute)
For xs:object property type, returns the Item value, if it was retrieved with this Item.
|
|
Returns the MIME class (file type) for this item's MIME type.
|
|
Returns the date when this item was last modified.
|
|
Returns the user identifier for the user that last modified the item.
|
|
getPath()
Returns an array of the complete path.
|
|
getStateClass(state)
Returns the State icon CSS class for that specified state
|
|
getUserInfo(propertyName)
Returns the user information for the given property name.
|
|
getValue(attribute)
Returns the value of an attribute.
|
|
getValues(attribute)
Returns an array of values for the attribute.
|
|
hasAttribute(attribute)
Returns true if the attribute exists on this item.
|
|
hasPrivilege(privilege)
Returns true if this item has the specified privilege.
|
|
isAttributeReadOnly(attribute)
Returns true if the attribute is read only, otherwise returns false.
|
|
Returns true if the item is an entry template that declares records.
|
|
Returns true if the item is an entry template that creates documents.
|
|
Returns true if the item is an entry template.
|
|
isFolder()
Returns true if the item is a container of other items.
|
|
Returns true if the item is an entry template that creates folders.
|
|
isSystemProperty(attribute)
Checks if a given attribute is a System Property
|
|
retrieveAttributes(callback)
Retrieves all attributes for the item.
|
|
setValue(attribute, value)
|
|
setValues(attribute, values)
|
Constructor Detail
ecm.model.Item(properties)
- Parameters:
- properties
- The properties for the item. The properties can be any of the public fields as defined below and on ecm.model._ModelObject.
Field Detail
attributes
dataObject
- Since:
- 2.0.2
deleted
entryTemplateId
locked
lockedUser
mimetype
parent
privileges
repository
resultSet
Method Detail
containsValue(attribute, value)
- Parameters:
- attribute
- The identifier for the attribute.
- value
- The value to test.
{string} getAttributeFormat(attribute)
- Parameters:
- attribute
- The attribute name
- Returns:
- {string} The format of the attribute
{string} getAttributeType(attribute)
- Parameters:
- attribute
- The attribute name
- Returns:
- {string} The type of the attribute
getAttrLabel(attribute)
- Parameters:
- attribute
- The attribute identifier.
getContentClass()
getDisplayValue(attribute)
Note: The display value is normally created by using ValueFormatter.formatValue based on the attribute value and thus will change if the attribute value is changed (using setValue). However, if a special display value was returned for the attribute from the the server then the display value will not change even if the value is changed using setValue.
- Parameters:
- attribute
- The name of the attribute.
getItemValue(attribute)
- Parameters:
- attribute
- The attribute identifier.
- Since:
- 2.0.2
getMimeClass()
getModifyDate()
getModifyUser()
getPath()
getStateClass(state)
- Parameters:
- state
- The id from Admin of the particular state class you are looking for
getUserInfo(propertyName)
- Parameters:
- propertyName
- Since:
- 2.0.3
getValue(attribute)
- Parameters:
- attribute
- The attribute identifier.
getValues(attribute)
- Parameters:
- attribute
- The attribute identifier.
hasAttribute(attribute)
- Parameters:
- attribute
- The attribute identifier to test.
hasPrivilege(privilege)
- Parameters:
- privilege
isAttributeReadOnly(attribute)
- Parameters:
- attribute
- The name of the attribute.
isDeclareRecordEntryTemplate()
- Since:
- 2.0.3
isDocumentEntryTemplate()
- Since:
- 2.0.3
isEntryTemplate()
- Since:
- 2.0.3
isFolder()
isFolderEntryTemplate()
- Since:
- 2.0.3
isSystemProperty(attribute)
- Parameters:
- attribute
retrieveAttributes(callback)
- Parameters:
- callback
- A function that is called when the attribute refresh has completed.
setValue(attribute, value)
- Parameters:
- attribute
- value
setValues(attribute, values)
- Parameters:
- attribute
- values