01: /* Copyright 2004 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal.container.om.servlet;
07:
08: import java.io.Serializable;
09: import java.util.HashMap;
10: import java.util.Iterator;
11: import java.util.Map;
12:
13: /**
14: * Data structure to support WebApplicationDefinition for
15: * marshalling and unmarshalling of web.xml.
16: * Not needed by the Pluto container.
17: * @author Ken Weiner, kweiner@unicon.net
18: * @version $Revision: 34757 $
19: */
20: public class TagLibListImpl implements Serializable {
21:
22: private Map tagLibs = null; // TagLib Uri --> TagLibImpl
23:
24: public TagLibListImpl() {
25: tagLibs = new HashMap();
26: }
27:
28: public Iterator iterator() {
29: return tagLibs.values().iterator();
30: }
31:
32: public TagLibImpl get(String tagLibUri) {
33: return (TagLibImpl) tagLibs.get(tagLibUri);
34: }
35:
36: public TagLibImpl remove(String name) {
37: return (TagLibImpl) tagLibs.remove(name);
38: }
39:
40: public void remove(TagLibImpl tagLib) {
41: tagLibs.remove(tagLib.getTaglibUri());
42: }
43:
44: public void add(TagLibImpl tagLib) {
45: tagLibs.put(tagLib.getTaglibUri(), tagLib);
46: }
47:
48: public int size() {
49: return tagLibs.size();
50: }
51:
52: }
|