001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/content/tags/sakai_2-4-1/content-api/api/src/java/org/sakaiproject/content/api/GroupAwareEdit.java $
003: * $Id: GroupAwareEdit.java 13360 2006-08-03 21:35:13Z jimeng@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.content.api;
021:
022: import java.util.Collection;
023:
024: import org.sakaiproject.entity.api.Edit;
025: import org.sakaiproject.exception.InconsistentException;
026: import org.sakaiproject.exception.PermissionException;
027: import org.sakaiproject.site.api.Group;
028: import org.sakaiproject.time.api.Time;
029:
030: /**
031: * <p>
032: * GroupAwareEdit is an interface that must be implemented to make changes in entities of types that are group aware.
033: * </p>
034: */
035: public interface GroupAwareEdit extends GroupAwareEntity, Edit {
036: /**
037: *
038: * @throws InconsistentException
039: * @throws PermissionException
040: */
041: public void clearGroupAccess() throws InconsistentException,
042: PermissionException;
043:
044: /**
045: *
046: * @param groups The collection (String) of reference-strings identifying the groups to be added.
047: * @throws InconsistentException
048: * @throws PermissionException
049: */
050: public void setGroupAccess(Collection groups)
051: throws InconsistentException, PermissionException;
052:
053: /**
054: *
055: * @throws InconsistentException
056: * @throws PermissionException
057: */
058: public void setPublicAccess() throws InconsistentException,
059: PermissionException;
060:
061: /**
062: *
063: * @throws InconsistentException
064: * @throws PermissionException
065: */
066: public void clearPublicAccess() throws InconsistentException,
067: PermissionException;
068:
069: /**
070: * Set the release date before which this entity should not be available to users
071: * except those with adequate permission (what defines "adequate permission" is TBD).
072: * @param time The date/time at which the entity may be accessed by all users.
073: */
074: public void setReleaseDate(Time time);
075:
076: /**
077: * Set the retract date after which this entity should not be available to users
078: * except those with adequate permission (what defines "adequate permission" is TBD).
079: * @param time The date/time at which access to the entity should be restricted.
080: */
081: public void setRetractDate(Time time);
082:
083: /**
084: * Make this entity hidden. Any values previously set for releaseDate and/or retractDate
085: * are removed.
086: */
087: public void setHidden();
088:
089: /**
090: * Set all of the attributes that determine availability. If hidden is true, releaseDate
091: * and retractDate are ignored, and those attributes are set to null. If hidden is false,
092: * releaseDate and/or retractDate may null, indicating that releaseDate and/or retractDate
093: * should not be considered in calculating availability. If hidden is false and a value
094: * is given for releaseDate, that should be saved to represent the time at which the item
095: * becomes available. If hidden is false and a value is given for retractDate, that should
096: * be saved to represent the time at which the item is no longer available.
097: * @param hidden
098: * @param releaseDate
099: * @param retractDate
100: */
101: public void setAvailability(boolean hidden, Time releaseDate,
102: Time retractDate);
103:
104: }
|