KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > deliver > portal > om > SecurityRoleRefSetImpl


1 /* ===============================================================================
2 *
3 * Part of the InfoGlue Content Management Platform (www.infoglue.org)
4 *
5 * ===============================================================================
6 *
7 * Copyright (C)
8 *
9 * This program is free software; you can redistribute it and/or modify it under
10 * the terms of the GNU General Public License version 2, as published by the
11 * Free Software Foundation. See the file LICENSE.html for more information.
12 *
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY, including the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along with
18 * this program; if not, write to the Free Software Foundation, Inc. / 59 Temple
19 * Place, Suite 330 / Boston, MA 02111-1307 / USA.
20 *
21 * ===============================================================================
22 */

23 package org.infoglue.deliver.portal.om;
24
25 import java.util.Collection JavaDoc;
26 import java.util.Iterator JavaDoc;
27 import java.util.Vector JavaDoc;
28
29 import org.apache.pluto.om.common.SecurityRoleRef;
30 import org.apache.pluto.om.common.SecurityRoleRefSet;
31
32 /**
33  * Dummy implementation of interface
34  * @author Jöran
35  * TODO Implement this
36  *
37  */

38 public class SecurityRoleRefSetImpl implements SecurityRoleRefSet {
39     private Vector JavaDoc container = new Vector JavaDoc();
40     
41     /* (non-Javadoc)
42      * @see org.apache.pluto.om.common.SecurityRoleRefSet#get(java.lang.String)
43      */

44     public SecurityRoleRef get(String JavaDoc name) {
45         for(Iterator JavaDoc iter = container.iterator(); iter.hasNext();){
46             Object JavaDoc o = iter.next();
47             if(o instanceof SecurityRoleRef){
48                 SecurityRoleRef ref = (SecurityRoleRef)o;
49                 if(ref.getRoleName().equals(name)){
50                     return ref;
51                 }
52             }
53         }
54         return null;
55     }
56
57     /* (non-Javadoc)
58      * @see java.util.Collection#size()
59      */

60     public int size() {
61         return container.size();
62     }
63
64     /* (non-Javadoc)
65      * @see java.util.Collection#clear()
66      */

67     public void clear() {
68         container.clear();
69     }
70
71     /* (non-Javadoc)
72      * @see java.util.Collection#isEmpty()
73      */

74     public boolean isEmpty() {
75         return container.isEmpty();
76     }
77
78     /* (non-Javadoc)
79      * @see java.util.Collection#toArray()
80      */

81     public Object JavaDoc[] toArray() {
82         return container.toArray();
83     }
84
85     /* (non-Javadoc)
86      * @see java.util.Collection#add(java.lang.Object)
87      */

88     public boolean add(Object JavaDoc arg0) {
89         return container.add(arg0);
90     }
91
92     /* (non-Javadoc)
93      * @see java.util.Collection#contains(java.lang.Object)
94      */

95     public boolean contains(Object JavaDoc arg0) {
96         return container.contains(arg0);
97     }
98
99     /* (non-Javadoc)
100      * @see java.util.Collection#remove(java.lang.Object)
101      */

102     public boolean remove(Object JavaDoc arg0) {
103         return container.remove(arg0);
104     }
105
106     /* (non-Javadoc)
107      * @see java.util.Collection#addAll(java.util.Collection)
108      */

109     public boolean addAll(Collection JavaDoc arg0) {
110         return container.addAll(arg0);
111     }
112
113     /* (non-Javadoc)
114      * @see java.util.Collection#containsAll(java.util.Collection)
115      */

116     public boolean containsAll(Collection JavaDoc arg0) {
117         return container.containsAll(arg0);
118     }
119
120     /* (non-Javadoc)
121      * @see java.util.Collection#removeAll(java.util.Collection)
122      */

123     public boolean removeAll(Collection JavaDoc arg0) {
124         return container.removeAll(arg0);
125     }
126
127     /* (non-Javadoc)
128      * @see java.util.Collection#retainAll(java.util.Collection)
129      */

130     public boolean retainAll(Collection JavaDoc arg0) {
131         return container.retainAll(arg0);
132     }
133
134     /* (non-Javadoc)
135      * @see java.util.Collection#iterator()
136      */

137     public Iterator JavaDoc iterator() {
138         return container.iterator();
139     }
140
141     /* (non-Javadoc)
142      * @see java.util.Collection#toArray(java.lang.Object[])
143      */

144     public Object JavaDoc[] toArray(Object JavaDoc[] arg0) {
145         return container.toArray(arg0);
146     }
147
148 }
149
Popular Tags