microsoft.exchange.webservices.data
Class FolderPermission

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

public final class FolderPermission
extends ComplexProperty

Represents a permission on a folder.


Constructor Summary
FolderPermission()
          Initializes a new instance of the FolderPermission class.
FolderPermission(StandardUser standardUser, FolderPermissionLevel permissionLevel)
          * Initializes a new instance of the FolderPermission class.
FolderPermission(java.lang.String primarySmtpAddress, FolderPermissionLevel permissionLevel)
          * Initializes a new instance of the FolderPermission class.
FolderPermission(UserId userId, FolderPermissionLevel permissionLevel)
          * Initializes a new instance of the FolderPermission class.
 
Method Summary
 void complexPropertyChanged(ComplexProperty complexProperty)
          Complex property changed.
 boolean getCanCreateItems()
          * Gets a value indicating whether the user can create new items.
 boolean getCanCreateSubFolders()
          * Gets a value indicating whether the user can create sub-folders.
 PermissionScope getDeleteItems()
          * Gets a value indicating if/how the user can delete existing items.
 FolderPermissionLevel getDisplayPermissionLevel()
          * Gets the permission level that Outlook would display for this folder permission.
 PermissionScope getEditItems()
          * Gets a value indicating if/how the user can edit existing items.
 boolean getIsFolderContact()
          * Gets a value indicating whether the user is a contact for the folder.
 boolean getIsFolderOwner()
          * Gets a value indicating whether the user owns the folder.
 boolean getIsFolderVisible()
          * Gets a value indicating whether the folder is visible to the user.
 FolderPermissionLevel getPermissionLevel()
          * Gets the permission level.
 FolderPermissionReadAccess getReadItems()
          * Gets the read items access permission.
 UserId getUserId()
          * Gets the Id of the user the permission applies to.
protected  void loadFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader, microsoft.exchange.webservices.data.XmlNamespace xmlNamespace, java.lang.String xmlElementName)
          Loads from XML.
 void setCanCreateItems(boolean value)
          Sets the can create items.
 void setCanCreateSubFolders(boolean value)
          Sets the can create sub folders.
 void setDeleteItems(PermissionScope value)
          Sets the delete items.
 void setEditItems(PermissionScope value)
          Sets the edits the items.
 void setIsFolderContact(boolean value)
          Sets the checks if is folder contact.
 void setIsFolderOwner(boolean value)
          Sets the checks if is folder owner.
 void setIsFolderVisible(boolean value)
          Sets the checks if is folder visible.
 void setPermissionLevel(FolderPermissionLevel value)
          Sets the permission level.
 void setReadItems(FolderPermissionReadAccess value)
          Sets the read items.
 void setUserId(UserId value)
          Sets the user id.
protected  boolean tryReadElementFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
          * Tries to read element from XML.
protected  void writeElementsToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer, boolean isCalendarFolder)
          * Writes elements to XML.
protected  void writeToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer, java.lang.String xmlElementName, boolean isCalendarFolder)
          * Writes to XML.
 
Methods inherited from class microsoft.exchange.webservices.data.ComplexProperty
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, clearChangeLog, func, getNamespace, internalValidate, loadFromXml, readAttributesFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, validate, writeAttributesToXml, writeElementsToXml, writeToXml, writeToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FolderPermission

public FolderPermission()
Initializes a new instance of the FolderPermission class.


FolderPermission

public FolderPermission(UserId userId,
                        FolderPermissionLevel permissionLevel)
                 throws java.lang.Exception
* Initializes a new instance of the FolderPermission class.

Parameters:
userId - the user id
permissionLevel - the permission level
Throws:
java.lang.Exception - the exception

FolderPermission

public FolderPermission(java.lang.String primarySmtpAddress,
                        FolderPermissionLevel permissionLevel)
* Initializes a new instance of the FolderPermission class.

Parameters:
primarySmtpAddress - the primary smtp address
permissionLevel - the permission level

FolderPermission

public FolderPermission(StandardUser standardUser,
                        FolderPermissionLevel permissionLevel)
* Initializes a new instance of the FolderPermission class.

Parameters:
standardUser - the standard user
permissionLevel - the permission level
Method Detail

