public class Folder extends ServiceObject
Constructor and Description |
---|
Folder(ExchangeService service)
Initializes an unsaved local instance of
Folder . |
Modifier and Type | Method and Description |
---|---|
static Folder |
bind(ExchangeService service,
FolderId id)
Binds to an existing folder, whatever its actual type is, and loads the
specified set of property.
|
static Folder |
bind(ExchangeService service,
FolderId id,
PropertySet propertySet)
Binds to an existing folder, whatever its actual type is, and loads the
specified set of property.
|
static Folder |
bind(ExchangeService service,
WellKnownFolderName name)
Binds to an existing folder, whatever its actual type is, and loads the
specified set of property.
|
static Folder |
bind(ExchangeService service,
WellKnownFolderName name,
PropertySet propertySet)
Binds to an existing folder, whatever its actual type is, and loads the
specified set of property.
|
Folder |
copy(FolderId destinationFolderId)
Copies this folder into a specific folder.
|
Folder |
copy(WellKnownFolderName destinationFolderName)
Copies this folder into the specified folder.
|
void |
delete(DeleteMode deleteMode)
Deletes the folder.
|
void |
empty(DeleteMode deletemode,
boolean deleteSubFolders)
Empties the folder.
|
FindFoldersResults |
findFolders(FolderView view)
Obtains a list of folder by searching the sub-folder of this folder.
|
FindFoldersResults |
findFolders(SearchFilter searchFilter,
FolderView view)
Obtains a list of folder by searching the sub-folder of this folder.
|
FindItemsResults<Item> |
findItems(ItemView view)
Find item.
|
GroupedFindItemsResults<Item> |
findItems(ItemView view,
Grouping groupBy)
Obtains a grouped list of item by searching the contents of this folder.
|
FindItemsResults<Item> |
findItems(SearchFilter searchFilter,
ItemView view)
Find item.
|
GroupedFindItemsResults<Item> |
findItems(SearchFilter searchFilter,
ItemView view,
Grouping groupBy)
Find item.
|
FindItemsResults<Item> |
findItems(String queryString,
ItemView view)
Find item.
|
GroupedFindItemsResults<Item> |
findItems(String queryString,
ItemView view,
Grouping groupBy)
Find item.
|
String |
getChangeXmlElementName()
Gets the name of the change XML element.
|
int |
getChildFolderCount()
Gets the number of child folder this folder has.
|
String |
getDeleteFieldXmlElementName()
Gets the name of the delete field XML element.
|
String |
getDisplayName()
Gets the display name of the folder.
|
EnumSet<EffectiveRights> |
getEffectiveRights()
Gets a value indicating the effective rights the current authenticated
user has on the folder.
|
protected ExtendedPropertyCollection |
getExtendedProperties()
True if property was removed.
|
ExtendedPropertyCollection |
getExtendedPropertiesForService()
Gets a list of extended property associated with the folder.
|
String |
getFolderClass()
Gets the custom class name of this folder.
|
FolderId |
getId()
Gets the Id of the folder.
|
PropertyDefinition |
getIdPropertyDefinition()
Get the property definition for the Id property.
|
ManagedFolderInformation |
getManagedFolderInformation()
Gets the Email Lifecycle Management (ELC) information associated with the
folder.
|
ExchangeVersion |
getMinimumRequiredServerVersion()
Gets the minimum required server version.
|
FolderId |
getParentFolderId()
Gets the Id of this folder's parent folder.
|
FolderPermissionCollection |
getPermissions()
Gets a list of permissions for the folder.
|
ServiceObjectSchema |
getSchema()
Internal method to return the schema associated with this type of object.
|
String |
getSetFieldXmlElementName()
Gets the name of the set field XML element.
|
int |
getTotalCount()
Gets the total number of item contained in the folder.
|
int |
getUnreadCount()
Gets the number of unread item in the folder.
|
protected void |
internalDelete(DeleteMode deleteMode,
SendCancellationsMode sendCancellationsMode,
AffectedTaskOccurrence affectedTaskOccurrences)
Deletes the object.
|
protected void |
internalLoad(PropertySet propertySet)
Loads the specified set of property on the object.
|
Folder |
move(FolderId destinationFolderId)
Moves this folder to a specific folder.
|
Folder |
move(WellKnownFolderName destinationFolderName)
Moves this folder to a specific folder.
|
boolean |
removeExtendedProperty(ExtendedPropertyDefinition extendedPropertyDefinition)
Removes an extended property.
|
void |
save(FolderId parentFolderId)
Saves this folder in a specific folder.
|
void |
save(WellKnownFolderName parentFolderName)
Saves this folder in a specific folder.
|
void |
setDisplayName(String value)
Sets the display name of the folder.
|
void |
setExtendedProperty(ExtendedPropertyDefinition extendedPropertyDefinition,
Object value)
Sets the extended property.
|
void |
setFolderClass(String value)
Sets the custom class name of this folder.
|
void |
update()
Applies the local changes that have been made to this folder.
|
void |
validate()
Validates this instance.
|
addServiceObjectChangedEvent, changed, clearChangeLog, clearServiceObjectChangedEvent, getIsCustomDateTimeScopingRequired, getIsTimeZoneHeaderRequired, getLoadedPropertyDefinitions, getObjectFromPropertyDefinition, getPropertyBag, getService, getXmlElementName, getXmlElementNameOverride, isDirty, isNew, load, load, loadFromXml, loadFromXml, removeServiceObjectChangedEvent, schema, setService, throwIfThisIsNew, throwIfThisIsNotNew, tryGetExtendedProperty, tryGetProperty, tryGetProperty, writeToXml, writeToXmlForUpdate
public Folder(ExchangeService service) throws Exception
Folder
.service
- EWS service to which this object belongsException
- the exceptionpublic static Folder bind(ExchangeService service, FolderId id, PropertySet propertySet) throws Exception
service
- The service to use to bind to the folder.id
- The Id of the folder to bind to.propertySet
- The set of property to load.Exception
- the exceptionpublic static Folder bind(ExchangeService service, FolderId id) throws Exception
service
- , The service to use to bind to the folder.id
- , The Id of the folder to bind to.Exception
- the exceptionpublic static Folder bind(ExchangeService service, WellKnownFolderName name, PropertySet propertySet) throws Exception
service
- The service to use to bind to the folder.name
- The name of the folder to bind to.propertySet
- The set of property to load.Exception
- the exceptionpublic static Folder bind(ExchangeService service, WellKnownFolderName name) throws Exception
service
- The service to use to bind to the folder.name
- The name of the folder to bind to.Exception
- the exceptionpublic void validate() throws Exception
validate
in class ServiceObject
Exception
- the exceptionpublic ServiceObjectSchema getSchema()
getSchema
in class ServiceObject
public ExchangeVersion getMinimumRequiredServerVersion()
getMinimumRequiredServerVersion
in class ServiceObject
public String getChangeXmlElementName()
getChangeXmlElementName
in class ServiceObject
public String getSetFieldXmlElementName()
getSetFieldXmlElementName
in class ServiceObject
public String getDeleteFieldXmlElementName()
getDeleteFieldXmlElementName
in class ServiceObject
protected void internalLoad(PropertySet propertySet) throws Exception
internalLoad
in class ServiceObject
propertySet
- The property to load.Exception
- the exceptionprotected void internalDelete(DeleteMode deleteMode, SendCancellationsMode sendCancellationsMode, AffectedTaskOccurrence affectedTaskOccurrences) throws Exception
internalDelete
in class ServiceObject
deleteMode
- the delete modesendCancellationsMode
- Indicates whether meeting cancellation messages should be
sent.affectedTaskOccurrences
- Indicate which occurrence of a recurring task should be
deleted.Exception
- the exceptionpublic void delete(DeleteMode deleteMode) throws Exception
deleteMode
- the delete modeException
- the exceptionpublic void empty(DeleteMode deletemode, boolean deleteSubFolders) throws Exception
deletemode
- the delete modedeleteSubFolders
- Indicates whether sub-folder should also be deleted.Exception
public void save(FolderId parentFolderId) throws Exception
parentFolderId
- The Id of the folder in which to save this folder.Exception
- the exceptionpublic void save(WellKnownFolderName parentFolderName) throws Exception
parentFolderName
- The name of the folder in which to save this folder.Exception
- the exceptionpublic void update() throws Exception
Exception
- the exceptionpublic Folder copy(FolderId destinationFolderId) throws Exception
destinationFolderId
- The Id of the folder in which to copy this folder.Exception
- the exceptionpublic Folder copy(WellKnownFolderName destinationFolderName) throws Exception
destinationFolderName
- The name of the folder in which to copy this folder.Exception
- the exceptionpublic Folder move(FolderId destinationFolderId) throws Exception
destinationFolderId
- The Id of the folder in which to move this folder.Exception
- the exceptionpublic Folder move(WellKnownFolderName destinationFolderName) throws Exception
destinationFolderName
- The name of the folder in which to move this folder.Exception
- the exceptionpublic FindItemsResults<Item> findItems(SearchFilter searchFilter, ItemView view) throws Exception
searchFilter
- The search filter. Available search filter classes include
SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and
SearchFilter.SearchFilterCollectionview
- The view controlling the number of item returned.Exception
- the exceptionpublic FindItemsResults<Item> findItems(String queryString, ItemView view) throws Exception
queryString
- query string to be used for indexed searchview
- The view controlling the number of item returned.Exception
- the exceptionpublic FindItemsResults<Item> findItems(ItemView view) throws Exception
view
- The view controlling the number of item returned.Exception
- the exceptionpublic GroupedFindItemsResults<Item> findItems(SearchFilter searchFilter, ItemView view, Grouping groupBy) throws Exception
searchFilter
- The search filter. Available search filter classes include
SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and
SearchFilter.SearchFilterCollectionview
- The view controlling the number of item returned.groupBy
- The group by.Exception
- the exceptionpublic GroupedFindItemsResults<Item> findItems(String queryString, ItemView view, Grouping groupBy) throws Exception
queryString
- query string to be used for indexed searchview
- The view controlling the number of item returned.groupBy
- The group by.Exception
- the exceptionpublic FindFoldersResults findFolders(FolderView view) throws Exception
view
- The view controlling the number of folder returned.Exception
- the exceptionpublic FindFoldersResults findFolders(SearchFilter searchFilter, FolderView view) throws Exception
searchFilter
- The search filter. Available search filter classes include
SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and
SearchFilter.SearchFilterCollectionview
- The view controlling the number of folder returned.Exception
- the exceptionpublic GroupedFindItemsResults<Item> findItems(ItemView view, Grouping groupBy) throws Exception
view
- The view controlling the number of folder returned.groupBy
- The grouping criteria.Exception
- the exceptionpublic PropertyDefinition getIdPropertyDefinition()
getIdPropertyDefinition
in class ServiceObject
public void setExtendedProperty(ExtendedPropertyDefinition extendedPropertyDefinition, Object value) throws Exception
extendedPropertyDefinition
- The extended property definition.value
- The value.Exception
- the exceptionpublic boolean removeExtendedProperty(ExtendedPropertyDefinition extendedPropertyDefinition) throws Exception
extendedPropertyDefinition
- The extended property definition.Exception
- the exceptionprotected ExtendedPropertyCollection getExtendedProperties() throws Exception
getExtendedProperties
in class ServiceObject
Exception
- the exceptionpublic FolderId getId()
getId
in class ServiceObject
public FolderId getParentFolderId() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic int getChildFolderCount() throws NumberFormatException, ServiceLocalException
NumberFormatException
- the number format exceptionServiceLocalException
- the service local exceptionpublic String getDisplayName() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setDisplayName(String value) throws Exception
value
- Name of the folderException
- the exceptionpublic String getFolderClass() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setFolderClass(String value) throws Exception
value
- name of the folderException
- the exceptionpublic int getTotalCount() throws NumberFormatException, ServiceLocalException
NumberFormatException
- the number format exceptionServiceLocalException
- the service local exceptionpublic ExtendedPropertyCollection getExtendedPropertiesForService() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic ManagedFolderInformation getManagedFolderInformation() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic EnumSet<EffectiveRights> getEffectiveRights() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic FolderPermissionCollection getPermissions() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic int getUnreadCount() throws NumberFormatException, ServiceLocalException
NumberFormatException
- the number format exceptionServiceLocalException
- the service local exceptionCopyright © 2012–2015 Microsoft. All rights reserved.