01: /**********************************************************************************
02: * $URL:https://source.sakaiproject.org/svn/osp/trunk/common/api-impl/src/java/org/theospi/portfolio/shared/mgt/WrappedArtifactFinderManager.java $
03: * $Id:WrappedArtifactFinderManager.java 9134 2006-05-08 20:28:42Z chmaurer@iupui.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.theospi.portfolio.shared.mgt;
21:
22: import java.util.Map;
23:
24: import org.sakaiproject.metaobj.shared.ArtifactFinder;
25: import org.sakaiproject.metaobj.shared.ArtifactFinderManager;
26:
27: /**
28: * Created by IntelliJ IDEA.
29: * User: John Ellis
30: * Date: Nov 7, 2005
31: * Time: 6:36:26 PM
32: * To change this template use File | Settings | File Templates.
33: */
34: public class WrappedArtifactFinderManager implements
35: ArtifactFinderManager {
36:
37: private ArtifactFinderManager base;
38: private Map substitutions;
39:
40: public ArtifactFinder getArtifactFinderByType(String key) {
41: ArtifactFinder finder = (ArtifactFinder) substitutions.get(key);
42:
43: if (finder != null) {
44: return finder;
45: }
46: return base.getArtifactFinderByType(key);
47: }
48:
49: public Map getFinders() {
50: return base.getFinders();
51: }
52:
53: public Map getSubstitutions() {
54: return substitutions;
55: }
56:
57: public void setSubstitutions(Map substitutions) {
58: this .substitutions = substitutions;
59: }
60:
61: public ArtifactFinderManager getBase() {
62: return base;
63: }
64:
65: public void setBase(ArtifactFinderManager base) {
66: this.base = base;
67: }
68: }
|