1 23 package org.infoglue.deliver.portal.om; 24 25 import java.util.Collection ; 26 import java.util.Iterator ; 27 import java.util.Vector ; 28 29 import org.apache.pluto.om.common.SecurityRoleRef; 30 import org.apache.pluto.om.common.SecurityRoleRefSet; 31 32 38 public class SecurityRoleRefSetImpl implements SecurityRoleRefSet { 39 private Vector container = new Vector (); 40 41 44 public SecurityRoleRef get(String name) { 45 for(Iterator iter = container.iterator(); iter.hasNext();){ 46 Object 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 60 public int size() { 61 return container.size(); 62 } 63 64 67 public void clear() { 68 container.clear(); 69 } 70 71 74 public boolean isEmpty() { 75 return container.isEmpty(); 76 } 77 78 81 public Object [] toArray() { 82 return container.toArray(); 83 } 84 85 88 public boolean add(Object arg0) { 89 return container.add(arg0); 90 } 91 92 95 public boolean contains(Object arg0) { 96 return container.contains(arg0); 97 } 98 99 102 public boolean remove(Object arg0) { 103 return container.remove(arg0); 104 } 105 106 109 public boolean addAll(Collection arg0) { 110 return container.addAll(arg0); 111 } 112 113 116 public boolean containsAll(Collection arg0) { 117 return container.containsAll(arg0); 118 } 119 120 123 public boolean removeAll(Collection arg0) { 124 return container.removeAll(arg0); 125 } 126 127 130 public boolean retainAll(Collection arg0) { 131 return container.retainAll(arg0); 132 } 133 134 137 public Iterator iterator() { 138 return container.iterator(); 139 } 140 141 144 public Object [] toArray(Object [] arg0) { 145 return container.toArray(arg0); 146 } 147 148 } 149 | Popular Tags |