Class UserConfiguration
- java.lang.Object
-
- microsoft.exchange.webservices.data.misc.UserConfiguration
-
public class UserConfiguration extends Object
Represents an object that can be used to store user-defined configuration settings.
-
-
Constructor Summary
Constructors Constructor Description UserConfiguration(ExchangeService service)Initializes a new instance ofUserConfigurationclass.UserConfiguration(ExchangeService service, EnumSet<UserConfigurationProperties> requestedProperties)Initializes a new instance ofUserConfigurationclass.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UserConfigurationbind(ExchangeService service, String name, WellKnownFolderName parentFolderName, UserConfigurationProperties properties)Binds to an existing user configuration and loads the specified property.static UserConfigurationbind(ExchangeService service, String name, FolderId parentFolderId, UserConfigurationProperties properties)Binds to an existing user configuration and loads the specified property.voiddelete()Deletes the user configuration.byte[]getBinaryData()Gets the binary data of the user configuration.UserConfigurationDictionarygetDictionary()Gets the dictionary of the user configuration.booleangetIsDirty()Gets a value indicating whether this user configuration has been modified.ItemIdgetItemId()Gets the Id of the user configuration.StringgetName()Gets the name of the user configuration.FolderIdgetParentFolderId()Gets the Id of the folder containing the user configuration.byte[]getXmlData()Gets the xml data of the user configuration.voidload(UserConfigurationProperties properties)Loads the specified property on the user configuration.voidloadFromXml(EwsServiceXmlReader reader)Loads from XML.voidsave(String name, WellKnownFolderName parentFolderName)Saves the user configuration.voidsave(String name, FolderId parentFolderId)Saves the user configuration.voidsetBinaryData(byte[] value)Sets the binary data.voidsetName(String value)Sets the name.voidsetParentFolderId(FolderId value)Sets the parent folder id.voidsetXmlData(byte[] value)Sets the xml data.voidupdate()Updates the user configuration by applying local changes to the Exchange server.voidwriteToXml(EwsServiceXmlWriter writer, XmlNamespace xmlNamespace, String xmlElementName)Writes to XML.static voidwriteUserConfigurationNameToXml(EwsServiceXmlWriter writer, XmlNamespace xmlNamespace, String name, FolderId parentFolderId)Writes to Xml.
-
-
-
Constructor Detail
-
UserConfiguration
public UserConfiguration(ExchangeService service) throws Exception
Initializes a new instance ofUserConfigurationclass.- Parameters:
service- The service to which the user configuration is bound.- Throws:
Exception- the exception
-
UserConfiguration
public UserConfiguration(ExchangeService service, EnumSet<UserConfigurationProperties> requestedProperties) throws Exception
Initializes a new instance ofUserConfigurationclass.- Parameters:
service- The service to which the user configuration is bound.requestedProperties- The property requested for this user configuration.- Throws:
Exception- the exception
-
-
Method Detail
-
writeUserConfigurationNameToXml
public static void writeUserConfigurationNameToXml(EwsServiceXmlWriter writer, XmlNamespace xmlNamespace, String name, FolderId parentFolderId) throws Exception
Writes to Xml.- Parameters:
writer- The writer.xmlNamespace- The XML namespace.name- The user configuration name.parentFolderId- The Id of the folder containing the user configuration.- Throws:
Exception- the exception
-
getParentFolderId
public FolderId getParentFolderId()
Gets the Id of the folder containing the user configuration.- Returns:
- the parent folder id
-
setParentFolderId
public void setParentFolderId(FolderId value)
Sets the parent folder id.- Parameters:
value- the new parent folder id
-
getDictionary
public UserConfigurationDictionary getDictionary()
Gets the dictionary of the user configuration.- Returns:
- the dictionary
-
getXmlData
public byte[] getXmlData() throws PropertyException
Gets the xml data of the user configuration.- Returns:
- the xml data
- Throws:
PropertyException- the property exception
-
setXmlData
public void setXmlData(byte[] value)
Sets the xml data.- Parameters:
value- the new xml data
-
getBinaryData
public byte[] getBinaryData() throws PropertyException
Gets the binary data of the user configuration.- Returns:
- the binary data
- Throws:
PropertyException- the property exception
-
setBinaryData
public void setBinaryData(byte[] value)
Sets the binary data.- Parameters:
value- the new binary data
-
getIsDirty
public boolean getIsDirty()
Gets a value indicating whether this user configuration has been modified.- Returns:
- the checks if is dirty
-
bind
public static UserConfiguration bind(ExchangeService service, String name, FolderId parentFolderId, UserConfigurationProperties properties) throws IndexOutOfBoundsException, Exception
Binds to an existing user configuration and loads the specified property. Calling this method results in a call to EWS.- Parameters:
service- The service to which the user configuration is bound.name- The name of the user configuration.parentFolderId- The Id of the folder containing the user configuration.properties- The property to load.- Returns:
- A user configuration instance.
- Throws:
IndexOutOfBoundsException- the index out of bounds exceptionException- the exception
-
bind
public static UserConfiguration bind(ExchangeService service, String name, WellKnownFolderName parentFolderName, UserConfigurationProperties properties) throws IndexOutOfBoundsException, Exception
Binds to an existing user configuration and loads the specified property.- Parameters:
service- The service to which the user configuration is bound.name- The name of the user configuration.parentFolderName- The name of the folder containing the user configuration.properties- The property to load.- Returns:
- A user configuration instance.
- Throws:
IndexOutOfBoundsException- the index out of bounds exceptionException- the exception
-
save
public void save(String name, FolderId parentFolderId) throws Exception
Saves the user configuration. Calling this method results in a call to EWS.- Parameters:
name- The name of the user configuration.parentFolderId- The Id of the folder in which to save the user configuration.- Throws:
Exception- the exception
-
save
public void save(String name, WellKnownFolderName parentFolderName) throws Exception
Saves the user configuration. Calling this method results in a call to EWS.- Parameters:
name- The name of the user configuration.parentFolderName- The name of the folder in which to save the user configuration.- Throws:
Exception- the exception
-
update
public void update() throws Exception
Updates the user configuration by applying local changes to the Exchange server. Calling this method results in a call to EWS- Throws:
Exception- the exception
-
delete
public void delete() throws Exception
Deletes the user configuration. Calling this method results in a call to EWS.- Throws:
Exception- the exception
-
load
public void load(UserConfigurationProperties properties) throws Exception
Loads the specified property on the user configuration. Calling this method results in a call to EWS.- Parameters:
properties- The property to load.- Throws:
Exception- the exception
-
writeToXml
public void writeToXml(EwsServiceXmlWriter writer, XmlNamespace xmlNamespace, String xmlElementName) throws Exception
Writes to XML.- Parameters:
writer- The writer.xmlNamespace- The XML namespace.xmlElementName- Name of the XML element.- Throws:
Exception- the exception
-
loadFromXml
public void loadFromXml(EwsServiceXmlReader reader) throws Exception
Loads from XML.- Parameters:
reader- The reader.- Throws:
Exception- the exception
-
-