001/*
002 * The MIT License
003 * Copyright (c) 2012 Microsoft Corporation
004 *
005 * Permission is hereby granted, free of charge, to any person obtaining a copy
006 * of this software and associated documentation files (the "Software"), to deal
007 * in the Software without restriction, including without limitation the rights
008 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
009 * copies of the Software, and to permit persons to whom the Software is
010 * furnished to do so, subject to the following conditions:
011 *
012 * The above copyright notice and this permission notice shall be included in
013 * all copies or substantial portions of the Software.
014 *
015 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
016 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
017 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
018 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
019 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
020 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
021 * THE SOFTWARE.
022 */
023
024package microsoft.exchange.webservices.data.core.service.schema;
025
026import java.util.EnumSet;
027
028import microsoft.exchange.webservices.data.attribute.Schema;
029import microsoft.exchange.webservices.data.core.XmlElementNames;
030import microsoft.exchange.webservices.data.core.enumeration.misc.ExchangeVersion;
031import microsoft.exchange.webservices.data.core.enumeration.property.PropertyDefinitionFlags;
032import microsoft.exchange.webservices.data.property.definition.DateTimePropertyDefinition;
033import microsoft.exchange.webservices.data.property.definition.PropertyDefinition;
034
035/**
036 * Represents the schema for meeting request.
037 */
038@Schema
039public class MeetingResponseSchema extends MeetingMessageSchema {
040
041  /**
042   * Field URIs for MeetingRequest.
043   */
044  private static interface FieldUris {
045
046    /**
047     * The Start.
048     */
049    String ProposedStart = "meetingResponse:ProposedStart";
050
051    /**
052     * The End.
053     */
054    String ProposedEnd = "meetingResponse:ProposedEnd";
055  }
056
057  /**
058   * Defines the Start property.
059   */
060  public static final PropertyDefinition Start = AppointmentSchema.Start;
061
062  /**
063   * Defines the End property.
064   */
065  public static final PropertyDefinition End = AppointmentSchema.End;
066
067  /**
068   * Defines the Location property.
069   */
070  public static final PropertyDefinition Location =
071      AppointmentSchema.Location;
072
073  /**
074   * Defines the Recurrence property.
075   */
076  public static final PropertyDefinition Recurrence =
077      AppointmentSchema.Recurrence;
078
079  /**
080   * Defines the AppointmentType property.
081   */
082  public static final PropertyDefinition AppointmentType =
083      AppointmentSchema.AppointmentType;
084
085  // Defines the Start property.
086  /**
087   * The Constant Start.
088   */
089  public static final PropertyDefinition ProposedStart =
090      new DateTimePropertyDefinition(
091          XmlElementNames.ProposedStart, FieldUris.ProposedStart, EnumSet.of(
092          PropertyDefinitionFlags.CanSet,
093          PropertyDefinitionFlags.CanFind),
094          ExchangeVersion.Exchange2007_SP1,
095          true);
096
097  // Defines the End property.
098  /**
099   * The Constant End.
100   */
101  public static final PropertyDefinition ProposedEnd
102     = new DateTimePropertyDefinition(
103           XmlElementNames.ProposedEnd, FieldUris.ProposedEnd, EnumSet.of(
104           PropertyDefinitionFlags.CanSet,
105           PropertyDefinitionFlags.CanFind),
106           ExchangeVersion.Exchange2007_SP1,
107           true);
108
109  /**
110   * This must be after the declaration of property definitions.
111   */
112  public static final MeetingResponseSchema Instance =
113      new MeetingResponseSchema();
114
115  /**
116   * Registers property.
117   *
118   * IMPORTANT NOTE: PROPERTIES MUST BE REGISTERED IN SCHEMA ORDER (i.e. the
119   * same order as they are defined in types.xsd)
120   */
121  @Override
122  protected void registerProperties() {
123    super.registerProperties();
124
125    this.registerProperty(Start);
126    this.registerProperty(End);
127    this.registerProperty(Location);
128    this.registerProperty(Recurrence);
129    this.registerProperty(AppointmentType);
130    
131    this.registerProperty(ProposedStart);
132    this.registerProperty(ProposedEnd);
133
134  }
135
136  /**
137   * Initializes a new instance of the class.
138   */
139  protected MeetingResponseSchema() {
140    super();
141  }
142}