microsoft.exchange.webservices.data.property.complex
Class FolderPermission

java.lang.Object
  extended by microsoft.exchange.webservices.data.property.complex.ComplexProperty
      extended by microsoft.exchange.webservices.data.property.complex.FolderPermission
All Implemented Interfaces:
ISelfValidate, ComplexFunctionDelegate<EwsServiceXmlReader>, IComplexPropertyChangedDelegate

public final class FolderPermission
extends ComplexProperty
implements IComplexPropertyChangedDelegate

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(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 item.
 boolean getCanCreateSubFolders()
          Gets a value indicating whether the user can create sub-folder.
 PermissionScope getDeleteItems()
          Gets a value indicating if/how the user can delete existing item.
 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 item.
 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 item access permission.
 UserId getUserId()
          Gets the Id of the user the permission applies to.
 void loadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName)
          Loads from XML.
 void setCanCreateItems(boolean value)
          Sets the can create item.
 void setCanCreateSubFolders(boolean value)
          Sets the can create sub folder.
 void setDeleteItems(PermissionScope value)
          Sets the delete item.
 void setEditItems(PermissionScope value)
          Sets the edits the item.
 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 item.
 void setUserId(UserId value)
          Sets the user id.
 boolean tryReadElementFromXml(EwsServiceXmlReader reader)
          Tries to read element from XML.
protected  void writeElementsToXml(EwsServiceXmlWriter writer, boolean isCalendarFolder)
          Writes elements to XML.
protected  void writeToXml(EwsServiceXmlWriter writer, String xmlElementName, boolean isCalendarFolder)
          Writes to XML.
 
Methods inherited from class microsoft.exchange.webservices.data.property.complex.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 Exception
Initializes a new instance of the FolderPermission class.

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

FolderPermission

public FolderPermission(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)
Description copied from interface: IComplexPropertyChangedDelegate
Complex property changed.

Specified by:
complexPropertyChanged in interface IComplexPropertyChangedDelegate
Parameters:
complexProperty - the complex property

getCanCreateItems

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

Returns:
the can create item

setCanCreateItems

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

Parameters:
value - the new can create item

getCanCreateSubFolders

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

Returns:
the can create sub folder

setCanCreateSubFolders

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

Parameters:
value - the new can create sub folder

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 item.

Returns:
the edits the item

setEditItems

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

Parameters:
value - the new edits the item

getDeleteItems

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

Returns:
the delete item

setDeleteItems

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

Parameters:
value - the new delete item

getReadItems

public FolderPermissionReadAccess getReadItems()
Gets the read item access permission.

Returns:
the read item

setReadItems

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

Parameters:
value - the new read item

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

public boolean tryReadElementFromXml(EwsServiceXmlReader reader)
                              throws Exception
Tries to read element from XML.

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

loadFromXml

public void loadFromXml(EwsServiceXmlReader reader,
                        XmlNamespace xmlNamespace,
                        String xmlElementName)
                 throws Exception
Loads from XML.

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

writeElementsToXml

protected void writeElementsToXml(EwsServiceXmlWriter writer,
                                  boolean isCalendarFolder)
                           throws Exception
Writes elements to XML.

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

writeToXml

protected void writeToXml(EwsServiceXmlWriter writer,
                          String xmlElementName,
                          boolean isCalendarFolder)
                   throws Exception
Writes to XML.

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


Copyright © 2012–2015 Microsoft. All rights reserved.