Class UserId
- java.lang.Object
-
- microsoft.exchange.webservices.data.property.complex.ComplexProperty
-
- microsoft.exchange.webservices.data.property.complex.UserId
-
- All Implemented Interfaces:
ISelfValidate,ComplexFunctionDelegate<EwsServiceXmlReader>
public class UserId extends ComplexProperty
Represents the Id of a user.
-
-
Constructor Summary
Constructors Constructor Description UserId()Initializes a new instance.UserId(String primarySmtpAddress)Initializes a new instance.UserId(StandardUser standardUser)Initializes a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDisplayName()Gets the display name of the user.StringgetPrimarySmtpAddress()Gets the primary SMTP address or the user.StringgetSID()Gets the SID of the user.StandardUsergetstandardUser()Gets a value indicating which standard user the user represents.static UserIdgetUserId(String primarySmtpAddress)Implements an implicit conversion between a string representing a primary SMTP address and UserId.static UserIdgetUserIdFromStandardUser(StandardUser standardUser)Implements an implicit conversion between StandardUser and UserId.protected booleanisValid()Determines whether this instance is valid.voidsetDisplayName(String displayName)Sets the display name.voidsetPrimarySmtpAddress(String primarySmtpAddress)Sets the primary smtp address.voidsetSID(String sID)Sets the sID.voidsetStandardUser(StandardUser standardUser)Sets the standard user.booleantryReadElementFromXml(EwsServiceXmlReader reader)Tries to read element from XML.voidwriteElementsToXml(EwsServiceXmlWriter writer)Writes elements to XML.-
Methods inherited from class microsoft.exchange.webservices.data.property.complex.ComplexProperty
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, clearChangeLog, func, getNamespace, internalValidate, loadFromXml, loadFromXml, readAttributesFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, validate, writeAttributesToXml, writeToXml, writeToXml
-
-
-
-
Constructor Detail
-
UserId
public UserId()
Initializes a new instance.
-
UserId
public UserId(String primarySmtpAddress)
Initializes a new instance.- Parameters:
primarySmtpAddress- the primary smtp address
-
UserId
public UserId(StandardUser standardUser)
Initializes a new instance.- Parameters:
standardUser- the standard user
-
-
Method Detail
-
isValid
protected boolean isValid()
Determines whether this instance is valid.- Returns:
- true, if this instance is valid. Else, false
-
getPrimarySmtpAddress
public String getPrimarySmtpAddress()
Gets the primary SMTP address or the user.- Returns:
- the primary smtp address
-
setPrimarySmtpAddress
public void setPrimarySmtpAddress(String primarySmtpAddress)
Sets the primary smtp address.- Parameters:
primarySmtpAddress- the new primary smtp address
-
getDisplayName
public String getDisplayName()
Gets the display name of the user.- Returns:
- the display name
-
setDisplayName
public void setDisplayName(String displayName)
Sets the display name.- Parameters:
displayName- the new display name
-
getstandardUser
public StandardUser getstandardUser()
Gets a value indicating which standard user the user represents.- Returns:
- the standard user
-
setStandardUser
public void setStandardUser(StandardUser standardUser)
Sets the standard user.- Parameters:
standardUser- the new standard user
-
getUserId
public static UserId getUserId(String primarySmtpAddress)
Implements an implicit conversion between a string representing a primary SMTP address and UserId.- Parameters:
primarySmtpAddress- the primary smtp address- Returns:
- A UserId initialized with the specified primary SMTP address
-
getUserIdFromStandardUser
public static UserId getUserIdFromStandardUser(StandardUser standardUser)
Implements an implicit conversion between StandardUser and UserId.- Parameters:
standardUser- the standard user- Returns:
- A UserId initialized with the specified standard user value
-
tryReadElementFromXml
public boolean tryReadElementFromXml(EwsServiceXmlReader reader) throws Exception
Tries to read element from XML.- Overrides:
tryReadElementFromXmlin classComplexProperty- Parameters:
reader- the reader- Returns:
- True if element was read.
- Throws:
Exception- the exception
-
writeElementsToXml
public void writeElementsToXml(EwsServiceXmlWriter writer) throws XMLStreamException, ServiceXmlSerializationException
Writes elements to XML.- Overrides:
writeElementsToXmlin classComplexProperty- Parameters:
writer- the writer- Throws:
XMLStreamException- the XML stream exceptionServiceXmlSerializationException- the service xml serialization exception
-
-