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

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

Go to download

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

There is a newer version: 1.1.5.2
Show newest version
/**************************************************************************
 * copyright file="CreateItemResponseBase.java" company="Microsoft"
 *     Copyright (c) Microsoft Corporation.  All rights reserved.
 * 
 * Defines the CreateItemResponseBase.java.
 **************************************************************************/

package microsoft.exchange.webservices.data;

import java.util.List;

/***
 * Represents the base response class for item creation operations.
 * 
 * 
 */
@EditorBrowsable(state = EditorBrowsableState.Never)
abstract class CreateItemResponseBase extends ServiceResponse implements
		IGetObjectInstanceDelegate {

	/** The items. */
	private List items;

	/**
	 * * Gets Item instance.
	 * 
	 * @param service
	 *            The service.
	 * @param xmlElementName
	 *            Name of the XML element.
	 * @return Item.
	 * @throws InstantiationException
	 *             the instantiation exception
	 * @throws IllegalAccessException
	 *             the illegal access exception
	 * @throws Exception
	 *             the exception
	 */
	protected abstract Item getObjectInstance(ExchangeService service,
			String xmlElementName) throws InstantiationException,
			IllegalAccessException, Exception;

	/**
	 * Gets the object instance delegate.
	 * 
	 * @param service
	 *            accepts ExchangeService
	 * @param xmlElementName
	 *            accepts String
	 * @return object
	 * @throws Exception
	 *             throws Exception
	 */
	public ServiceObject getObjectInstanceDelegate(ExchangeService service,
			String xmlElementName) throws Exception {
		return this.getObjectInstance(service, xmlElementName);
	}

	/**
	 * * Initializes a new instance.
	 */
	protected CreateItemResponseBase() {
		super();
	}

	/**
	 * * Reads response elements from XML.
	 * 
	 * @param reader
	 *            the reader
	 * @throws Exception
	 *             the exception
	 */
	@Override
	protected void readElementsFromXml(EwsServiceXmlReader reader)
			throws Exception {
		super.readElementsFromXml(reader);
		this.items = reader.readServiceObjectsCollectionFromXml(
				XmlElementNames.Items, this, false, /* clearPropertyBag */
				null, /* requestedPropertySet */
				false); /* summaryPropertiesOnly */
	}

	/***
	 * Gets the items.
	 * 
	 * @return List of items.
	 */
	public List getItems() {
		return items;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy