|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.compoze.exchange.AbstractItem
This class represents an Exchange item, which can either be a message or
a folder. An item contains any number of properties that correspond to
properties or the results of a method call on the message or folder in
Exchange. Accessor methods for the properties do not modify of retrieve
from the server immediately. For changes to be committed the
serverUpdate
method must be called. Properties must be
explicitly loaded into the item before they can be accessed. This is done
by specifying the desired properties when the item is initially created.
Field Summary | |
protected PropertyValue[] |
m_props
|
protected Session |
m_session
|
Constructor Summary | |
protected |
AbstractItem(Session session,
PropertyValue[] props)
Constructor. |
Method Summary | |
PropertyValue |
get(PropertyKey key)
Gets the value of a property from the item. |
boolean |
getBoolean(PropertyKey key)
Gets a boolean property from the item. |
byte[] |
getByteArray(PropertyKey key)
Gets a byte array property from the item. |
java.util.Date |
getDate(PropertyKey key)
Gets a date property from the item. |
double |
getDouble(PropertyKey key)
Gets a double property from the item. |
int |
getInt(PropertyKey key)
Gets an int property from the item. |
PropertyValue[] |
getInvalidPropertyValues()
Gets the invalid property values for this item. |
PropertyKey[] |
getPropertyKeys()
Gets the keys of all of the currently loaded properties. |
java.lang.String |
getString(PropertyKey key)
Gets a String property from the item. |
java.lang.String[] |
getStringArray(PropertyKey key)
Gets a String array property from the item. |
protected PropertyValue[] |
getUpdatedPropertyValues()
Gets the updated property values. |
abstract void |
serverUpdate()
Queries the server to update any changed properties. |
void |
set(PropertyValue value)
Sets the value of a property, or adds a new value if it is not already set. |
void |
setBoolean(PropertyKey key,
boolean bValue)
Sets the boolean value of a property. |
void |
setByteArray(PropertyKey key,
byte[] arrayValue)
Sets a byte array property from the item. |
void |
setDate(PropertyKey key,
java.util.Date date)
Sets the date value of a property. |
void |
setDouble(PropertyKey key,
double dValue)
Sets the double value of a property. |
void |
setInt(PropertyKey key,
int iValue)
Sets the int value of a property. |
void |
setString(PropertyKey key,
java.lang.String sValue)
Sets the string value of a property. |
void |
setStringArray(PropertyKey key,
java.lang.String[] arrayValue)
Sets a String array property from the item. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Session m_session
protected PropertyValue[] m_props
Constructor Detail |
protected AbstractItem(Session session, PropertyValue[] props)
Method Detail |
public PropertyValue get(PropertyKey key)
key
- the property keynull
if the property is not loadedpublic void set(PropertyValue value)
the
- property valuepublic void setString(PropertyKey key, java.lang.String sValue) throws ExchangeException
key
- the property keysValue
- the string valueExchangeException
- if the property key's value type is not a stringpublic void setStringArray(PropertyKey key, java.lang.String[] arrayValue) throws ExchangeException
key
- the property keyarrayValue
- the string array valueExchangeException
- if the property key is not foundpublic void setByteArray(PropertyKey key, byte[] arrayValue) throws ExchangeException
key
- the property keyarrayValue
- the byte array valueExchangeException
- if the property key is not foundpublic void setInt(PropertyKey key, int iValue) throws ExchangeException
key
- the property keyiValue
- the int valueExchangeException
- if the property key's value type is not an intpublic void setDouble(PropertyKey key, double dValue) throws ExchangeException
key
- the property keydValue
- the double valueExchangeException
- if the property key's value type is not an intpublic java.lang.String getString(PropertyKey key) throws ExchangeException
key
- the property keyExchangeException
- if the property key is not foundpublic byte[] getByteArray(PropertyKey key) throws ExchangeException
key
- the property keyExchangeException
- if the property key is not foundpublic java.lang.String[] getStringArray(PropertyKey key) throws ExchangeException
key
- the property keyExchangeException
- if the property key is not foundpublic int getInt(PropertyKey key) throws ExchangeException
key
- the property keyExchangeException
- if the property key is not foundpublic double getDouble(PropertyKey key) throws ExchangeException
key
- the property keyExchangeException
- if the property key is not foundpublic boolean getBoolean(PropertyKey key) throws ExchangeException
key
- the property keyExchangeException
- if the property key is not foundpublic void setBoolean(PropertyKey key, boolean bValue) throws ExchangeException
key
- the property keybValue
- the boolean valueExchangeException
- if the property key's value type is not an intpublic void setDate(PropertyKey key, java.util.Date date) throws ExchangeException
key
- the property keydate
- the dateExchangeException
- if the property key's value type is not an intpublic java.util.Date getDate(PropertyKey key) throws ExchangeException
key
- the property keyExchangeException
- if the property key is not foundprotected PropertyValue[] getUpdatedPropertyValues()
null
if no properties have been updatedpublic PropertyValue[] getInvalidPropertyValues()
public PropertyKey[] getPropertyKeys()
public abstract void serverUpdate() throws ExchangeException
|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |