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

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

/**
 * Represents the Id of a public folder expressed in a specific format.
 */
public class AlternatePublicFolderId extends AlternateIdBase {

	/**
	 * Name of schema type used for AlternatePublicFolderId element.
	 */
	protected final static String SchemaTypeName = 
		"AlternatePublicFolderIdType";
	
	private String folderId;	

	/**
	 * Initializes a new instance of AlternatePublicFolderId.
	 */
	public AlternatePublicFolderId() {
		super();
	}

	/**
	 * Initializes a new instance of AlternatePublicFolderId.
	 * 
	 * @param format
	 *            the format
	 * @param folderId
	 *            the folder id
	 */
	public AlternatePublicFolderId(IdFormat format, String folderId) {
		super(format);
		this.setFolderId(folderId);
	}

	/**
	 * The Id of the public folder.
	 * 
	 * @return the folder id
	 */
	public String getFolderId() {		
		return this.folderId;

	}

	/**
	 * Sets the folder id.
	 * 
	 * @param folderId
	 *            the new folder id
	 */
	public void setFolderId(String folderId) {
		this.folderId = folderId;
	}

	/**
	 * Gets the name of the XML element.
	 * 
	 * @return XML element name
	 */
	@Override
	protected String getXmlElementName() {
		return XmlElementNames.AlternatePublicFolderId;
	}

	/**
	 * Writes the attributes to XML.
	 * 
	 * @param writer
	 *            the writer
	 * @throws ServiceXmlSerializationException
	 *             the service xml serialization exception
	 */
	@Override
	protected void writeAttributesToXml(EwsServiceXmlWriter writer)
			throws ServiceXmlSerializationException {
		super.writeAttributesToXml(writer);
		writer.writeAttributeValue(XmlAttributeNames.FolderId, this
				.getFolderId());
	}

	/**
	 * Loads the attributes from XML.
	 * 
	 * @param reader
	 *            the reader
	 * @throws Exception
	 *             the exception
	 */
	@Override
	protected void loadAttributesFromXml(EwsServiceXmlReader reader)
			throws Exception {
		super.loadAttributesFromXml(reader);
		this.setFolderId(reader.readAttributeValue(XmlAttributeNames.FolderId));
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy