Compoze Software, Inc.

com.compoze.exchange.webdav
Class AbstractItem


java.lang.Object

  |

  +--com.compoze.exchange.webdav.AbstractItem

All Implemented Interfaces:
java.lang.Cloneable, IItem, java.io.Serializable
Direct Known Subclasses:
AbstractMessage, Folder

public abstract class AbstractItem
extends java.lang.Object
implements IItem, java.io.Serializable, java.lang.Cloneable

This class provides a skeletal implementation of the IItem interface, to minimize the effort required to implement the IItem interface.

The following table contains the properties defined in the Exchange store schema and mappings to their corresponding Java enumeration and methods:

Exchange Store Property Java Enumeration Java Methods
DAV:comment DavProperty.COMMENT getComment()
setComment(String)
DAV:contentclass DavProperty.CONTENT_CLASS getContentClass()
setContentClass(ContentClass)
DAV:creationdate DavProperty.CREATION_DATE getCreationDate()
DAV:displayname DavProperty.DISPLAY_NAME getDisplayName()
DAV:getlastmodified DavProperty.GET_LAST_MODIFIED getDateLastModified()
DAV:href DavProperty.HREF getHRef()
DAV:isfolder DavProperty.IS_FOLDER isFolder()
DAV:ishidden DavProperty.IS_HIDDEN isHidden()
setHidden(boolean)
DAV:isreadonly DavProperty.IS_READONLY isReadOnly()
setReadOnly(boolean)
DAV:isroot DavProperty.IS_ROOT isRoot()
http://schemas.microsoft.com/exchange/permanenturl ExchangeProperty.PERMANENT_URL getPermanentURL()
DAV:uid DavProperty.UID getUID()
setUID(String)

See Also:
Serialized Form

