Compoze Software, Inc.

com.compoze.exchange.webdav
Interface IItem

All Known Implementing Classes:
AbstractItem

public interface IItem

This interface represents an item within Exchange Store. Specific WebDAV properties are set by the Exchnage store, and are read-only. The following is a list of properties that are set by the Exchange store:



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()


Method Summary
 IItem copy(Folder targetFolder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverCopyTo(String, boolean)
 void delete()
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverDelete()
 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 this item was last modified.
 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 globally unique identifier (GUID or 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.
 int getSize()
          Gets the size of this item (in bytes).
 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 targetFolder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverMoveTo(String, boolean)
 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).
 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(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 setHidden(boolean bHidden)
          Sets whether to hide the item.
 void setReadOnly(boolean bReadOnly)
          Sets whether this item can be modified or deleted.
 void setType(IOutlookType type)
          Sets the type of this item.
 void setType(java.lang.String sType)
          Sets the type of this item.
 void update(boolean bServerRefresh)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverUpdate(boolean)
 

Method Detail

getDateLastModified


public java.util.Date getDateLastModified()
Gets the date this item was last modified.
Returns:
the date the item was last modified.
See Also:
DavProperty.GET_LAST_MODIFIED

isFolder


public boolean isFolder()
Gets whether this item is a folder.
Returns:
true if the item is a folder.
See Also:
DavProperty.IS_FOLDER

isHidden


public boolean isHidden()
Gets whether this item is hidden.
Returns:
true if the item is hidden.
See Also:
DavProperty.IS_HIDDEN

setHidden


public void setHidden(boolean bHidden)
Sets whether to hide the item.
Returns:
bHidden true to hide the item; true otherwise.
See Also:
DavProperty.IS_HIDDEN

getContentClass


public java.lang.String getContentClass()
Gets the content class of this item.
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)
Sets the content class of this item.
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

getFile


public java.lang.String getFile()
Gets the filename of this item.
Returns:
the file name
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used

getParentFolder


public Folder getParentFolder()
                       throws ExchangeException
Gets the parent folder for this item.
Returns:
the parent folder of item
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used

getComment


public java.lang.String getComment()
Gets the comment for this item.
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)
Sets the comment for this item.
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()
Gets the date this item was created. This field is read-only.
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()
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.
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()
Gets the absolute URL for this item. This field is read-only.
Returns:
the absolute URL for item
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
DavProperty.HREF

getID


public UniqueID getID()
Gets the globally unique identifier (GUID or ID) for this item. This field is read-only.
Returns:
the GUID of this item
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used

isReadOnly


public boolean isReadOnly()
Gets whether this item can be modified or deleted.
Returns:
true if item cannot be modified of deleted; false otherwise
See Also:
DavProperty.IS_READONLY

setReadOnly


public void setReadOnly(boolean bReadOnly)
Sets whether this item can be modified or deleted.
Parameters:
bReadOnly - true if item cannot be modified of deleted; false otherwise.
See Also:
DavProperty.IS_READONLY

isRoot


public boolean isRoot()
Gets whether this item is a root folder.
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()
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.

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()
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.

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

getSize


public int getSize()
Gets the size of this item (in bytes). This property is read-only.
Returns:
the size
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used

getType


public java.lang.String getType()
Gets the type of this item. See OutlookMessageType and OutlookFolderType for a partial list of types.
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)
Sets the type of this item. See OutlookMessageType and OutlookFolderType for a partial list of types.
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 void setType(java.lang.String sType)
Sets the type of this item. See OutlookMessageType and OutlookFolderType for a partial list of types.
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

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).

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(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.

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()

Deletes this item from the Exchange Store.
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).
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 targetFolder)
           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. Use this method only if you are not stepping through an iterator(use Items$WebdavMessage$ItemListIterator.move() instead). The iterator will throw a ConcurrentModificationException.
Parameters:
targetFolder - the folder to move item 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

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.

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 targetFolder)
           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.
Parameters:
targetFolder - the folder to move item to
Returns:
the copied 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

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.

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

Compoze Software, Inc.

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