001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/presence/tags/sakai_2-4-1/presence-api/api/src/java/org/sakaiproject/presence/cover/PresenceService.java $
003: * $Id: PresenceService.java 18354 2006-11-21 20:42:33Z josrodri@iupui.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2003, 204, 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.presence.cover;
021:
022: import org.sakaiproject.component.cover.ComponentManager;
023:
024: /**
025: * <p>
026: * PresenceService is a static Cover for the {@link org.sakaiproject.presence.api.PresenceService PresenceService}; see that interface for usage details.
027: * </p>
028: */
029: public class PresenceService {
030: /**
031: * Access the component instance: special cover only method.
032: *
033: * @return the component instance.
034: */
035: public static org.sakaiproject.presence.api.PresenceService getInstance() {
036: if (ComponentManager.CACHE_COMPONENTS) {
037: if (m_instance == null)
038: m_instance = (org.sakaiproject.presence.api.PresenceService) ComponentManager
039: .get(org.sakaiproject.presence.api.PresenceService.class);
040: return m_instance;
041: } else {
042: return (org.sakaiproject.presence.api.PresenceService) ComponentManager
043: .get(org.sakaiproject.presence.api.PresenceService.class);
044: }
045: }
046:
047: private static org.sakaiproject.presence.api.PresenceService m_instance = null;
048:
049: public static java.lang.String REFERENCE_ROOT = org.sakaiproject.presence.api.PresenceService.REFERENCE_ROOT;
050:
051: public static java.lang.String EVENT_PRESENCE = org.sakaiproject.presence.api.PresenceService.EVENT_PRESENCE;
052:
053: public static java.lang.String EVENT_ABSENCE = org.sakaiproject.presence.api.PresenceService.EVENT_ABSENCE;
054:
055: public static java.lang.String presenceReference(
056: java.lang.String param0) {
057: org.sakaiproject.presence.api.PresenceService service = getInstance();
058: if (service == null)
059: return null;
060:
061: return service.presenceReference(param0);
062: }
063:
064: public static java.lang.String locationId(java.lang.String param0,
065: java.lang.String param1, java.lang.String param2) {
066: org.sakaiproject.presence.api.PresenceService service = getInstance();
067: if (service == null)
068: return null;
069:
070: return service.locationId(param0, param1, param2);
071: }
072:
073: public static java.lang.String getLocationDescription(
074: java.lang.String param0) {
075: org.sakaiproject.presence.api.PresenceService service = getInstance();
076: if (service == null)
077: return null;
078:
079: return service.getLocationDescription(param0);
080: }
081:
082: public static void setPresence(java.lang.String param0) {
083: org.sakaiproject.presence.api.PresenceService service = getInstance();
084: if (service == null)
085: return;
086:
087: service.setPresence(param0);
088: }
089:
090: public static void removePresence(java.lang.String param0) {
091: org.sakaiproject.presence.api.PresenceService service = getInstance();
092: if (service == null)
093: return;
094:
095: service.removePresence(param0);
096: }
097:
098: public static java.util.List getPresence(java.lang.String param0) {
099: org.sakaiproject.presence.api.PresenceService service = getInstance();
100: if (service == null)
101: return null;
102:
103: return service.getPresence(param0);
104: }
105:
106: public static java.util.List getPresentUsers(java.lang.String param0) {
107: org.sakaiproject.presence.api.PresenceService service = getInstance();
108: if (service == null)
109: return null;
110:
111: return service.getPresentUsers(param0);
112: }
113:
114: public static java.util.List getPresentUsers(
115: java.lang.String param0, java.lang.String param1) {
116: org.sakaiproject.presence.api.PresenceService service = getInstance();
117: if (service == null)
118: return null;
119:
120: return service.getPresentUsers(param0, param1);
121: }
122:
123: public static java.util.List getLocations() {
124: org.sakaiproject.presence.api.PresenceService service = getInstance();
125: if (service == null)
126: return null;
127:
128: return service.getLocations();
129: }
130:
131: public static int getTimeout() {
132: org.sakaiproject.presence.api.PresenceService service = getInstance();
133: if (service == null)
134: return 0;
135:
136: return service.getTimeout();
137: }
138: }
|