001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/component/tags/sakai_2-4-1/component-api/api/src/java/org/sakaiproject/component/cover/ServerConfigurationService.java $
003: * $Id: ServerConfigurationService.java 22311 2007-03-08 03:36:41Z ggolden@umich.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2003, 2004, 2005, 2006, 2007 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.component.cover;
021:
022: import org.sakaiproject.component.cover.ComponentManager;
023:
024: /**
025: * <p>
026: * ServerConfigurationService is a static Cover for the {@link org.sakaiproject.component.api.ServerConfigurationService ServerConfigurationService}; see that interface for usage details.
027: * </p>
028: *
029: * @author University of Michigan, Sakai Software Development Team
030: * @version $Revision: 22311 $
031: */
032: public class ServerConfigurationService {
033: public final static String CURRENT_SERVER_URL = org.sakaiproject.component.api.ServerConfigurationService.CURRENT_SERVER_URL;
034:
035: public final static String CURRENT_PORTAL_PATH = org.sakaiproject.component.api.ServerConfigurationService.CURRENT_PORTAL_PATH;
036:
037: /**
038: * Access the component instance: special cover only method.
039: *
040: * @return the component instance.
041: */
042: public static org.sakaiproject.component.api.ServerConfigurationService getInstance() {
043: if (ComponentManager.CACHE_COMPONENTS) {
044: if (m_instance == null)
045: m_instance = (org.sakaiproject.component.api.ServerConfigurationService) ComponentManager
046: .get(org.sakaiproject.component.api.ServerConfigurationService.class);
047: return m_instance;
048: } else {
049: return (org.sakaiproject.component.api.ServerConfigurationService) ComponentManager
050: .get(org.sakaiproject.component.api.ServerConfigurationService.class);
051: }
052: }
053:
054: private static org.sakaiproject.component.api.ServerConfigurationService m_instance = null;
055:
056: public static java.lang.String SERVICE_NAME = org.sakaiproject.component.api.ServerConfigurationService.SERVICE_NAME;
057:
058: public static java.lang.String getServerId() {
059: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
060: if (service == null)
061: return null;
062:
063: return service.getServerId();
064: }
065:
066: public static java.lang.String getServerInstance() {
067: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
068: if (service == null)
069: return null;
070:
071: return service.getServerInstance();
072: }
073:
074: public static java.lang.String getServerIdInstance() {
075: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
076: if (service == null)
077: return null;
078:
079: return service.getServerIdInstance();
080: }
081:
082: public static java.lang.String getServerName() {
083: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
084: if (service == null)
085: return null;
086:
087: return service.getServerName();
088: }
089:
090: public static java.lang.String getServerUrl() {
091: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
092: if (service == null)
093: return null;
094:
095: return service.getServerUrl();
096: }
097:
098: public static java.lang.String getAccessUrl() {
099: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
100: if (service == null)
101: return null;
102:
103: return service.getAccessUrl();
104: }
105:
106: public static java.lang.String getAccessPath() {
107: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
108: if (service == null)
109: return null;
110:
111: return service.getAccessPath();
112: }
113:
114: public static java.lang.String getHelpUrl(java.lang.String param0) {
115: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
116: if (service == null)
117: return null;
118:
119: return service.getHelpUrl(param0);
120: }
121:
122: public static java.lang.String getPortalUrl() {
123: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
124: if (service == null)
125: return null;
126:
127: return service.getPortalUrl();
128: }
129:
130: public static java.lang.String getToolUrl() {
131: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
132: if (service == null)
133: return null;
134:
135: return service.getToolUrl();
136: }
137:
138: public static java.lang.String getGatewaySiteId() {
139: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
140: if (service == null)
141: return null;
142:
143: return service.getGatewaySiteId();
144: }
145:
146: public static java.lang.String getLoggedOutUrl() {
147: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
148: if (service == null)
149: return null;
150:
151: return service.getLoggedOutUrl();
152: }
153:
154: public static java.lang.String getUserHomeUrl() {
155: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
156: if (service == null)
157: return null;
158:
159: return service.getUserHomeUrl();
160: }
161:
162: public static java.lang.String getSakaiHomePath() {
163: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
164: if (service == null)
165: return null;
166:
167: return service.getSakaiHomePath();
168: }
169:
170: public static boolean getBoolean(java.lang.String param0,
171: boolean param1) {
172: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
173: if (service == null)
174: return false;
175:
176: return service.getBoolean(param0, param1);
177: }
178:
179: public static java.lang.String getString(java.lang.String param0,
180: java.lang.String param1) {
181: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
182: if (service == null)
183: return null;
184:
185: return service.getString(param0, param1);
186: }
187:
188: public static java.lang.String getString(java.lang.String param0) {
189: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
190: if (service == null)
191: return null;
192:
193: return service.getString(param0);
194: }
195:
196: public static java.lang.String[] getStrings(java.lang.String param0) {
197: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
198: if (service == null)
199: return null;
200:
201: return service.getStrings(param0);
202: }
203:
204: public static java.util.List getToolOrder(java.lang.String param0) {
205: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
206: if (service == null)
207: return null;
208:
209: return service.getToolOrder(param0);
210: }
211:
212: public static java.util.List getToolsRequired(
213: java.lang.String param0) {
214: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
215: if (service == null)
216: return null;
217:
218: return service.getToolsRequired(param0);
219: }
220:
221: public static java.util.List getDefaultTools(java.lang.String param0) {
222: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
223: if (service == null)
224: return null;
225:
226: return service.getDefaultTools(param0);
227: }
228:
229: public static int getInt(java.lang.String param0, int param1) {
230: org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
231: if (service == null)
232: return 0;
233:
234: return service.getInt(param0, param1);
235: }
236: }
|