Class FolderPermission
- java.lang.Object
-
- microsoft.exchange.webservices.data.property.complex.ComplexProperty
-
- 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
Constructors Constructor Description FolderPermission()Initializes a new instance of the FolderPermission class.FolderPermission(String primarySmtpAddress, FolderPermissionLevel permissionLevel)Initializes a new instance of the FolderPermission class.FolderPermission(StandardUser standardUser, 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomplexPropertyChanged(ComplexProperty complexProperty)Complex property changed.booleangetCanCreateItems()Gets a value indicating whether the user can create new item.booleangetCanCreateSubFolders()Gets a value indicating whether the user can create sub-folder.PermissionScopegetDeleteItems()Gets a value indicating if/how the user can delete existing item.FolderPermissionLevelgetDisplayPermissionLevel()Gets the permission level that Outlook would display for this folder permission.PermissionScopegetEditItems()Gets a value indicating if/how the user can edit existing item.booleangetIsFolderContact()Gets a value indicating whether the user is a contact for the folder.booleangetIsFolderOwner()Gets a value indicating whether the user owns the folder.booleangetIsFolderVisible()Gets a value indicating whether the folder is visible to the user.FolderPermissionLevelgetPermissionLevel()Gets the permission level.FolderPermissionReadAccessgetReadItems()Gets the read item access permission.UserIdgetUserId()Gets the Id of the user the permission applies to.voidloadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName)Loads from XML.voidsetCanCreateItems(boolean value)Sets the can create item.voidsetCanCreateSubFolders(boolean value)Sets the can create sub folder.voidsetDeleteItems(PermissionScope value)Sets the delete item.voidsetEditItems(PermissionScope value)Sets the edits the item.voidsetIsFolderContact(boolean value)Sets the checks if is folder contact.voidsetIsFolderOwner(boolean value)Sets the checks if is folder owner.voidsetIsFolderVisible(boolean value)Sets the checks if is folder visible.voidsetPermissionLevel(FolderPermissionLevel value)Sets the permission level.voidsetReadItems(FolderPermissionReadAccess value)Sets the read item.voidsetUserId(UserId value)Sets the user id.booleantryReadElementFromXml(EwsServiceXmlReader reader)Tries to read element from XML.protected voidwriteElementsToXml(EwsServiceXmlWriter writer, boolean isCalendarFolder)Writes elements to XML.protected voidwriteToXml(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
-
-
-
-
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 idpermissionLevel- 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 addresspermissionLevel- the permission level
-
FolderPermission
public FolderPermission(StandardUser standardUser, FolderPermissionLevel permissionLevel)
Initializes a new instance of the FolderPermission class.- Parameters:
standardUser- the standard userpermissionLevel- 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:IComplexPropertyChangedDelegateComplex property changed.- Specified by:
complexPropertyChangedin interfaceIComplexPropertyChangedDelegate- 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:
tryReadElementFromXmlin classComplexProperty- 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:
loadFromXmlin classComplexProperty- Parameters:
reader- the readerxmlNamespace- the xml namespacexmlElementName- 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 writerisCalendarFolder- 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 writerxmlElementName- the xml element nameisCalendarFolder- the is calendar folder- Throws:
Exception- the exception
-
-