Android Open Source - PhoneGap-Calendar-Plugin Calendar Entry






From Project

Back to project page PhoneGap-Calendar-Plugin.

License

The source code is released under:

Apache License

If you think the Android project PhoneGap-Calendar-Plugin listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*
 * Copyright (c) 2010 Google Inc./*  w ww  .  j  a v a2 s. com*/
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */


/*
 *  Modified by Sergio Martinez. Copyright 2011 Vodafone Group Services Ltd.
 * 
 */

package com.phonegap.calendar.android.model;

import com.google.api.client.util.Key;

/**
 * Calendar object for new calendar entries in calendar  
 * @author Yaniv Inbar
 * @author Sergio Martinez Rodriguez
 */
public class CalendarEntry extends Entry {

  /**
   * EVENTS_FEED constant URL
   */
  public static final String EVENTS_FEED = "http://schemas.google.com/gCal/2005#eventFeed";
  
  /**
   * ACCESS_CONTROL_LIST constant URL
   */
  public static final String ACCESS_CONTROL_LIST = "http://schemas.google.com/acl/2007#accessControlList";

  /** Current user has no access to the calendar. */
  public static final String ACCESS_LEVEL_NONE = "none";
  /** Current user has read-only access to the calendar. */
  public static final String ACCESS_LEVEL_READ = "read";
  /**
   * Current user can see only the free/busy information on the calendar, not
   * the details of events.
   */
  public static final String ACCESS_LEVEL_FREEBUSY = "freebusy";
  /**
   * Current user has full edit access to the calendar, except that they can't
   * change the calendar's access control settings.
   */
  public static final String ACCESS_LEVEL_EDITOR = "editor";
  /** Current user has full owner access to the calendar. */
  public static final String ACCESS_LEVEL_OWNER = "owner";
  /**
   * Available only in Google Apps domains. User is a domain administrator,
   * and therefore has full owner access to the calendar regardless of access
   * control settings.
   */
  public static final String ACCESS_LEVEL_ROOT = "root";

  /**
   * Category tag in Calendar feed
   */
  @Key("category")
  public Category category;

  
  /**
   * Indicates what level of access the current user (the one whose
   * credentials are being used to request the metafeed) has to the calendar.
   * Possible values are {@link #ACCESS_LEVEL_EDITOR},
   * {@link #ACCESS_LEVEL_FREEBUSY}, {@link #ACCESS_LEVEL_NONE},
   * {@link #ACCESS_LEVEL_OWNER}, {@link #ACCESS_LEVEL_READ} and
   * {@link #ACCESS_LEVEL_ROOT}.
   */
  @Key("gCal:accesslevel")
  public Value accessLevel;

  /**
   * The color used to highlight a calendar in the user's browser. Must be one
   * of the hexadecimal RGB color values listed <a href=
   * "http://code.google.com/apis/calendar/data/2.0/reference.html#gCalcolor"
   * >here</a>.
   */
  @Key("gCal:color")
  public Value color;

  /**
   * gCal:hidden tag in Calendar feed
   */
  @Key("gCal:hidden")
  public Boolean hidden;

  /**
   * gCal:selected tag in Calendar feed
   */
  @Key("gCal:selected")
  public Boolean selected;

  /**
   * gCal:timezone tag in Calendar feed
   */
  @Key("gCal:timezone")
  public String timezone;

  /**
   * Calls clone method in superclass
   */
    @Override
    public CalendarEntry clone() {
      return (CalendarEntry) super.clone();
    }
  
  /**
   * Returns the events feed link of the Entry.
   * @return The events feed link of the Entry or {@code null} if not found.
   */
  public String getEventsFeedLink() {
    return Link.find(links, EVENTS_FEED);
  }

  /**
   * Returns the access control list link of the Entry.
   * @return The access control list link of the Entry or {@code null} if not
   *         found.
   */
  public String getAccessControlListLink() {
    return Link.find(links, ACCESS_CONTROL_LIST);
  }
}




Java Source Code List

com.phonegap.calendar.android.accounts.AccountsUtils.java
com.phonegap.calendar.android.accounts.GoogleAccountUtils.java
com.phonegap.calendar.android.accounts.package-info.java
com.phonegap.calendar.android.adapters.Calendar.java
com.phonegap.calendar.android.adapters.CalendarsManager.java
com.phonegap.calendar.android.adapters.Dt.java
com.phonegap.calendar.android.adapters.Duration.java
com.phonegap.calendar.android.adapters.Event.java
com.phonegap.calendar.android.adapters.Recurrence.java
com.phonegap.calendar.android.adapters.Rule.java
com.phonegap.calendar.android.adapters.package-info.java
com.phonegap.calendar.android.core.CalendarClientFactory.java
com.phonegap.calendar.android.core.CalendarClient.java
com.phonegap.calendar.android.core.CalendarOps.java
com.phonegap.calendar.android.core.package-info.java
com.phonegap.calendar.android.model.AttendeeStatus.java
com.phonegap.calendar.android.model.Author.java
com.phonegap.calendar.android.model.BatchOperation.java
com.phonegap.calendar.android.model.BatchStatus.java
com.phonegap.calendar.android.model.CalendarEntry.java
com.phonegap.calendar.android.model.CalendarFeed.java
com.phonegap.calendar.android.model.CalendarUrl.java
com.phonegap.calendar.android.model.Category.java
com.phonegap.calendar.android.model.Comments.java
com.phonegap.calendar.android.model.Entry.java
com.phonegap.calendar.android.model.EventEntry.java
com.phonegap.calendar.android.model.EventFeed.java
com.phonegap.calendar.android.model.FeedLink.java
com.phonegap.calendar.android.model.Feed.java
com.phonegap.calendar.android.model.Link.java
com.phonegap.calendar.android.model.Reminder.java
com.phonegap.calendar.android.model.Value.java
com.phonegap.calendar.android.model.When.java
com.phonegap.calendar.android.model.Where.java
com.phonegap.calendar.android.model.Who.java
com.phonegap.calendar.android.model.package-info.java
com.phonegap.calendar.android.utils.DateUtils.java
com.phonegap.calendar.android.utils.package-info.java
com.phonegap.calendar.app.ApplicationActivity.java
com.trial.phonegap.plugin.calendar.CalendarAccessorCreator.java
com.trial.phonegap.plugin.calendar.CalendarAccessorGoogle.java
com.trial.phonegap.plugin.calendar.CalendarAccessorMock.java
com.trial.phonegap.plugin.calendar.CalendarPlugin.java