/* =============================================================================== * * Part of the InfoGlue Content Management Platform (www.infoglue.org) * * =============================================================================== * * Copyright (C) * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 2, as published by the * Free Software Foundation. See the file LICENSE.html for more information. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY, including the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc. / 59 Temple * Place, Suite 330 / Boston, MA 02111-1307 / USA. * * =============================================================================== */ package org.infoglue.deliver.portal.om; import java.util.Collection; import java.util.Iterator; import java.util.Vector; import org.apache.pluto.om.common.SecurityRole; import org.apache.pluto.om.common.SecurityRoleSet; /** * Dummy implementation of interface * @author J�ran * TODO Implement this * */ public class SecurityRoleSetImpl implements SecurityRoleSet { private Vector roles = new Vector(); /* (non-Javadoc) * @see org.apache.pluto.om.common.SecurityRoleSet#get(java.lang.String) */ public SecurityRole get(String name) { for(Iterator iter = roles.iterator(); iter.hasNext();){ Object o = iter.next(); if(o instanceof SecurityRole){ SecurityRole role= (SecurityRole)o; if(role.getRoleName().equals(name)){ return role; } } } return null; } /* (non-Javadoc) * @see java.util.Collection#size() */ public int size() { return roles.size(); } /* (non-Javadoc) * @see java.util.Collection#clear() */ public void clear() { roles.clear(); } /* (non-Javadoc) * @see java.util.Collection#isEmpty() */ public boolean isEmpty() { return roles.isEmpty(); } /* (non-Javadoc) * @see java.util.Collection#toArray() */ public Object[] toArray() { return roles.toArray(); } /* (non-Javadoc) * @see java.util.Collection#add(java.lang.Object) */ public boolean add(Object arg0) { return roles.add(arg0); } /* (non-Javadoc) * @see java.util.Collection#contains(java.lang.Object) */ public boolean contains(Object arg0) { return roles.contains(arg0); } /* (non-Javadoc) * @see java.util.Collection#remove(java.lang.Object) */ public boolean remove(Object arg0) { return roles.remove(arg0); } /* (non-Javadoc) * @see java.util.Collection#addAll(java.util.Collection) */ public boolean addAll(Collection arg0) { return roles.addAll(arg0); } /* (non-Javadoc) * @see java.util.Collection#containsAll(java.util.Collection) */ public boolean containsAll(Collection arg0) { return roles.containsAll(arg0); } /* (non-Javadoc) * @see java.util.Collection#removeAll(java.util.Collection) */ public boolean removeAll(Collection arg0) { return roles.removeAll(arg0); } /* (non-Javadoc) * @see java.util.Collection#retainAll(java.util.Collection) */ public boolean retainAll(Collection arg0) { return roles.retainAll(arg0); } /* (non-Javadoc) * @see java.util.Collection#iterator() */ public Iterator iterator() { return roles.iterator(); } /* (non-Javadoc) * @see java.util.Collection#toArray(java.lang.Object[]) */ public Object[] toArray(Object[] arg0) { return roles.toArray(arg0); } }