Method Summary
protected  java.lang.Object clone()
          Creates and returns a copy of this object.
 IItem copy(Folder destinationFolder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverCopyTo(Folder)
 IItem copy(java.lang.String sDestinationPath)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverCopyTo(String)
 IItem copy(java.lang.String sDestinationPath, boolean bServerRefresh)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverCopyTo(String, boolean)
protected  java.lang.String createFilename()
          Composes the filename for this item.
protected abstract  java.lang.String createFilename(int iIndex)
          Composes the filename for this item.
 void delete()
          Deletes this item from the Exchange Store.
 boolean equals(java.lang.Object o)
          Indicates whether some other AbstractItem object is "equal to" this one.
 boolean equals(java.lang.Object o, java.util.Locale locale)
          Indicates whether some other AbstractItem object is "equal to" this one.
 java.lang.String getComment()
          Gets the comment for this item.
 java.lang.String getContentClass()
          Gets the content class of this item.
 java.util.Date getCreationDate()
          Gets the date this item was created.
 java.util.Date getDateLastModified()
          Gets the date item was last modified.
static java.util.List getDefaultProperties()
          Gets a list of default properties pertaining to an item.
 java.lang.String getDisplayName()
          Gets the name that will be shown to the user in order to represent the resource.
 java.lang.String getFile()
          Gets the filename of this item.
 java.lang.String getHRef()
          Gets the absolute URL for this item.
 UniqueID getID()
          Gets the unique id for this item.
 Folder getParentFolder()
          Gets the parent folder for this item.
 java.lang.String getPermanentURL()
          Gets a permanent URL that can always be used to access this item, even if the URL to the item changed by renaming or moving it.
static java.util.List getProperties()
          Gets a list of properties pertaining to an item.
abstract  int getSize()
          Gets the size of this item (in bytes).
abstract  java.lang.String getType()
          Gets the type of this item.
 java.lang.String getUID()
          Gets the unique identifier (UID) for this item.
 boolean isFolder()
          Gets whether this item is a folder.
 boolean isHidden()
          Gets whether this item is hidden.
 boolean isReadOnly()
          Gets whether this item can be modified or deleted.
 boolean isRoot()
          Gets whether this item is a root folder.
 IItem move(Folder destinationFolder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverMoveTo(Folder)
 IItem move(java.lang.String sDestinationPath)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverMoveTo(String)
 IItem move(java.lang.String sDestinationPath, boolean bServerRefresh)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverMoveTo(String, boolean)
 void serverCopyTo(Folder destinationFolder)
          Request the server to copy the item to the specified folder.
 void serverCopyTo(Folder destinationFolder, boolean bServerRefresh)
          Request the server to copy the item to the specified folder.
 void serverCopyTo(java.lang.String sDestinationPath)
          Request the server to copy the item to the folder specifed by the given path.
 void serverCopyTo(java.lang.String sDestinationPath, boolean bServerRefresh)
          Request the server to copy the item to the folder specifed by the given path.
 void serverDelete()
          Requests the server to delete the item (the item is removed permanently).
 Folder serverGetParentFolder(java.util.List properties)
          Queries the server to get the parent folder.
 void serverMoveTo(Folder destinationFolder)
          Request the server to move the item to the specified folder.
 void serverMoveTo(Folder destinationFolder, boolean bServerRefresh)
          Request the server to move the item to the specified folder.
 void serverMoveTo(java.lang.String sDestinationPath)
          Request the server to move the item to the folder specifed by the given path.
 void serverMoveTo(java.lang.String sDestinationPath, boolean bServerRefresh)
          Request the server to move the item to the folder specifed by the given path.
 void serverUpdate()
          Requests the server to update the item of any changed properties.
 void serverUpdate(boolean bServerRefresh)
          Requests the server to update the item of any changed properties.
 void setComment(java.lang.String sComment)
          Sets the comment for this item.
 void setContentClass(ContentClass contentClass)
          Sets the content class of this item.
 void setContentClass(java.lang.String sContentClass)
          Sets the item's content class.
 void setHidden(boolean bHidden)
          Sets whether to hide the item.
 void setReadOnly(boolean bReadOnly)
          Sets whether this item can be modified or deleted.
protected  void setReleased(boolean bReleased)
          Sets whether this object has been released.
 void setType(IOutlookType type)
          Sets the type of this item.
abstract  void setType(java.lang.String sType)
          Sets the type of this item.
 void setUID(java.lang.String sUniqueId)
          Sets a unique identifier for an item.
 java.lang.String toString()
          Returns a string representation of the object.
 void update()
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverUpdate()
 void update(boolean bServerRefresh)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverUpdate(boolean)
protected  void validate()
          Validates that this object has not been released.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getDateLastModified


public java.util.Date getDateLastModified()
Gets the date item was last modified.

This field is read-only.

Specified by:
getDateLastModified in interface IItem
Returns:
the date item was last modified; null if not set
See Also:
DavProperty.GET_LAST_MODIFIED

isHidden


public boolean isHidden()
Description copied from interface: IItem
Gets whether this item is hidden.
Specified by:
isHidden in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Returns:
true if the item is hidden.
See Also:
DavProperty.IS_HIDDEN

setHidden


public void setHidden(boolean bHidden)
Description copied from interface: IItem
Sets whether to hide the item.
Specified by:
setHidden in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Returns:
bHidden true to hide the item; true otherwise.
See Also:
DavProperty.IS_HIDDEN

getType


public abstract java.lang.String getType()
Description copied from interface: IItem
Gets the type of this item. See OutlookMessageType and OutlookFolderType for a partial list of types.
Specified by:
getType in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Returns:
the type of the item.
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used.
See Also:
ExchangeProperty.OUTLOOK_MESSAGE_CLASS, ExchangeProperty.OUTLOOK_FOLDER_CLASS

setType


public void setType(IOutlookType type)
Description copied from interface: IItem
Sets the type of this item. See OutlookMessageType and OutlookFolderType for a partial list of types.
Specified by:
setType in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Parameters:
type - the type of the item.
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used.
See Also:
ExchangeProperty.OUTLOOK_MESSAGE_CLASS, ExchangeProperty.OUTLOOK_FOLDER_CLASS

setType


public abstract void setType(java.lang.String sType)
Description copied from interface: IItem
Sets the type of this item. See OutlookMessageType and OutlookFolderType for a partial list of types.
Specified by:
setType in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Parameters:
sType - the type of the item.
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used.
See Also:
ExchangeProperty.OUTLOOK_MESSAGE_CLASS, ExchangeProperty.OUTLOOK_FOLDER_CLASS

getContentClass


public java.lang.String getContentClass()
Description copied from interface: IItem
Gets the content class of this item.
Specified by:
getContentClass in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Returns:
the content class of the item.
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used.
See Also:
DavProperty.CONTENT_CLASS

setContentClass


public void setContentClass(ContentClass contentClass)
Description copied from interface: IItem
Sets the content class of this item.
Specified by:
setContentClass in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Parameters:
contentClass - the content class of the item.
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used.
See Also:
DavProperty.CONTENT_CLASS

setContentClass


public void setContentClass(java.lang.String sContentClass)
Sets the item's content class.
Parameters:
sContentClass - the content class of the item.
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used.

getComment


public java.lang.String getComment()
Description copied from interface: IItem
Gets the comment for this item.
Specified by:
getComment in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Returns:
the comment for this item
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
DavProperty.COMMENT

setComment


public void setComment(java.lang.String sComment)
Description copied from interface: IItem
Sets the comment for this item.
Specified by:
setComment in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Parameters:
sComment - the comment for this item
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
DavProperty.COMMENT

getCreationDate


public java.util.Date getCreationDate()
Description copied from interface: IItem
Gets the date this item was created. This field is read-only.
Specified by:
getCreationDate in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Returns:
the creation date
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
DavProperty.CREATION_DATE

getDisplayName


public java.lang.String getDisplayName()
Description copied from interface: IItem
Gets the name that will be shown to the user in order to represent the resource. For example, the displayname may be the subject of a message or the fileas Field value for a contact. This field is read-only.
Specified by:
getDisplayName in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Returns:
the name to display
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
DavProperty.DISPLAY_NAME

getHRef


public java.lang.String getHRef()
Description copied from interface: IItem
Gets the absolute URL for this item. This field is read-only.
Specified by:
getHRef in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Returns:
the absolute URL for item
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
DavProperty.HREF

isFolder


public boolean isFolder()
Description copied from interface: IItem
Gets whether this item is a folder.
Specified by:
isFolder in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Returns:
true if the item is a folder.
See Also:
DavProperty.IS_FOLDER

isReadOnly


public boolean isReadOnly()
Description copied from interface: IItem
Gets whether this item can be modified or deleted.
Specified by:
isReadOnly in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Returns:
true if item cannot be modified of deleted; false otherwise
See Also:
DavProperty.IS_READONLY

setReadOnly


public void setReadOnly(boolean bReadOnly)
Description copied from interface: IItem
Sets whether this item can be modified or deleted.
Specified by:
setReadOnly in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Parameters:
bReadOnly - true if item cannot be modified of deleted; false otherwise.
See Also:
DavProperty.IS_READONLY

isRoot


public boolean isRoot()
Description copied from interface: IItem
Gets whether this item is a root folder.
Specified by:
isRoot in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Returns:
true if item is a root folder; false otherwise
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
DavProperty.IS_ROOT

getPermanentURL


public java.lang.String getPermanentURL()
Description copied from interface: IItem
Gets a permanent URL that can always be used to access this item, even if the URL to the item changed by renaming or moving it.

The flat URL Name is of the form: http://machine/vroot/-FlatUrlSpace-/textized-fid-of-folder/textized-mid-of-message (for messages), and http://machine/vroot/-FlatUrlSpace-/textized-fid-of-folder (for folders) - where the FID (ID for a folder) and MID (ID for a message) are in long format (GUID + ID). They are unique on a server. - There is a "-" between the GUID and the ID.
This field is read-only.

Specified by:
getPermanentURL in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Returns:
the permanent URL for this item
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
ExchangeProperty.PERMANENT_URL

getUID


public java.lang.String getUID()
Description copied from interface: IItem
Gets the unique identifier (UID) for this item. This field is an alphanumeric string and is read-only.

Note: the unique identifier may contain characters that need to be URL encoded prior to passing in a URL string. For example, the '+' plus sign. In these cases, you might need to use java.net.URLEncoder.encode(String) to encode the UID.

Specified by:
getUID in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Returns:
the unique identifier (UID) for this item
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
DavProperty.UID

setUID


public void setUID(java.lang.String sUniqueId)
Sets a unique identifier for an item. This field is read-only.
Parameters:
sUniqueId - unique identifier for item
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
DavProperty.UID

getSize


public abstract int getSize()
Description copied from interface: IItem
Gets the size of this item (in bytes). This property is read-only.
Specified by:
getSize in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Returns:
the size
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used

getID


public UniqueID getID()
Gets the unique id for this item.
Specified by:
getID in interface IItem
Returns:
the unique id

getFile


public java.lang.String getFile()
Description copied from interface: IItem
Gets the filename of this item.
Specified by:
getFile in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Returns:
the file name
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used

getParentFolder


public Folder getParentFolder()
                       throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetParentFolder(List)

Description copied from interface: IItem
Gets the parent folder for this item.
Specified by:
getParentFolder in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Returns:
the parent folder of item
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used

serverGetParentFolder


public Folder serverGetParentFolder(java.util.List properties)
                             throws ExchangeException
Queries the server to get the parent folder.
Parameters:
properties - list of AbstractProperty objects representing Exchange WebDAV properties to request from the Exchange store
Returns:
the parent folder or null if not parent exists

update


public void update()
            throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverUpdate()

Updates the properties of the item to the Exchange store. If the item does not exist in the Exchange store, it is created, else the existing item is updated.

Calling this method will not perform a refresh once the update is performed. This may cause properties, such as those updated by the Exchange store, not to be current.

Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used

update


public void update(boolean bServerRefresh)
            throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverUpdate(boolean)

Updates the properties of the item to the Exchange store. If the item does not exist in the Exchange store, it is created, else the existing item is updated.

Calling this method requesting a refresh (bServerRefresh = true) causes a lookup to the Exchange store to retrieve the most current properties (including those set by the Exchange store).

Specified by:
update in interface IItem
Parameters:
bServerRefresh - true to request a refresh performed by the Exchange store; false otherwise
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used

serverUpdate


public void serverUpdate()
                  throws ExchangeException
Requests the server to update the item of any changed properties.

If the item does not exist in the Exchange store, it is created, else the existing item is updated.

Calling this method will not perform a refresh once the update is performed. This may cause properties, such as those updated by the Exchange store, not to be current.

Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used

serverUpdate


public void serverUpdate(boolean bServerRefresh)
                  throws ExchangeException
Requests the server to update the item of any changed properties.

If the item does not exist in the Exchange store, it is created, else the existing item is updated.

Specified by:
serverUpdate in interface IItem
Parameters:
bServerRefresh - true requests the server to refresh the properties
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used

delete


public void delete()
            throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverDelete()

Description copied from interface: IItem
Deletes this item from the Exchange Store.
Specified by:
delete in interface IItem
Following copied from interface: com.compoze.exchange.webdav.IItem
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used

serverDelete


public void serverDelete()
                  throws ExchangeException
Requests the server to delete the item (the item is removed permanently).
Specified by:
serverDelete in interface IItem
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used

move


public IItem move(Folder destinationFolder)
           throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverMoveTo(Folder)

Moves this item to another folder. This will return an item whose property values are set locally. See copy(String, boolean) for further details.

If the destination resource has an existing item with the same name, an ItemExistsException is thrown.

Specified by:
move in interface IItem
Parameters:
destinationFolder - the destination folder to move to.
Returns:
the moved item.
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used

move


public IItem move(java.lang.String sDestinationPath)
           throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverMoveTo(String)

Moves this item to another folder. This will return an item whose property values are set locally. See copy(String, boolean) for further details.

If the destination resource has an existing item with the same name, an ItemExistsException is thrown.

Parameters:
sDestinationPath - the destination path to move to.
Returns:
the moved item.
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server

move


public IItem move(java.lang.String sDestinationPath,
                  boolean bServerRefresh)
           throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverMoveTo(String, boolean)

Moves this item to another folder.

If the parameter bServerRefresh is set to true, this method will return an item whose property values are set by querying the Exchange store. If the parameter bServerRefresh is set tofalse, this method will return an item whose property values are set locally (via clone()).

If the destination resource has an existing item with the same name, an ItemExistsException is thrown.

Parameters:
sDestinationPath - the destination path to move to.
bServerRefresh - true to return the item with property values set by querying the Exchange.
Returns:
the moved item.
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server

serverMoveTo


public void serverMoveTo(Folder destinationFolder)
                  throws ExchangeException
Request the server to move the item to the specified folder.
Parameters:
destinationFolder - the destination folder to move to
Throws:
ExchangeException - if a problem occurred while interacting with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used
ItemExistsException - if the destination resource has an existing item with the same name

serverMoveTo


public void serverMoveTo(Folder destinationFolder,
                         boolean bServerRefresh)
                  throws ExchangeException
Request the server to move the item to the specified folder.

If the parameter bServerRefresh is set to true, this method will make a request to Exchange store to refresh it propeties.

Parameters:
destinationFolder - the destination folder to move to
bServerRefresh - true requests the server to refresh the properties
Throws:
ExchangeException - if a problem occurred while interacting with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used
ItemExistsException - if the destination resource has an existing item with the same name

serverMoveTo


public void serverMoveTo(java.lang.String sDestinationPath)
                  throws ExchangeException
Request the server to move the item to the folder specifed by the given path.
Parameters:
sDestinationPath - the destination path to move to
Throws:
ExchangeException - if a problem occurred while interacting with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used
ItemExistsException - if the destination resource has an existing item with the same name

serverMoveTo


public void serverMoveTo(java.lang.String sDestinationPath,
                         boolean bServerRefresh)
                  throws ExchangeException
Request the server to move the item to the folder specifed by the given path.

If the parameter bServerRefresh is set to true, this method will make a request to Exchange store to refresh it propeties.

Specified by:
serverMoveTo in interface IItem
Parameters:
sDestinationPath - the destination path to move to
bServerRefresh - true requests the server to refresh the properties
Throws:
ExchangeException - if a problem occurred while interacting with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used

copy


public IItem copy(Folder destinationFolder)
           throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverCopyTo(Folder)

Copies this item to another folder. This will return an item whose property values are set locally. See copy(String, boolean) for further details.

If the destination resource has an existing item with the same name, an ItemExistsException is thrown.

Specified by:
copy in interface IItem
Parameters:
destinationFolder - the destination folder to copy to
Returns:
the copied item.
Throws:
ExchangeException - if a problem occurred while connecting to or interacting with Exchange Server

copy


public IItem copy(java.lang.String sDestinationPath)
           throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverCopyTo(String)

Copies this item to another folder. This will return an item whose property values are set locally. See copy(String, boolean) for further details.

If the destination resource has an existing item with the same name, an ItemExistsException is thrown.

Parameters:
sDestinationPath - the destination path to copy to
Returns:
the copied item.
Throws:
ExchangeException - if a problem occurred while connecting to or interacting with Exchange Server

copy


public IItem copy(java.lang.String sDestinationPath,
                  boolean bServerRefresh)
           throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverCopyTo(String, boolean)

Copies this item to another folder.

If the parameter bServerRefresh is set to true, this method will return an item whose property values are set by querying the Exchange store. If the parameter bServerRefresh is set tofalse, this method will return an item whose property values are set locally (via clone()).

If the destination resource has an existing item with the same name, an ItemExistsException is thrown.

Parameters:
sDestinationPath - the destination path to copy to.
bServerRefresh - true to return the item with property values set by querying the Exchange.
Returns:
the copied item.
Throws:
ExchangeException - if a problem occurred while connecting to or interacting with Exchange Server

serverCopyTo


public void serverCopyTo(Folder destinationFolder)
                  throws ExchangeException
Request the server to copy the item to the specified folder.
Parameters:
destinationFolder - the destination folder to copy to
Throws:
ExchangeException - if a problem occurred while interacting with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used
ItemExistsException - if the destination resource has an existing item with the same name

serverCopyTo


public void serverCopyTo(Folder destinationFolder,
                         boolean bServerRefresh)
                  throws ExchangeException
Request the server to copy the item to the specified folder.

If the parameter bServerRefresh is set to true, this method will make a request to Exchange store to refresh it propeties.

Parameters:
destinationFolder - the destination folder to copy to
bServerRefresh - true requests the server to refresh the properties
Throws:
ExchangeException - if a problem occurred while interacting with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used
ItemExistsException - if the destination resource has an existing item with the same name

serverCopyTo


public void serverCopyTo(java.lang.String sDestinationPath)
                  throws ExchangeException
Request the server to copy the item to the folder specifed by the given path.
Parameters:
sDestinationPath - the destination path to copy to
Throws:
ExchangeException - if a problem occurred while interacting with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used
ItemExistsException - if the destination resource has an existing item with the same name

serverCopyTo


public void serverCopyTo(java.lang.String sDestinationPath,
                         boolean bServerRefresh)
                  throws ExchangeException
Request the server to copy the item to the folder specifed by the given path.

If the parameter bServerRefresh is set to true, this method will make a request to Exchange store to refresh it propeties.

Specified by:
serverCopyTo in interface IItem
Parameters:
sDestinationPath - the destination path to copy to
bServerRefresh - true requests the server to refresh the properties
Throws:
ExchangeException - if a problem occurred while interacting with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used

createFilename


protected final java.lang.String createFilename()
Composes the filename for this item.
Returns:
the filename

createFilename


protected abstract java.lang.String createFilename(int iIndex)
Composes the filename for this item. If the specifed index is less than or equal to 0 then no index is appended to the filename.

For example: createFilename(0) will return the filname 'No Subject.eml' craeteFilename(2) will return the filename 'No Subject-2.eml'

Parameters:
iIndex - the index to append
Returns:
the filename

validate


protected void validate()
Validates that this object has not been released.
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used

setReleased


protected void setReleased(boolean bReleased)
Sets whether this object has been released.
Parameters:
bReleased - true if object is released

clone


protected java.lang.Object clone()
                          throws java.lang.CloneNotSupportedException
Creates and returns a copy of this object.
Overrides:
clone in class java.lang.Object
Returns:
a clone of this instance.
Throws:
java.lang.CloneNotSupportedException - if the object's class does not support the Cloneable interface.

equals


public boolean equals(java.lang.Object o)
Indicates whether some other AbstractItem object is "equal to" this one.
Overrides:
equals in class java.lang.Object
Parameters:
o - the object with which to compare.
Returns:
true if this object is the same as the object argument; false otherwise.

equals


public boolean equals(java.lang.Object o,
                      java.util.Locale locale)
Indicates whether some other AbstractItem object is "equal to" this one.
Parameters:
o - the object with which to compare.
locale - a locale for string comparisons.
Returns:
true if this object is the same as the object argument; false otherwise.

toString


public java.lang.String toString()
Returns a string representation of the object.
Overrides:
toString in class java.lang.Object
Returns:
the string representation of the object

getDefaultProperties


public static java.util.List getDefaultProperties()
Gets a list of default properties pertaining to an item.
Following is the list of properties returned:
Returns:
a list (unmodifiable) of properties.

getProperties


public static java.util.List getProperties()
Gets a list of properties pertaining to an item.
Returns:
a list (unmodifiable) of properties.

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.