com.aspose.email
Class MessageObjectProperty

java.lang.Object
  extended by com.aspose.email.MessageObjectProperty

public final class MessageObjectProperty
extends Object

Represents a property on a MessageObject.


Constructor Summary
MessageObjectProperty(int id, int type, int flags, Object value)
           Initializes a new instance of the MapiPropertyAtomic class.
MessageObjectProperty(long propertyTag, int flags, Object value)
           Initializes a new instance of the MapiPropertyAtomic class.
 
Method Summary
 boolean getAtomic()
           Gets a value indicating whether this MessageObjectProperty is atomic.
 int getFlags()
           Gets the flags set on a property.
 UUID getGuid()
           
 int getId()
           Gets the id of the property.
 String getName()
           Gets or sets the name of the property if it's named.
 boolean getNamed()
           Gets a value indicating whether this MessageObjectProperty is a named property.
 long getNameId()
           Gets or sets the name id of the property if it's named.
 int getPropertyKind()
           Gets or sets the kind of the property if it's named.
 long getPropertyTag()
           Gets the property tag, a combined value which contains Id and PropertyType
 int getPropertyType()
           Gets the type of the property.
 Object getValue()
           Gets or sets the value of the property.
 void setGuid(UUID value)
           
 void setName(String value)
           
 void setNameId(long value)
           
 void setPropertyKind(int value)
           
 void setValue(Object value)
           
 Date toDateTime()
           
 UUID toGuid()
           
 int toInt()
           Converts the value of the property to integer.
 List toList()
           Converts the value of the property to a list of values.
 String toStringRepresentation()
           Converts the value of the property to string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageObjectProperty

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

Initializes a new instance of the MapiPropertyAtomic class.

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

MessageObjectProperty

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

Initializes a new instance of the MapiPropertyAtomic 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.IllegalArgumentException - If value is null.
com.aspose.ms.System.InvalidEnumArgumentException - If type is invalid."
Method Detail

getPropertyType

public int getPropertyType()

Gets the type of the property.

Value: The type of the property.


getFlags

public int getFlags()

Gets the flags set on a property.

Value: The flags.


getId

public int getId()

Gets the id of the property.

Value: The id if the property.


getPropertyTag

public long getPropertyTag()

Gets the property tag, a combined value which contains Id and PropertyType

Value: The property tag.


getGuid

public UUID getGuid()

setGuid

public void setGuid(UUID value)

getPropertyKind

public int getPropertyKind()

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

Value: The kind of the property.


setPropertyKind

public void setPropertyKind(int value)

getName

public String getName()

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

Value: The name.


setName

public void setName(String value)

getNameId

public long getNameId()

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

Value: The name id.


setNameId

public void setNameId(long value)

getNamed

public 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 boolean getAtomic()

Gets a value indicating whether this MessageObjectProperty is atomic.

Value: true if atomic; otherwise, false.


getValue

public Object getValue()

Gets or sets the value of the property.

Throws:
com.aspose.ms.System.IllegalArgumentException - If passed value is null. Value: The value.

setValue

public void setValue(Object value)

toInt

public 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 Date toDateTime()

toStringRepresentation

public 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 property is of type default value will be returned.


toList

public List 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 property is of type default value will be returned.


toGuid

public UUID toGuid()


Copyright (c) 2002-2011 Aspose Pty Ltd. All Rights Reserved.