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

microsoft.exchange.webservices.data.CreateItemRequest 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="CreateItemRequest.java" company="Microsoft"
 *     Copyright (c) Microsoft Corporation.  All rights reserved.
 * 
 * Defines the CreateItemRequest.java.
 **************************************************************************/
package microsoft.exchange.webservices.data;

/***
 * Represents a CreateItem request.
 * 
 * 
 */
final class CreateItemRequest extends
		CreateItemRequestBase {

	/**
	 * * Initializes a new instance.
	 * 
	 * @param service
	 *            The service.
	 * @param errorHandlingMode
	 *            Indicates how errors should be handled.
	 * @throws Exception 
	 */
	protected CreateItemRequest(ExchangeService service,
			ServiceErrorHandling errorHandlingMode)
			throws Exception {
		super(service, errorHandlingMode);
	}

	/**
	 * * Creates the service response.
	 * 
	 * @param service
	 *            the service
	 * @param responseIndex
	 *            the response index
	 * @return the service response
	 */
	@Override
	protected ServiceResponse createServiceResponse(ExchangeService service,
			int responseIndex) {
		return new CreateItemResponse((Item)EwsUtilities
				.getEnumeratedObjectAt(this.getItems(), responseIndex));
	}

	/**
	 * * Validate request..
	 * 
	 * @throws ServiceLocalException
	 *             the service local exception
	 * @throws Exception
	 *             the exception
	 */
	@Override
	protected void validate() throws ServiceLocalException, Exception {
		super.validate();
	//	Iterable items = this.getItems();
		// Validate each item.
		for (Item item : this.getItems()) {
			item.validate();
		}
	}

	/**
	 * * Gets the request version. Returns earliest Exchange version in which
	 * this request is supported.
	 * 
	 * @return the minimum required server version
	 */
	@Override
	protected ExchangeVersion getMinimumRequiredServerVersion() {
		return ExchangeVersion.Exchange2007_SP1;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy