com.ibm.mm.sdk.common

Class DKAttrDefICM

  • All Implemented Interfaces:
    dkAttrDef, java.io.Serializable


    public class DKAttrDefICM
    extends dkAbstractAttrDef
    IBM Content Manager (ICM) implementation of attribute definition.

    This class extends dkAbstractAttrDef to provide FileNet P8-specific attribute definition functionality. It wraps FileNet's PropertyDescription and maps FileNet property types to CM8 data types for compatibility.

    Key Features:

    • Wraps FileNet PropertyDescription for CM8 compatibility
    • Maps FileNet TypeID to CM8 data types
    • Supports multi-valued and searchable attribute detection
    • Automatic synchronization with FileNet property metadata

    Type Mapping:

    • STRING → DK_CM_DATATYPE_STRING
    • LONG → DK_CM_DATATYPE_INTEGER
    • DOUBLE → DK_CM_DATATYPE_DECIMAL
    • DATE → DK_CM_DATATYPE_TIMESTAMP
    • BOOLEAN → DK_CM_DATATYPE_BOOLEAN
    • BINARY → DK_CM_DATATYPE_BLOB
    • OBJECT → DK_CM_DATATYPE_OBJECT

    Example usage:

     PropertyDescription propDesc = classDesc.get_PropertyDescriptions().get("DocumentTitle");
     DKAttrDefICM attrDef = new DKAttrDefICM(propDesc);
    
     logger.info("Name: {}", attrDef.getName());
     logger.info("Type: {}", attrDef.getType());
     logger.info("Multi-valued: {}", attrDef.isMultiValued());
     logger.info("Searchable: {}", attrDef.isSearchable());
     
    See Also:
    dkAbstractAttrDef, dkAttrDef, PropertyDescription, DKConstant, Serialized Form
    • Constructor Detail

      • DKAttrDefICM

        public DKAttrDefICM()
        Constructs an empty attribute definition.
      • DKAttrDefICM

        public DKAttrDefICM(com.filenet.api.meta.PropertyDescription propertyDescription)
        Constructs an attribute definition from a FileNet PropertyDescription.

        Automatically extracts and maps the following metadata:

        • Symbolic name → attribute name
        • Display name → attribute description
        • Data type → CM8 type constant
        • Value required flag → nullable flag (inverted)
        Parameters:
        propertyDescription - the FileNet property description to wrap
    • Method Detail

      • getPropertyDescription

        public com.filenet.api.meta.PropertyDescription getPropertyDescription()
        Gets the underlying FileNet PropertyDescription.
        Returns:
        the FileNet property description, or null if not set
      • setPropertyDescription

        public void setPropertyDescription(com.filenet.api.meta.PropertyDescription propertyDescription)
        Sets the FileNet PropertyDescription and synchronizes metadata.

        When a new PropertyDescription is set, all attribute metadata (name, description, type, nullable) is automatically updated from the FileNet property metadata.

        Parameters:
        propertyDescription - the FileNet property description to set
      • isMultiValued

        public boolean isMultiValued()
        Checks if this attribute can hold multiple values.

        Returns true if the FileNet property has LIST cardinality, indicating it can store multiple values (array/collection).

        Returns:
        true if the attribute is multi-valued, false otherwise
      • isSearchable

        public boolean isSearchable()
        Checks if this attribute is searchable in queries.

        Returns the searchable flag from the FileNet PropertyDescription. Searchable properties can be used in WHERE clauses and full-text searches.

        Returns:
        true if the attribute is searchable, false otherwise
      • toString

        public java.lang.String toString()
        Returns a string representation of this attribute definition.
        Overrides:
        toString in class dkAbstractAttrDef
        Returns:
        string containing name, description, type, nullable, multi-valued, and searchable flags
Copyright © 2024 IBM Corporation

Copyright © 2024 IBM Corporation. All rights reserved.