com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class MessageObjectProperty



  • public final class MessageObjectProperty
    extends Object

    Represents a property on a MessageObject.

    • Constructor Detail

      • MessageObjectProperty

        public MessageObjectProperty(long propertyTag,
                             int flags,
                             Object value)

        Initializes a new instance of the MessageObjectProperty class.

        Parameters:
        propertyTag - The property tag.
        flags - The flags to be set on.
        value - The value of the property.
        Throws:
        com.aspose.ms.System.ArgumentNullException - If value is null.
        com.aspose.ms.System.ComponentModel.InvalidEnumArgumentException - If propertyTag contains invalid type definition."
      • MessageObjectProperty

        public MessageObjectProperty(int id,
                             int type,
                             int flags,
                             Object value)

        Initializes a new instance of the MessageObjectProperty class.

        Parameters:
        id - The id.
        type - The type of the property.
        flags - The flags to be set on.
        value - The value of the property.
        Throws:
        com.aspose.ms.System.ArgumentNullException - If value is null.
        com.aspose.ms.System.ComponentModel.InvalidEnumArgumentException - If type is invalid."
    • Method Detail

      • getPropertyType

        public final int getPropertyType()

        Gets the type of the property.

        Value: The type of the property.
      • getFlags

        public final int getFlags()

        Gets the flags set on a property.

        Value: The flags.
      • getId

        public final int getId()

        Gets the id of the property.

        Value: The id if the property.
      • getPropertyTag

        public final long getPropertyTag()

        Gets the property tag, a combined value which contains Id(getId()) and PropertyType(getPropertyType())

        Value: The property tag.
      • getGuid

        public final UUID getGuid()

        Gets or sets the GUID for the named property.

        Value: The GUID.
      • setGuid

        public final void setGuid(UUID value)

        Gets or sets the GUID for the named property.

        Value: The GUID.
      • getPropertyKind

        public final int getPropertyKind()

        Gets or sets the kind of the property if it's named.

        Value: The kind of the property.
      • setPropertyKind

        public final void setPropertyKind(int value)

        Gets or sets the kind of the property if it's named.

        Value: The kind of the property.
      • getName

        public final String getName()

        Gets or sets the name of the property if it's named.

        Value: The name.
      • setName

        public final void setName(String value)

        Gets or sets the name of the property if it's named.

        Value: The name.
      • getNameId

        public final long getNameId()

        Gets or sets the name id of the property if it's named.

        Value: The name id.
      • setNameId

        public final void setNameId(long value)

        Gets or sets the name id of the property if it's named.

        Value: The name id.
      • getNamed

        public final boolean getNamed()

        Gets a value indicating whether this MessageObjectProperty is a named property.

        Value: true if named; otherwise, false.


        A named property is determined by its ID, the range for such ids is [0x8000,0xfffe].

      • getAtomic

        public final boolean getAtomic()

        Gets a value indicating whether this MessageObjectProperty is atomic.

        Value: true if atomic; otherwise, false.
      • getValue

        public final Object getValue()

        Gets or sets the value of the property.

        Throws:
        com.aspose.ms.System.ArgumentNullException - If passed value is null. Value: The value.
      • setValue

        public final void setValue(Object value)

        Gets or sets the value of the property.

        Throws:
        com.aspose.ms.System.ArgumentNullException - If passed value is null. Value: The value.
      • toInt

        public final int toInt()

        Converts the value of the property to integer.

        Returns:
        Integer value, if type can't be converted to integer returns 0.
      • toDateTime

        public final Date toDateTime()

        Converts the value of the property to DateTime.

        Returns:
        DateTime value, if type can't be converted to DateTime returns java.util.Date#MinValue.


        This method doesn't provide automatic conversion of the data types, e.g. if MessageObjectProperty.Value(getValue()/setValue(Object)) property is of type default value will be returned.

      • toStringRepresentation

        public final String toStringRepresentation()

        Converts the value of the property to string.

        Returns:
        String value, if type can't be converted to string returns empty string.


        This method doesn't provide automatic conversion of the data types, e.g. if MessageObjectProperty.Value(getValue()/setValue(Object)) property is of type default value will be returned.

      • toList

        public com.aspose.ms.System.Collections.IList toList()

        Converts the value of the property to a list of values.

        Returns:
        IList implementation, if type can't be converted to IList returns empty list implementation.


        This method doesn't provide automatic conversion of the data types, e.g. if MessageObjectProperty.Value(getValue()/setValue(Object)) property is of type default value will be returned.

      • toGuid

        public final UUID toGuid()

        Converts the value of the property to Guid(getGuid()/#setGuid(Guid)).

        Returns:
        Guid object, if type can't be converted to Guid returns empty GUID.


        This method doesn't provide automatic conversion of the data types, e.g. if MessageObjectProperty.Value(getValue()/setValue(Object)) property is of type default value will be returned.