|
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.webdav.AbstractItem
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) |
| 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 |
public java.util.Date getDateLastModified()
This field is read-only.
getDateLastModified in interface IItemnull if not setDavProperty.GET_LAST_MODIFIEDpublic boolean isHidden()
IItemisHidden in interface IItemcom.compoze.exchange.webdav.IItemtrue if the item is hidden.DavProperty.IS_HIDDENpublic void setHidden(boolean bHidden)
IItemsetHidden in interface IItemcom.compoze.exchange.webdav.IItemtrue to hide the item; true otherwise.DavProperty.IS_HIDDENpublic abstract java.lang.String getType()
IItemOutlookMessageType and OutlookFolderType for a partial
list of types.getType in interface IItemcom.compoze.exchange.webdav.IItemExchangeRuntimeException - if this object has been released and can no longer be used.ExchangeProperty.OUTLOOK_MESSAGE_CLASS,
ExchangeProperty.OUTLOOK_FOLDER_CLASSpublic void setType(IOutlookType type)
IItemOutlookMessageType and OutlookFolderType for a partial
list of types.setType in interface IItemcom.compoze.exchange.webdav.IItemtype - the type of the item.ExchangeRuntimeException - if this object has been released and can no longer be used.ExchangeProperty.OUTLOOK_MESSAGE_CLASS,
ExchangeProperty.OUTLOOK_FOLDER_CLASSpublic abstract void setType(java.lang.String sType)
IItemOutlookMessageType and OutlookFolderType for a partial
list of types.setType in interface IItemcom.compoze.exchange.webdav.IItemsType - the type of the item.ExchangeRuntimeException - if this object has been released and can no longer be used.ExchangeProperty.OUTLOOK_MESSAGE_CLASS,
ExchangeProperty.OUTLOOK_FOLDER_CLASSpublic java.lang.String getContentClass()
IItemgetContentClass in interface IItemcom.compoze.exchange.webdav.IItemExchangeRuntimeException - if this object has been released and can
no longer be used.DavProperty.CONTENT_CLASSpublic void setContentClass(ContentClass contentClass)
IItemsetContentClass in interface IItemcom.compoze.exchange.webdav.IItemcontentClass - the content class of the item.ExchangeRuntimeException - if this object has been released and can
no longer be used.DavProperty.CONTENT_CLASSpublic void setContentClass(java.lang.String sContentClass)
sContentClass - the content class of the item.ExchangeRuntimeException - if this object has been released and can
no longer be used.public java.lang.String getComment()
IItemgetComment in interface IItemcom.compoze.exchange.webdav.IItemExchangeRuntimeException - if this object has been released and can no longer be usedDavProperty.COMMENTpublic void setComment(java.lang.String sComment)
IItemsetComment in interface IItemcom.compoze.exchange.webdav.IItemsComment - the comment for this itemExchangeRuntimeException - if this object has been released and can no longer be usedDavProperty.COMMENTpublic java.util.Date getCreationDate()
IItemgetCreationDate in interface IItemcom.compoze.exchange.webdav.IItemExchangeRuntimeException - if this object has been released and can
no longer be usedDavProperty.CREATION_DATEpublic java.lang.String getDisplayName()
IItemgetDisplayName in interface IItemcom.compoze.exchange.webdav.IItemExchangeRuntimeException - if this object has been released and can no longer be usedDavProperty.DISPLAY_NAMEpublic java.lang.String getHRef()
IItemgetHRef in interface IItemcom.compoze.exchange.webdav.IItemExchangeRuntimeException - if this object has been released and can no longer be usedDavProperty.HREFpublic boolean isFolder()
IItemisFolder in interface IItemcom.compoze.exchange.webdav.IItemtrue if the item is a folder.DavProperty.IS_FOLDERpublic boolean isReadOnly()
IItemisReadOnly in interface IItemcom.compoze.exchange.webdav.IItemtrue if item cannot be modified of deleted; false otherwiseDavProperty.IS_READONLYpublic void setReadOnly(boolean bReadOnly)
IItemsetReadOnly in interface IItemcom.compoze.exchange.webdav.IItembReadOnly - true if item cannot be modified of deleted; false otherwise.DavProperty.IS_READONLYpublic boolean isRoot()
IItemisRoot in interface IItemcom.compoze.exchange.webdav.IItemtrue if item is a root folder; false otherwiseExchangeRuntimeException - if this object has been released and can no longer be usedDavProperty.IS_ROOTpublic java.lang.String getPermanentURL()
IItem
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.
getPermanentURL in interface IItemcom.compoze.exchange.webdav.IItemExchangeRuntimeException - if this object has been released and can no longer be usedExchangeProperty.PERMANENT_URLpublic java.lang.String getUID()
IItem
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.
getUID in interface IItemcom.compoze.exchange.webdav.IItemExchangeRuntimeException - if this object has been released and can
no longer be usedDavProperty.UIDpublic void setUID(java.lang.String sUniqueId)
sUniqueId - unique identifier for itemExchangeRuntimeException - if this object has been released and can
no longer be usedDavProperty.UIDpublic abstract int getSize()
IItemgetSize in interface IItemcom.compoze.exchange.webdav.IItemExchangeRuntimeException - if this object has been released and can no longer be usedpublic UniqueID getID()
getID in interface IItempublic java.lang.String getFile()
IItemgetFile in interface IItemcom.compoze.exchange.webdav.IItemExchangeRuntimeException - if this object has been released and can
no longer be used
public Folder getParentFolder()
throws ExchangeException
serverGetParentFolder(List)
IItemgetParentFolder in interface IItemcom.compoze.exchange.webdav.IItemExchangeRuntimeException - if this object has been released and can
no longer be used
public Folder serverGetParentFolder(java.util.List properties)
throws ExchangeException
properties - list of AbstractProperty objects representing
Exchange WebDAV properties to request from the Exchange storenull if not parent exists
public void update()
throws ExchangeException
serverUpdate()
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.
ExchangeException - if a problem occurred while connecting to or interaction with Exchange ServerExchangeRuntimeException - if this object has been released and can no longer be used
public void update(boolean bServerRefresh)
throws ExchangeException
serverUpdate(boolean)
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).
update in interface IItembServerRefresh - true to request a refresh performed
by the Exchange store; false otherwiseExchangeException - if a problem occurred while connecting to or interaction with Exchange ServerExchangeRuntimeException - if this object has been released and can no longer be used
public void serverUpdate()
throws ExchangeException
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.
ExchangeException - if a problem occurred while connecting to or interaction with Exchange ServerExchangeRuntimeException - if this object has been released and can no longer be used
public void serverUpdate(boolean bServerRefresh)
throws ExchangeException
If the item does not exist in the Exchange store, it is created, else the existing item is updated.
serverUpdate in interface IItembServerRefresh - true requests the server to refresh
the propertiesExchangeException - if a problem occurred while connecting to or interaction with Exchange ServerExchangeRuntimeException - if this object has been released and can no longer be used
public void delete()
throws ExchangeException
serverDelete()
IItemdelete in interface IItemcom.compoze.exchange.webdav.IItemExchangeException - if a problem occurred while connecting to or
interaction with Exchange ServerExchangeRuntimeException - if this object has been released and can
no longer be used
public void serverDelete()
throws ExchangeException
serverDelete in interface IItemExchangeException - if a problem occurred while connecting to or interaction with Exchange ServerExchangeRuntimeException - if this object has been released and can no longer be used
public IItem move(Folder destinationFolder)
throws ExchangeException
serverMoveTo(Folder)
copy(String, boolean) for further details.
If the destination resource has an existing item with the same name, an ItemExistsException
is thrown.
move in interface IItemdestinationFolder - the destination folder to move to.ExchangeException - if a problem occurred while connecting to or
interaction with Exchange ServerExchangeRuntimeException - if this object has been released and can
no longer be used
public IItem move(java.lang.String sDestinationPath)
throws ExchangeException
serverMoveTo(String)
copy(String, boolean) for further details.
If the destination resource has an existing item with the same name, an ItemExistsException
is thrown.
sDestinationPath - the destination path to move to.ExchangeException - if a problem occurred while connecting to or
interaction with Exchange Server
public IItem move(java.lang.String sDestinationPath,
boolean bServerRefresh)
throws ExchangeException
serverMoveTo(String, boolean)
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.
sDestinationPath - the destination path to move to.bServerRefresh - true to return the item with property values
set by querying the Exchange.ExchangeException - if a problem occurred while connecting to or
interaction with Exchange Server
public void serverMoveTo(Folder destinationFolder)
throws ExchangeException
destinationFolder - the destination folder to move toExchangeException - if a problem occurred while interacting with Exchange ServerExchangeRuntimeException - if this object has been released and can
no longer be usedItemExistsException - if the destination resource has an existing
item with the same name
public void serverMoveTo(Folder destinationFolder,
boolean bServerRefresh)
throws ExchangeException
If the parameter bServerRefresh is set to true, this method
will make a request to Exchange store to refresh it propeties.
destinationFolder - the destination folder to move tobServerRefresh - true requests the server to refresh
the propertiesExchangeException - if a problem occurred while interacting with Exchange ServerExchangeRuntimeException - if this object has been released and can
no longer be usedItemExistsException - if the destination resource has an existing
item with the same name
public void serverMoveTo(java.lang.String sDestinationPath)
throws ExchangeException
sDestinationPath - the destination path to move toExchangeException - if a problem occurred while interacting with Exchange ServerExchangeRuntimeException - if this object has been released and can
no longer be usedItemExistsException - if the destination resource has an existing
item with the same name
public void serverMoveTo(java.lang.String sDestinationPath,
boolean bServerRefresh)
throws ExchangeException
If the parameter bServerRefresh is set to true, this method
will make a request to Exchange store to refresh it propeties.
serverMoveTo in interface IItemsDestinationPath - the destination path to move tobServerRefresh - true requests the server to refresh
the propertiesExchangeException - if a problem occurred while interacting with Exchange ServerExchangeRuntimeException - if this object has been released and can
no longer be used
public IItem copy(Folder destinationFolder)
throws ExchangeException
serverCopyTo(Folder)
copy(String, boolean) for further details.
If the destination resource has an existing item with the same name, an ItemExistsException
is thrown.
copy in interface IItemdestinationFolder - the destination folder to copy toExchangeException - if a problem occurred while connecting to or
interacting with Exchange Server
public IItem copy(java.lang.String sDestinationPath)
throws ExchangeException
serverCopyTo(String)
copy(String, boolean) for further details.
If the destination resource has an existing item with the same name, an ItemExistsException
is thrown.
sDestinationPath - the destination path to copy toExchangeException - if a problem occurred while connecting to or
interacting with Exchange Server
public IItem copy(java.lang.String sDestinationPath,
boolean bServerRefresh)
throws ExchangeException
serverCopyTo(String, boolean)
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.
sDestinationPath - the destination path to copy to.bServerRefresh - true to return the item with property values
set by querying the Exchange.ExchangeException - if a problem occurred while connecting to or
interacting with Exchange Server
public void serverCopyTo(Folder destinationFolder)
throws ExchangeException
destinationFolder - the destination folder to copy toExchangeException - if a problem occurred while interacting with Exchange ServerExchangeRuntimeException - if this object has been released and can
no longer be usedItemExistsException - if the destination resource has an existing
item with the same name
public void serverCopyTo(Folder destinationFolder,
boolean bServerRefresh)
throws ExchangeException
If the parameter bServerRefresh is set to true, this method
will make a request to Exchange store to refresh it propeties.
destinationFolder - the destination folder to copy tobServerRefresh - true requests the server to refresh
the propertiesExchangeException - if a problem occurred while interacting with Exchange ServerExchangeRuntimeException - if this object has been released and can
no longer be usedItemExistsException - if the destination resource has an existing
item with the same name
public void serverCopyTo(java.lang.String sDestinationPath)
throws ExchangeException
sDestinationPath - the destination path to copy toExchangeException - if a problem occurred while interacting with Exchange ServerExchangeRuntimeException - if this object has been released and can
no longer be usedItemExistsException - if the destination resource has an existing
item with the same name
public void serverCopyTo(java.lang.String sDestinationPath,
boolean bServerRefresh)
throws ExchangeException
If the parameter bServerRefresh is set to true, this method
will make a request to Exchange store to refresh it propeties.
serverCopyTo in interface IItemsDestinationPath - the destination path to copy tobServerRefresh - true requests the server to refresh
the propertiesExchangeException - if a problem occurred while interacting with Exchange ServerExchangeRuntimeException - if this object has been released and can
no longer be usedprotected final java.lang.String createFilename()
protected abstract java.lang.String createFilename(int iIndex)
For example:
createFilename(0) will return the filname 'No Subject.eml'
craeteFilename(2) will return the filename 'No Subject-2.eml'
iIndex - the index to appendprotected void validate()
ExchangeRuntimeException - if this object has been released and can
no longer be usedprotected void setReleased(boolean bReleased)
bReleased - true if object is released
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException - if the object's class does not support the Cloneable interface.public boolean equals(java.lang.Object o)
AbstractItem
object is "equal to" this one.equals in class java.lang.Objecto - the object with which to compare.true if this object is the same as the object argument; false otherwise.
public boolean equals(java.lang.Object o,
java.util.Locale locale)
AbstractItem
object is "equal to" this one.o - the object with which to compare.locale - a locale for string comparisons.true if this object is the same as the object argument; false otherwise.public java.lang.String toString()
toString in class java.lang.Objectpublic static java.util.List getDefaultProperties()
DavProperty.CONTENT_CLASSDavProperty.DISPLAY_NAMEDavProperty.IS_FOLDERDavProperty.IS_READONLYDavProperty.PARENT_NAMEExchangeProperty.PERMANENT_URLpublic static java.util.List getProperties()
|
Compoze Software, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||