getUserId

public UserId getUserId()
* Gets the Id of the user the permission applies to.

Returns:
the user id

setUserId

public void setUserId(UserId value)
Sets the user id.

Parameters:
value - the new user id

complexPropertyChanged

public void complexPropertyChanged(ComplexProperty complexProperty)
Complex property changed.

Parameters:
complexProperty - the complex property

getCanCreateItems

public boolean getCanCreateItems()
* Gets a value indicating whether the user can create new items.

Returns:
the can create items

setCanCreateItems

public void setCanCreateItems(boolean value)
Sets the can create items.

Parameters:
value - the new can create items

getCanCreateSubFolders

public boolean getCanCreateSubFolders()
* Gets a value indicating whether the user can create sub-folders.

Returns:
the can create sub folders

setCanCreateSubFolders

public void setCanCreateSubFolders(boolean value)
Sets the can create sub folders.

Parameters:
value - the new can create sub folders

getIsFolderOwner

public boolean getIsFolderOwner()
* Gets a value indicating whether the user owns the folder.

Returns:
the checks if is folder owner

setIsFolderOwner

public void setIsFolderOwner(boolean value)
Sets the checks if is folder owner.

Parameters:
value - the new checks if is folder owner

getIsFolderVisible

public boolean getIsFolderVisible()
* Gets a value indicating whether the folder is visible to the user.

Returns:
the checks if is folder visible

setIsFolderVisible

public void setIsFolderVisible(boolean value)
Sets the checks if is folder visible.

Parameters:
value - the new checks if is folder visible

getIsFolderContact

public boolean getIsFolderContact()
* Gets a value indicating whether the user is a contact for the folder.

Returns:
the checks if is folder contact

setIsFolderContact

public void setIsFolderContact(boolean value)
Sets the checks if is folder contact.

Parameters:
value - the new checks if is folder contact

getEditItems

public PermissionScope getEditItems()
* Gets a value indicating if/how the user can edit existing items.

Returns:
the edits the items

setEditItems

public void setEditItems(PermissionScope value)
Sets the edits the items.

Parameters:
value - the new edits the items

getDeleteItems

public PermissionScope getDeleteItems()
* Gets a value indicating if/how the user can delete existing items.

Returns:
the delete items

setDeleteItems

public void setDeleteItems(PermissionScope value)
Sets the delete items.

Parameters:
value - the new delete items

getReadItems

public FolderPermissionReadAccess getReadItems()
* Gets the read items access permission.

Returns:
the read items

setReadItems

public void setReadItems(FolderPermissionReadAccess value)
Sets the read items.

Parameters:
value - the new read items

getPermissionLevel

public FolderPermissionLevel getPermissionLevel()
* Gets the permission level.

Returns:
the permission level

setPermissionLevel

public void setPermissionLevel(FolderPermissionLevel value)
                        throws ServiceLocalException
Sets the permission level.

Parameters:
value - the new permission level
Throws:
ServiceLocalException - the service local exception

getDisplayPermissionLevel

public FolderPermissionLevel getDisplayPermissionLevel()
* Gets the permission level that Outlook would display for this folder permission.

Returns:
the display permission level

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

loadFromXml

protected void loadFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader,
                           microsoft.exchange.webservices.data.XmlNamespace xmlNamespace,
                           java.lang.String xmlElementName)
                    throws java.lang.Exception
Loads from XML.

Overrides:
loadFromXml in class ComplexProperty
Parameters:
reader - the reader
xmlNamespace - the xml namespace
xmlElementName - the xml element name
Throws:
java.lang.Exception - the exception

writeElementsToXml

protected void writeElementsToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer,
                                  boolean isCalendarFolder)
                           throws java.lang.Exception
* Writes elements to XML.

Parameters:
writer - the writer
isCalendarFolder - the is calendar folder
Throws:
java.lang.Exception - the exception

writeToXml

protected void writeToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer,
                          java.lang.String xmlElementName,
                          boolean isCalendarFolder)
                   throws java.lang.Exception
* Writes to XML.

Parameters:
writer - the writer
xmlElementName - the xml element name
isCalendarFolder - the is calendar folder
Throws:
java.lang.Exception - the exception