microsoft.exchange.webservices.data
Class UserId

java.lang.Object
  extended by microsoft.exchange.webservices.data.ComplexProperty
      extended by microsoft.exchange.webservices.data.UserId

public class UserId
extends ComplexProperty

Represents the Id of a user.


Constructor Summary
UserId()
          * Initializes a new instance.
UserId(StandardUser standardUser)
          * Initializes a new instance.
UserId(java.lang.String primarySmtpAddress)
          * Initializes a new instance.
 
Method Summary
 java.lang.String getDisplayName()
          * Gets the display name of the user.
 java.lang.String getPrimarySmtpAddress()
          * Gets the primary SMTP address or the user.
 java.lang.String getSID()
          * Gets the SID of the user.
 StandardUser getstandardUser()
          * Gets a value indicating which standard user the user represents.
static UserId getUserId(java.lang.String primarySmtpAddress)
          * Implements an implicit conversion between a string representing a primary SMTP address and UserId.
static UserId getUserIdFromStandardUser(StandardUser standardUser)
          * Implements an implicit conversion between StandardUser and UserId.
protected  boolean isValid()
          Determines whether this instance is valid.
 void setDisplayName(java.lang.String displayName)
          Sets the display name.
 void setPrimarySmtpAddress(java.lang.String primarySmtpAddress)
          Sets the primary smtp address.
 void setSID(java.lang.String sID)
          Sets the sID.
 void setStandardUser(StandardUser standardUser)
          Sets the standard user.
protected  boolean tryReadElementFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
          * Tries to read element from XML.
protected  void writeElementsToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
          * Writes elements to XML.
 
Methods inherited from class microsoft.exchange.webservices.data.ComplexProperty
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, clearChangeLog, func, getNamespace, internalValidate, loadFromXml, loadFromXml, readAttributesFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, validate, writeAttributesToXml, writeToXml, writeToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserId

public UserId()
* Initializes a new instance.


UserId

public UserId(java.lang.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

getSID

public java.lang.String getSID()
* Gets the SID of the user.

Returns:
the sID

setSID

public void setSID(java.lang.String sID)
Sets the sID.

Parameters:
sID - the new sID

getPrimarySmtpAddress

public java.lang.String getPrimarySmtpAddress()
* Gets the primary SMTP address or the user.

Returns:
the primary smtp address

setPrimarySmtpAddress

public void setPrimarySmtpAddress(java.lang.String primarySmtpAddress)
Sets the primary smtp address.

Parameters:
primarySmtpAddress - the new primary smtp address

getDisplayName

public java.lang.String getDisplayName()
* Gets the display name of the user.

Returns:
the display name

setDisplayName

public void setDisplayName(java.lang.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(java.lang.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

protected boolean tryReadElementFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
                                 throws java.lang.Exception
* Tries to read element from XML.

Overrides:
tryReadElementFromXml in class ComplexProperty
Parameters:
reader - the reader
Returns:
True if element was read.
Throws:
java.lang.Exception - the exception

writeElementsToXml

protected void writeElementsToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
                           throws javax.xml.stream.XMLStreamException,
                                  ServiceXmlSerializationException
* Writes elements to XML.

Overrides:
writeElementsToXml in class ComplexProperty
Parameters:
writer - the writer
Throws:
javax.xml.stream.XMLStreamException - the xML stream exception
ServiceXmlSerializationException - the service xml serialization exception