|
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 IItem
null
if not setDavProperty.GET_LAST_MODIFIED
public boolean isHidden()
IItem
isHidden
in interface IItem
com.compoze.exchange.webdav.IItem
true
if the item is hidden.DavProperty.IS_HIDDEN
public void setHidden(boolean bHidden)
IItem
setHidden
in interface IItem
com.compoze.exchange.webdav.IItem
true
to hide the item; true
otherwise.DavProperty.IS_HIDDEN
public abstract java.lang.String getType()
IItem
OutlookMessageType
and OutlookFolderType
for a partial
list of types.getType
in interface IItem
com.compoze.exchange.webdav.IItem
ExchangeRuntimeException
- if this object has been released and can no longer be used.ExchangeProperty.OUTLOOK_MESSAGE_CLASS
,
ExchangeProperty.OUTLOOK_FOLDER_CLASS
public void setType(IOutlookType type)
IItem
OutlookMessageType
and OutlookFolderType
for a partial
list of types.setType
in interface IItem
com.compoze.exchange.webdav.IItem
type
- 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_CLASS
public abstract void setType(java.lang.String sType)
IItem
OutlookMessageType
and OutlookFolderType
for a partial
list of types.setType
in interface IItem
com.compoze.exchange.webdav.IItem
sType
- 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_CLASS
public java.lang.String getContentClass()
IItem
getContentClass
in interface IItem
com.compoze.exchange.webdav.IItem
ExchangeRuntimeException
- if this object has been released and can
no longer be used.DavProperty.CONTENT_CLASS
public void setContentClass(ContentClass contentClass)
IItem
setContentClass
in interface IItem
com.compoze.exchange.webdav.IItem
contentClass
- the content class of the item.ExchangeRuntimeException
- if this object has been released and can
no longer be used.DavProperty.CONTENT_CLASS
public 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()
IItem
getComment
in interface IItem
com.compoze.exchange.webdav.IItem
ExchangeRuntimeException
- if this object has been released and can no longer be usedDavProperty.COMMENT
public void setComment(java.lang.String sComment)
IItem
setComment
in interface IItem
com.compoze.exchange.webdav.IItem
sComment
- the comment for this itemExchangeRuntimeException
- if this object has been released and can no longer be usedDavProperty.COMMENT
public java.util.Date getCreationDate()
IItem
getCreationDate
in interface IItem
com.compoze.exchange.webdav.IItem
ExchangeRuntimeException
- if this object has been released and can
no longer be usedDavProperty.CREATION_DATE
public java.lang.String getDisplayName()
IItem
getDisplayName
in interface IItem
com.compoze.exchange.webdav.IItem
ExchangeRuntimeException
- if this object has been released and can no longer be usedDavProperty.DISPLAY_NAME
public java.lang.String getHRef()
IItem
getHRef
in interface IItem
com.compoze.exchange.webdav.IItem
ExchangeRuntimeException
- if this object has been released and can no longer be usedDavProperty.HREF
public boolean isFolder()
IItem
isFolder
in interface IItem
com.compoze.exchange.webdav.IItem
true
if the item is a folder.DavProperty.IS_FOLDER
public boolean isReadOnly()
IItem
isReadOnly
in interface IItem
com.compoze.exchange.webdav.IItem
true
if item cannot be modified of deleted; false
otherwiseDavProperty.IS_READONLY
public void setReadOnly(boolean bReadOnly)
IItem
setReadOnly
in interface IItem
com.compoze.exchange.webdav.IItem
bReadOnly
- true
if item cannot be modified of deleted; false
otherwise.DavProperty.IS_READONLY
public boolean isRoot()
IItem
isRoot
in interface IItem
com.compoze.exchange.webdav.IItem
true
if item is a root folder; false
otherwiseExchangeRuntimeException
- if this object has been released and can no longer be usedDavProperty.IS_ROOT
public 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 IItem
com.compoze.exchange.webdav.IItem
ExchangeRuntimeException
- if this object has been released and can no longer be usedExchangeProperty.PERMANENT_URL
public 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 IItem
com.compoze.exchange.webdav.IItem
ExchangeRuntimeException
- if this object has been released and can
no longer be usedDavProperty.UID
public void setUID(java.lang.String sUniqueId)
sUniqueId
- unique identifier for itemExchangeRuntimeException
- if this object has been released and can
no longer be usedDavProperty.UID
public abstract int getSize()
IItem
getSize
in interface IItem
com.compoze.exchange.webdav.IItem
ExchangeRuntimeException
- if this object has been released and can no longer be usedpublic UniqueID getID()
getID
in interface IItem
public java.lang.String getFile()
IItem
getFile
in interface IItem
com.compoze.exchange.webdav.IItem
ExchangeRuntimeException
- if this object has been released and can
no longer be usedpublic Folder getParentFolder() throws ExchangeException
serverGetParentFolder(List)
IItem
getParentFolder
in interface IItem
com.compoze.exchange.webdav.IItem
ExchangeRuntimeException
- if this object has been released and can
no longer be usedpublic 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 existspublic 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 usedpublic 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 IItem
bServerRefresh
- 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 usedpublic 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 usedpublic 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 IItem
bServerRefresh
- 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 usedpublic void delete() throws ExchangeException
serverDelete()
IItem
delete
in interface IItem
com.compoze.exchange.webdav.IItem
ExchangeException
- if a problem occurred while connecting to or
interaction with Exchange ServerExchangeRuntimeException
- if this object has been released and can
no longer be usedpublic void serverDelete() throws ExchangeException
serverDelete
in interface IItem
ExchangeException
- if a problem occurred while connecting to or interaction with Exchange ServerExchangeRuntimeException
- if this object has been released and can no longer be usedpublic 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 IItem
destinationFolder
- 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 usedpublic 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 Serverpublic 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 Serverpublic 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 namepublic 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 namepublic 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 namepublic 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 IItem
sDestinationPath
- 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 usedpublic 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 IItem
destinationFolder
- the destination folder to copy toExchangeException
- if a problem occurred while connecting to or
interacting with Exchange Serverpublic 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 Serverpublic 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 Serverpublic 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 namepublic 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 namepublic 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 namepublic 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 IItem
sDestinationPath
- 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 releasedprotected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.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.Object
o
- 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.Object
public static java.util.List getDefaultProperties()
DavProperty.CONTENT_CLASS
DavProperty.DISPLAY_NAME
DavProperty.IS_FOLDER
DavProperty.IS_READONLY
DavProperty.PARENT_NAME
ExchangeProperty.PERMANENT_URL
public static java.util.List getProperties()
|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |