DocumentProperty

DocumentProperty class

Represents a custom or built-in document property.

class DocumentProperty;

Methods

MethodDescription
getName()Returns the name of the property.
isLinkedToContent()Indicates whether this property is linked to content
getSource()The linked content source.
getType()Gets the data type of the property.
isGeneratedName()Returns true if this property does not have a name in the OLE2 storage and a unique name was generated only for the public API.
toString()Returns the property value as a string.
toInt()Returns the property value as integer.
toDouble()Returns the property value as double.
toDateTime()Returns the property value as DateTime in local timezone.
toBool()Returns the property value as bool.

getName()

Returns the name of the property.

getName() : string;

isLinkedToContent()

Indicates whether this property is linked to content

isLinkedToContent() : boolean;

getSource()

The linked content source.

getSource() : string;

getType()

Gets the data type of the property.

getType() : PropertyType;

Returns

PropertyType

isGeneratedName()

Returns true if this property does not have a name in the OLE2 storage and a unique name was generated only for the public API.

isGeneratedName() : boolean;

toString()

Returns the property value as a string.

toString() : string;

Remarks

Converts a number property using Object.ToString(). Converts a boolean property into "Y" or "N". Converts a date property into a short date string.

toInt()

Returns the property value as integer.

toInt() : number;

Remarks

Throws an exception if the property type is not PropertyType.Number.

toDouble()

Returns the property value as double.

toDouble() : number;

Remarks

Throws an exception if the property type is not PropertyType.Float.

toDateTime()

Returns the property value as DateTime in local timezone.

toDateTime() : Date;

Remarks

Throws an exception if the property type is not PropertyType.Date.

toBool()

Returns the property value as bool.

toBool() : boolean;

Remarks

Throws an exception if the property type is not PropertyType.Boolean.