001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/presence/trunk/presence-api/api/src/java/org/sakaiproject/presence/api/PresenceService.java $
003: * $Id: PresenceService.java 7844 2006-04-17 13:06:02Z ggolden@umich.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 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.api.app.roster;
021:
022: import java.util.List;
023:
024: /**
025: * @author rshastri
026: */
027: public interface RosterManager {
028: // Roster filters
029: public static final String VIEW_ALL_SECT = "all";
030: public static final String VIEW_MY_SECT = "my";
031: public static final String VIEW_NO_SECT = "no";
032:
033: public void init();
034:
035: public void destroy();
036:
037: /**
038: * Check for export permission (roster.export)
039: * @return
040: */
041: public boolean currentUserHasExportPerm();
042:
043: /**
044: * Check for view all permission (roster.viewall)
045: * @return
046: */
047: public boolean currentUserHasViewAllPerm();
048:
049: /**
050: * Check for view section permission (roster.viewsection)
051: * @return
052: */
053: public boolean currentUserHasViewSectionPerm();
054:
055: /**
056: * Check for view hidden permission (roster.viewhidden)
057: * @return
058: */
059: public boolean currentUserHasViewHiddenPerm();
060:
061: /**
062: * Check for view official id permission (roster.viewofficialid)
063: * @return
064: */
065: public boolean currentUserHasViewOfficialIdPerm();
066:
067: /**
068: * Check for site update permission (site.upd)
069: * @return
070: */
071: public boolean currentUserHasSiteUpdatePerm();
072:
073: /**
074: * Check to see if the site has any sections/groups
075: * @return
076: */
077: public boolean siteHasSections();
078:
079: /**
080: * Get the sections viewable by current user
081: * @return
082: */
083: public List getViewableSectionsForCurrentUser();
084:
085: /**
086: * @return List of all the participants in the site viewable to current user
087: */
088: public List getRoster(String filter);
089:
090: /**
091: * Returns a participant by the id
092: * @param participantId
093: * @return
094: */
095: public Participant getParticipantById(String participantId);
096:
097: /**
098: * Sort the participants ascendingly or decendingly
099: * by various available columns
100: * @param participants
101: * @param sortByColumn
102: * @param ascending
103: */
104: public void sortParticipants(List participants,
105: String sortByColumn, boolean ascending);
106:
107: }
|