001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/calendar/tags/sakai_2-4-1/calendar-api/api/src/java/org/sakaiproject/calendar/api/CalendarEventEdit.java $
003: * $Id: CalendarEventEdit.java 13498 2006-08-10 20:20:27Z bkirschn@umich.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
007: *
008: * Licensed under the Educational Community License, Version 1.0 (the "License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.opensource.org/licenses/ecl1.php
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: **********************************************************************************/package org.sakaiproject.calendar.api;
021:
022: import java.util.Collection;
023:
024: import org.sakaiproject.entity.api.AttachmentContainerEdit;
025: import org.sakaiproject.entity.api.Edit;
026: import org.sakaiproject.exception.PermissionException;
027: import org.sakaiproject.time.api.TimeRange;
028:
029: /**
030: * <p>CalendarEventEdit is an editable CalendarEvent</p>
031: */
032: public interface CalendarEventEdit extends CalendarEvent, Edit,
033: AttachmentContainerEdit {
034: /**
035: * Replace the time range
036: * @param The new event time range
037: */
038: public void setRange(TimeRange range);
039:
040: /**
041: * Set the display name property (cover for PROP_DISPLAY_NAME).
042: * @param name The event's display name property.
043: */
044: public void setDisplayName(String name);
045:
046: /**
047: * Set the description property as plain text (cover for PROP_DESCRIPTION).
048: * @param description The event's description property.
049: */
050: public void setDescription(String description);
051:
052: /**
053: * Set the description property as formatted text (cover for PROP_DESCRIPTION).
054: * @param description The event's description property.
055: */
056: public void setDescriptionFormatted(String description);
057:
058: /**
059: * Set the type (cover for PROP_CALENDAR_TYPE).
060: * @param type The event's type property.
061: */
062: public void setType(String type);
063:
064: /**
065: * Set the location (cover for PROP_CALENDAR_LOCATION).
066: * @param location The event's location property.
067: */
068: public void setLocation(String location);
069:
070: /**
071: * Set the value of an "extra" event field.
072: * @param name The "extra" field name
073: * @param value The value to set, or null to remove the field.
074: */
075: public void setField(String name, String value);
076:
077: /**
078: * Sets the recurrence rule.
079: * @param rule The recurrence rule, or null to clear out the rule.
080: */
081: public void setRecurrenceRule(RecurrenceRule rule);
082:
083: /**
084: * Set these as the event's groups, replacing the access and groups already defined.
085: *
086: * @param Collection
087: * groups The colelction of Group objects to use for this event.
088: * @param own
089: * boolean flag true if setting access for own event
090: * @throws PermissionException
091: * if the end user does not have permission to remove from the groups that would be removed or add to the groups that would be added.
092: */
093: void setGroupAccess(Collection groups, boolean own)
094: throws PermissionException;
095:
096: /**
097: * Remove any grouping for this event; the access mode reverts to site and any groups are removed.
098: *
099: * @throws PermissionException
100: * if the end user does not have permission to do this.
101: */
102: void clearGroupAccess() throws PermissionException;
103:
104: /**
105: * Set the event creator (cover for PROP_CREATOR) to current user
106: */
107: public void setCreator();
108:
109: /**
110: * Set the event modifier (cover for PROP_MODIFIED_BY) to current user
111: */
112: public void setModifiedBy();
113:
114: } // CalendarEventEdit
|