All Downloads are FREE. Search and download functionalities are using the official Maven repository.

microsoft.exchange.webservices.data.GetInboxRulesResponse Maven / Gradle / Ivy

Go to download

The source came from http://archive.msdn.microsoft.com/ewsjavaapi Support for Maven has been added.

The newest version!
/**************************************************************************
 * copyright file="GetInboxRulesResponse.java" company="Microsoft"
 *     Copyright (c) Microsoft Corporation.  All rights reserved.
 * 
 * Defines the GetInboxRulesResponse class.
 **************************************************************************/
package microsoft.exchange.webservices.data;

/**
 * Represents the response to a GetInboxRules operation.
 */
final class GetInboxRulesResponse extends ServiceResponse{
	/**
	 * Rule collection.
	 */
	private RuleCollection ruleCollection;

	/**
	 * Initializes a new instance of the 
	 *  class.
	 */
	protected GetInboxRulesResponse() {
		super();
		this.ruleCollection = new RuleCollection();
	}

	/**
	 * Reads response elements from XML.
	 * @param reader The reader.
	 */
	@Override
	protected  void readElementsFromXml(EwsServiceXmlReader reader)
	throws Exception {
		reader.read();
		this.ruleCollection.setOutlookRuleBlobExists(reader.
				readElementValue(Boolean.class,
				XmlNamespace.Messages, 
				XmlElementNames.OutlookRuleBlobExists));
		reader.read();
		if (reader.isStartElement(XmlNamespace.NotSpecified, XmlElementNames.InboxRules)) {
			this.ruleCollection.loadFromXml(reader, 
					XmlNamespace.NotSpecified, 
					XmlElementNames.InboxRules);
		}
	}

	/**
	 * Gets the rule collection in the response.
	 */
	protected RuleCollection getRules() {
		return this.ruleCollection;
	}
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy