Class ecm.model.AttributeDefinition
Extends
ecm.model._ModelObject.
Represents the definition of an attribute for a class of items in a repository. The type of items in the
class depends on the repository:
Repository | Class and attributes |
---|---|
IBM Content Manager | Item type and user and system attributes |
IBM FileNet P8 | Class and user properties |
IBM Content Manager OnDemand | Application |
Private functions should not be used to access public members of the class. Access member variables directly. For example:
var attrDef = new AttributeDefinition({ id: "symbolicName", name: "propertyName", dataType: "xs:string"
});
console.debug("Data type=" + attrDef.dataType);
Defined in: <ecm\model\AttributeDefinition.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
Field Summary
Field Attributes | Field Name and Description |
---|---|
An array of allowed values for the attribute.
|
|
An array of operators that can be selected when building the search criteria.
|
|
The cardinality of the attribute.
|
|
A choice list for the attribute.
|
|
The instance of ecm.model.ContentClass containing this attribute.
|
|
The data type of the attribute.
|
|
The default value to use for the attribute.
|
|
Indicates the description of the property.
|
|
The foreign key value (CM only).
|
|
The format of the attribute.
|
|
Returns a human-readable description of the format pattern.
|
|
Boolean indicating if by changing this attribute other attribute values may become invalid or if their choice
lists may change.
|
|
Boolean value indicating that the attribute should be hidden from the user in displays.
|
|
A P8 marking list for the attribute.
|
|
The maximum length in characters for the attribute.
|
|
The maximum value for the attribute.
|
|
The minimum length in characters for the attribute.
|
|
The minimum value for the attribute.
|
|
Boolean value indicating if this attribute can have a null value.
|
|
A boolean value indicating open choice setting (CMIS only).
|
|
Boolean value indicating whether the attribute can be sorted.
|
|
A custom property editor widget class to use when creating an editor for the attribute within the
ecm.widget.SinglePropertyEditorFactory.
|
|
A custom property formatter widget class to use when displaying the attribute within a property grid.
|
|
Boolean value indicating that the value is read-only.
|
|
The repository type of the attribute.
|
|
Boolean value indicating that a value is required for the attribute.
|
|
For P8 object data type, the name of the class for which a selected document must have.
|
|
Boolean indicating if this attribute can be searched.
|
|
An indicator of the appropriate places where the attribute value should be set.
|
|
A boolean value indicating whether this is a sub-class attribute.
|
|
Boolean value indicating that the attribute is system defined.
|
|
Boolean indicating if this attribute can be text searched.
|
|
Boolean value.
|
|
Boolean indicating if an attribute uses a long column.
|
- Fields borrowed from class ecm.model._ModelObject:
- categorization, id, isRecurring, name, nameFilter, pane, status, type, userId
Method Summary
Method Attributes | Method Name and Description |
---|---|
<static> |
ecm.model.AttributeDefinition.AttributeDefinition.allValuesInChoiceList(choiceList, value)
Static function that determines if the passed in single value, or all values in the array of values, are found in
the choice list.
|
<static> |
ecm.model.AttributeDefinition.AttributeDefinition.isArray(value)
Static function that determines if the passed in value is an array.
|
<static> |
ecm.model.AttributeDefinition.AttributeDefinition.isValueEmpty(value)
Static function that determines if the passed in value is considered to be empty.
|
<static> |
ecm.model.AttributeDefinition.AttributeDefinition.valueInChoiceList(choiceList, value)
Static function that determines if the passed in single value is found in the choice list.
|
clone()
Returns a clone of this attribute definition.
|
|
getMetaData(metaName)
Returns the extended meta data value.
|
|
setMetaData(metaName, metaData)
Adds an extended meta data value to the attribute definition.
|
Field Detail
allowedValues
An array of allowed values for the attribute.
availableOperators
An array of operators that can be selected when building the search criteria. The list of operators must be
appropriate for the attribute's data type, allowed values, and repository type. For example, when an
attribute is a single-valued string data type that uses a long column in a FileNet Content Manager
repository, you can assign the following array of operators: [ "STARTSWITH", "ENDSWITH", "LIKE", "NOTLIKE",
"NULL", "NOTNULL" ].
- Since:
- 2.0.3.4
cardinality
The cardinality of the attribute. This has two valid values:
- SINGLE: The attribute can have only a single value
- MULTI: The attribute can have multiple values
choiceList
A choice list for the attribute.
contentClass
The instance of ecm.model.ContentClass containing this attribute.
dataType
The data type of the attribute. Can have these values:
- xs:date: A date value
- xs:time: A time value
- xs:timestamp: A time stamp value
- xs:decimal: A decimal value
- xs:double: A double-precision floating point value
- xs:short: A 16-bit signed integer
- xs:integer: A 32-bit signed integer
- xs:long: A 64-bit signed integer
- xs:string: A string
- xs:string:alpha: A string, only alphabetic characters
- xs:string:alphanum: A string, only alpha-numeric characters
- xs:string:ext: A string with extended characters
- xs:string:num: A string, only numeric characters
- xs:binary: A binary value
- xs:object: A reference to an object
- xs:guid: A system identifier for an object
defaultValue
The default value to use for the attribute.
description
Indicates the description of the property.
- Since:
- 2.0.2.3
foreignKey
The foreign key value (CM only).
format
The format of the attribute.
formatDescription
Returns a human-readable description of the format pattern.
hasDependentAttributes
Boolean indicating if by changing this attribute other attribute values may become invalid or if their choice
lists may change.
hidden
Boolean value indicating that the attribute should be hidden from the user in displays.
markingList
A P8 marking list for the attribute.
maxLength
The maximum length in characters for the attribute.
maxValue
The maximum value for the attribute.
minLength
The minimum length in characters for the attribute.
minValue
The minimum value for the attribute.
nullable
Boolean value indicating if this attribute can have a null value.
openChoice
A boolean value indicating open choice setting (CMIS only).
orderable
Boolean value indicating whether the attribute can be sorted.
propertyEditor
A custom property editor widget class to use when creating an editor for the attribute within the
ecm.widget.SinglePropertyEditorFactory. For example: "mywidgets/MyPropertyEditor"
- Since:
- 2.0.2
propertyFormatter
A custom property formatter widget class to use when displaying the attribute within a property grid. For
example: "mywidgets/MyPropertyFormatter"
- Since:
- 2.0.2
readOnly
Boolean value indicating that the value is read-only.
repositoryType
The repository type of the attribute.
required
Boolean value indicating that a value is required for the attribute.
requiredClass
For P8 object data type, the name of the class for which a selected document must have.
searchable
Boolean indicating if this attribute can be searched.
settability
An indicator of the appropriate places where the attribute value should be set. Can have these values:
- readOnly
- onlyBeforeCheckin
- onlyOnCreate
- readWrite
subClassAttribute
A boolean value indicating whether this is a sub-class attribute.
system
Boolean value indicating that the attribute is system defined.
textSearchable
Boolean indicating if this attribute can be text searched.
uniqueValues
Boolean value.
For P8 repositories:
If
If
For CM repositories:
If
If
For P8 repositories:
If
true
, when this attribute is multi-valued then the repository does not allow a particular
value to appear more than once in the values for this attribute.If
false
, the repository allows duplicate values.For CM repositories:
If
true
, the repository requires a unique value for this attribute across all documents that
are instances of the class that contains this attribute definition.If
false
, the value for this attribute can exist in other documents that are instances of the
class that contains this attribute definition.usesLongColumn
Boolean indicating if an attribute uses a long column.
Method Detail
<static> ecm.model.AttributeDefinition.AttributeDefinition.allValuesInChoiceList(choiceList, value)
Static function that determines if the passed in single value, or all values in the array of values, are found in
the choice list. If values is undefined, null, "", [], or [""] then it is treated as in the choice list.
- Parameters:
- choiceList
- A choice list
- value
- A single value or an array of values to check against the choice list. If an array, all of the values will be checked.
- Since:
- 2.0.3.7
- Returns:
- A boolean value,
true>/code> if all of the given values are found in the choice list.
<static>
ecm.model.AttributeDefinition.AttributeDefinition.isArray(value)
Static function that determines if the passed in value is an array.
- Parameters:
-
value
- The value check for being an array.
- Since:
- 2.0.3.7
- Returns:
- A boolean value,
true>/code> if the passed in value is an array.
<static>
ecm.model.AttributeDefinition.AttributeDefinition.isValueEmpty(value)
Static function that determines if the passed in value is considered to be empty.
Empty values are:
undefined
null
""
- typeof "string"
String("")
- typeof "object"
, instanceof String
- An empty array or array of length 1 that contains one of the empty values above.
The numeric value 0 is not considered to be an empty value.
- Parameters:
-
value
- The value to test for empty.
- Returns:
- A boolean value,
true>/code> if the passed in value is considered to be empty.
<static>
ecm.model.AttributeDefinition.AttributeDefinition.valueInChoiceList(choiceList, value)
Static function that determines if the passed in single value is found in the choice list. An empty value
(undefined, null, or "") is treated as in the choice list.
- Parameters:
-
choiceList
- A choice list
-
value
- A single value (not an array of values) that will checked against the choice list.
- Since:
- 2.0.3.7
- Returns:
- A boolean value,
true>/code> if the given value is found in the choice list.
clone()
Returns a clone of this attribute definition. All contents are cloned except for the content class,
repository, and choice list. The content class, repository, and choice list references are copied.
getMetaData(metaName)
Returns the extended meta data value.
- Parameters:
-
metaName
- A string holding the meta data field name
setMetaData(metaName, metaData)
Adds an extended meta data value to the attribute definition.
- Parameters:
-
metaName
- A string value holding the addition meta data name
-
metaData
- A object holding the meta data value.