001: //=============================================================================
002: //=== Copyright (C) 2001-2007 Food and Agriculture Organization of the
003: //=== United Nations (FAO-UN), United Nations World Food Programme (WFP)
004: //=== and United Nations Environment Programme (UNEP)
005: //===
006: //=== This program is free software; you can redistribute it and/or modify
007: //=== it under the terms of the GNU General Public License as published by
008: //=== the Free Software Foundation; either version 2 of the License, or (at
009: //=== your option) any later version.
010: //===
011: //=== This program is distributed in the hope that it will be useful, but
012: //=== WITHOUT ANY WARRANTY; without even the implied warranty of
013: //=== MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: //=== General Public License for more details.
015: //===
016: //=== You should have received a copy of the GNU General Public License
017: //=== along with this program; if not, write to the Free Software
018: //=== Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
019: //===
020: //=== Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2,
021: //=== Rome - Italy. email: geonetwork@osgeo.org
022: //==============================================================================
023:
024: package org.fao.geonet;
025:
026: import jeeves.server.ServiceConfig;
027: import org.fao.geonet.kernel.AccessManager;
028: import org.fao.geonet.kernel.DataManager;
029: import org.fao.geonet.kernel.ThesaurusManager;
030: import org.fao.geonet.kernel.csw.CatalogDispatcher;
031: import org.fao.geonet.kernel.harvest.HarvestManager;
032: import org.fao.geonet.kernel.oaipmh.OaiPmhDispatcher;
033: import org.fao.geonet.kernel.search.SearchManager;
034: import org.fao.geonet.kernel.setting.SettingManager;
035:
036: //=============================================================================
037:
038: public class GeonetContext {
039: /* package */DataManager dataMan;
040: /* package */AccessManager accessMan;
041: /* package */SearchManager searchMan;
042: /* package */ServiceConfig config;
043: /* package */CatalogDispatcher catalogDis;
044: /* package */SettingManager settingMan;
045: /* package */HarvestManager harvestMan;
046: /* package */ThesaurusManager thesaurusMan;
047: /* package */OaiPmhDispatcher oaipmhDis;
048:
049: //---------------------------------------------------------------------------
050: /*package*/GeonetContext() {
051: }
052:
053: //---------------------------------------------------------------------------
054:
055: public DataManager getDataManager() {
056: return dataMan;
057: }
058:
059: public AccessManager getAccessManager() {
060: return accessMan;
061: }
062:
063: public SearchManager getSearchmanager() {
064: return searchMan;
065: }
066:
067: public ServiceConfig getHandlerConfig() {
068: return config;
069: }
070:
071: public CatalogDispatcher getCatalogDispatcher() {
072: return catalogDis;
073: }
074:
075: public SettingManager getSettingManager() {
076: return settingMan;
077: }
078:
079: public HarvestManager getHarvestManager() {
080: return harvestMan;
081: }
082:
083: public ThesaurusManager getThesaurusManager() {
084: return thesaurusMan;
085: }
086:
087: public OaiPmhDispatcher getOaipmhDispatcher() {
088: return oaipmhDis;
089: }
090:
091: //---------------------------------------------------------------------------
092:
093: public String getSiteId() {
094: return settingMan.getValue("system/site/siteId");
095: }
096:
097: public String getSiteName() {
098: return settingMan.getValue("system/site/name");
099: }
100: }
101:
102: //=============================================================================
|