Class ecm.model._HasAttributesMixin

Provides methods that are used to handle content class attributes. ContentClass and SearchContentClasses mixes in _HasAttributesMixin.
Defined in: <ecm\model\_HasAttributesMixin.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 

Method Summary

Method Attributes Method Name and Description
 
Returns true if any attribute in the class is marked as having dependent attributes.
 
 
retrieveAttributeDefinitions(callback, isBackgroundRequest, onError)
Retrieves detailed attribute information for the content class.
 
retrieveAttributeDefinitionsForSearches(callback, includeSubclassDefinitions, onError)
Retrieves detailed attribute information for the content class.
 
Retrieves attribute information similar to ContentClass but updated or restricted according to a list of attribute values.
 
retrieveDependentAttributeDefinitions(attributes, childComponentValues, callback, isBackgroundRequest, onError)
Retrieves attribute information similar to ContentClass but updated or restricted according to a list of attribute values.
 
setAttributeDefinitions(attributeDefinitions)
Sets the list of attribute information.
 
Clears the attribute information that had been previously retrieved.

Constructor Detail

ecm.model._HasAttributesMixin()

Method Detail

hasDependentAttributes()

Returns true if any attribute in the class is marked as having dependent attributes. If the attribute definitions have not been retrieve then this will return true.

isPseudoClass()


retrieveAttributeDefinitions(callback, isBackgroundRequest, onError)

Retrieves detailed attribute information for the content class.
Parameters:
callback
A function that is invoked when the retrieval completes. The attribute definitions are passed to this function as an array of ecm.model.AttributeDefinition objects.
isBackgroundRequest
If true, this service call to retrieve attribute information will be handled silently in the background without any status dialogs or cursor changes.
onError
Since:
2.0.3 A callback function called if there is an error returned from the request.

retrieveAttributeDefinitionsForSearches(callback, includeSubclassDefinitions, onError)

Retrieves detailed attribute information for the content class. Some attribute properties needed for authoring and editing are not returned by this call to cut down the cache size.
Parameters:
callback
A function that is invoked when the retrieval completes. The attribute definitions are passed to this function as an array of ecm.model.AttributeDefinition objects.
includeSubclassDefinitions
A boolean value indicating if subclass definitions will be included in the retrieval.
onError
Since:
2.0.3 A callback function called if there is an error returned from the request.

retrieveDependentAttrDefs(params)

Retrieves attribute information similar to ContentClass but updated or restricted according to a list of attribute values. This method is used to provide dependent behavior between properties when specifying their values in property editors and add dialogs. The server may return different attribute information based on the properties in the context object.
Parameters:
params
An object containing the parameter properties listed below.
  • attributes
    An object containing the attribute values, keyed by attribute identifier.

  • childComponentValues
    IBM Content Manager only. An object containing child component values, keyed by child component identifier.

  • context
    An object containing additional context properties that will be passed to the server. Only string values are supported. May include:

  • callback
    A function invoked when the attribute information has been retrieved. It is passed:
    1. An array of ecm.model.AttributeDefinition objects for those attributes that have potentially changed properties due to the attribute values passed in. Note that this array does not usually contain all of the attributes of the content class.

    2. An array of ecm.model.ChildComponentDefinition objects for child components definitions that have potentially changed.

    3. An array of ecm.model.ChildComponent objects for child components that have potentially changed.

  • isBackgroundRequest
    A boolean value indicating whether the request should be run in the background.

  • onError
    A callback function called if there is an error returned from the request.
Since:
2.0.3

retrieveDependentAttributeDefinitions(attributes, childComponentValues, callback, isBackgroundRequest, onError)

Retrieves attribute information similar to ContentClass but updated or restricted according to a list of attribute values. This method is used to provide dependent behavior between properties when specifying their values in property editors and add dialogs.
Parameters:
attributes
An object containing the attribute values, keyed by attribute identifier.
childComponentValues
IBM Content Manager only. An object containing child component values, keyed by child component identifier.
callback
A function invoked when the attribute information has been retrieved. It is passed:
  1. an array of ecm.model.AttributeDefinition objects for those attributes that have potentially changed properties due to the attribute values passed in. Note that this array does not usually contain all of the attributes of the content class.
  2. an array of ecm.model.ChildComponentDefinition objects for child components definitions that have potentially changed
  3. an array of ecm.model.ChildComponent objects for child components that have potentially changed.
isBackgroundRequest
A boolean value indicating whether the request should be run in the background.
onError
A callback function called if there is an error returned from the request.
Deprecated:
2.0.3

setAttributeDefinitions(attributeDefinitions)

Sets the list of attribute information. Can be used to pass in pseudo attribute definitions.
Parameters:
attributeDefinitions
A list of Properties passed in externally (instead of being retrieved from the repository).

unloadAttributeDefinitions()

Clears the attribute information that had been previously retrieved. The next call to retrieveAttributeDefinitions will re-acquire the information from the content server.