Class FolderId
- java.lang.Object
-
- microsoft.exchange.webservices.data.property.complex.ComplexProperty
-
- microsoft.exchange.webservices.data.property.complex.ServiceId
-
- microsoft.exchange.webservices.data.property.complex.FolderId
-
- All Implemented Interfaces:
ISelfValidate,ComplexFunctionDelegate<EwsServiceXmlReader>
public final class FolderId extends ServiceId
Represents the Id of a folder.
-
-
Constructor Summary
Constructors Constructor Description FolderId()Initializes a new instance.FolderId(String uniqueId)Initializes a new instance.Use this constructor to link this FolderId to an existing folder that you have the unique Id of.FolderId(WellKnownFolderName folderName)Initializes a new instance.Use this constructor to link this FolderId to a well known folder (e.g.FolderId(WellKnownFolderName folderName, Mailbox mailbox)Initializes a new instance.Use this constructor to link this FolderId to a well known folder (e.g.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Determines whether the specified is equal to the current.static FolderIdgetFolderIdFromString(String uniqueId)Defines an implicit conversion between string and FolderId.static FolderIdgetFolderIdFromWellKnownFolderName(WellKnownFolderName folderName)Defines an implicit conversion between WellKnownFolderName and FolderId.WellKnownFolderNamegetFolderName()Gets the name of the folder associated with the folder Id.protected booleangetIsValid()True if this instance is valid, false otherwise.MailboxgetMailbox()Gets the mailbox of the folder.StringgetXmlElementName()Gets the name of the XML element.inthashCode()Serves as a hash function for a particular type.StringtoString()Returns a String that represents the current Object.voidvalidate(ExchangeVersion version)Validates FolderId against a specified request version.voidwriteAttributesToXml(EwsServiceXmlWriter writer)Writes attribute to XML.-
Methods inherited from class microsoft.exchange.webservices.data.property.complex.ServiceId
assign, getChangeKey, getUniqueId, isValid, readAttributesFromXml, sameIdAndChangeKey, setChangeKey, setUniqueId, writeToXml
-
Methods inherited from class microsoft.exchange.webservices.data.property.complex.ComplexProperty
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, clearChangeLog, func, getNamespace, internalValidate, loadFromXml, loadFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXml, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, validate, writeElementsToXml, writeToXml, writeToXml
-
-
-
-
Constructor Detail
-
FolderId
public FolderId()
Initializes a new instance.
-
FolderId
public FolderId(String uniqueId) throws Exception
Initializes a new instance.Use this constructor to link this FolderId to an existing folder that you have the unique Id of.- Parameters:
uniqueId- the unique id- Throws:
Exception- the exception
-
FolderId
public FolderId(WellKnownFolderName folderName)
Initializes a new instance.Use this constructor to link this FolderId to a well known folder (e.g. Inbox, Calendar or Contacts)- Parameters:
folderName- the folder name
-
FolderId
public FolderId(WellKnownFolderName folderName, Mailbox mailbox)
Initializes a new instance.Use this constructor to link this FolderId to a well known folder (e.g. Inbox, Calendar or Contacts) in a specific mailbox.- Parameters:
folderName- the folder namemailbox- the mailbox
-
-
Method Detail
-
getXmlElementName
public String getXmlElementName()
Gets the name of the XML element.- Specified by:
getXmlElementNamein classServiceId- Returns:
- XML element name
-
writeAttributesToXml
public void writeAttributesToXml(EwsServiceXmlWriter writer) throws ServiceXmlSerializationException
Writes attribute to XML.- Overrides:
writeAttributesToXmlin classServiceId- Parameters:
writer- the writer- Throws:
ServiceXmlSerializationException- the service xml serialization exception
-
validate
public void validate(ExchangeVersion version) throws ServiceVersionException
Validates FolderId against a specified request version.- Parameters:
version- the version- Throws:
ServiceVersionException- the service version exception
-
getFolderName
public WellKnownFolderName getFolderName()
Gets the name of the folder associated with the folder Id. Name and Id are mutually exclusive; if one is set, the other is null.- Returns:
- the folder name
-
getMailbox
public Mailbox getMailbox()
Gets the mailbox of the folder. Mailbox is only set when FolderName is set.- Returns:
- the mailbox
-
getFolderIdFromString
public static FolderId getFolderIdFromString(String uniqueId) throws Exception
Defines an implicit conversion between string and FolderId.- Parameters:
uniqueId- the unique id- Returns:
- A FolderId initialized with the specified unique Id
- Throws:
Exception- the exception
-
getFolderIdFromWellKnownFolderName
public static FolderId getFolderIdFromWellKnownFolderName(WellKnownFolderName folderName)
Defines an implicit conversion between WellKnownFolderName and FolderId.- Parameters:
folderName- the folder name- Returns:
- A FolderId initialized with the specified folder name
-
getIsValid
protected boolean getIsValid()
True if this instance is valid, false otherwise.- Returns:
- the checks if is valid
-
hashCode
public int hashCode()
Serves as a hash function for a particular type.
-
-