Package org.apache.fulcrum.security.util
Klasse SecuritySet<T extends SecurityEntity>
java.lang.Object
org.apache.fulcrum.security.util.SecuritySet<T>
- Alle implementierten Schnittstellen:
Serializable,Iterable<T>,Collection<T>,Set<T>
- Bekannte direkte Unterklassen:
GroupSet,PermissionSet,RoleSet,UserSet
public abstract class SecuritySet<T extends SecurityEntity>
extends Object
implements Serializable, Set<T>, Iterable<T>
This class represents a set of Security Entities. It makes it easy to build a
UI. It wraps a TreeSet object to enforce that only relevant methods are
available. TreeSet's contain only unique Objects (no duplicates) based on the
ID. They may or may not have a name, that depends on the implementation. Want
to get away from requiring an ID and a name... Nothing should force Name to
be unique in the basic architecture of Fulcrum Security.
- Version:
- $Id$
- Autor:
- Eric Pugh, John D. McNally, Brett McLaughlin, Marco Knüttel, Henning P. Schmiedehausen
- Siehe auch:
-
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanadd(Collection<? extends T> collection) Adds the entities in a Collection to this SecuritySet.booleanbooleanaddAll(Collection<? extends T> collection) voidclear()Removes all Objects from this Set.booleanChecks whether this SecuritySet contains an entity.booleancontainsAll(Collection<?> collection) booleancontainsId(Object id) Searches if an Object with a given Id is in the SetbooleancontainsName(String name) Searches if an Object with a given name is in the SetReturns an entity with the given id, if it is contained in this SecuritySet.Returns an entity with the given name, if it is contained in this SecuritySet.getIds()Returns a set of Id values in this Object.getNames()Returns a set of Names in this Object.getSet()Returns a set of security objects in this object.booleanisEmpty()iterator()Returns an Iterator for Objects in this Set.booleanRemoves an entity from this SecuritySet.booleanremoveAll(Collection<?> collection) booleanretainAll(Collection<?> collection) intsize()Returns size (cardinality) of this set.Object[]toArray()<A> A[]toArray(A[] a) toString()list of role names in this setVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitVon Schnittstelle geerbte Methoden java.util.Collection
parallelStream, removeIf, stream, toArrayVon Schnittstelle geerbte Methoden java.util.Set
equals, hashCode, spliterator
-
Felddetails
-
nameMap
Map for "name" is "security object" -
idMap
Map for "id" is "security object"
-
-
Konstruktordetails
-
SecuritySet
public SecuritySet()Constructs an empty Set
-
-
Methodendetails
-
getSet
Returns a set of security objects in this object.- Gibt zurück:
- A Set Object
-
getNames
Returns a set of Names in this Object.- Gibt zurück:
- The Set of Names in this Object, backed by the actual data.
-
getIds
Returns a set of Id values in this Object.- Gibt zurück:
- The Set of Ids in this Object, backed by the actual data.
-
clear
public void clear()Removes all Objects from this Set.- Angegeben von:
clearin SchnittstelleCollection<T extends SecurityEntity>- Angegeben von:
clearin SchnittstelleSet<T extends SecurityEntity>
-
containsName
Searches if an Object with a given name is in the Set- Parameter:
name- Name of the Security Object.- Gibt zurück:
- True if argument matched an Object in this Set; false if no match.
-
containsId
Searches if an Object with a given Id is in the Set- Parameter:
id- Id of the Security Object.- Gibt zurück:
- True if argument matched an Object in this Set; false if no match.
-
iterator
Returns an Iterator for Objects in this Set.- Angegeben von:
iteratorin SchnittstelleCollection<T extends SecurityEntity>- Angegeben von:
iteratorin SchnittstelleIterable<T extends SecurityEntity>- Angegeben von:
iteratorin SchnittstelleSet<T extends SecurityEntity>- Gibt zurück:
- An iterator for the Set
-
size
public int size()Returns size (cardinality) of this set.- Angegeben von:
sizein SchnittstelleCollection<T extends SecurityEntity>- Angegeben von:
sizein SchnittstelleSet<T extends SecurityEntity>- Gibt zurück:
- The cardinality of this Set.
-
toString
list of role names in this set -
add
- Angegeben von:
addin SchnittstelleCollection<T extends SecurityEntity>- Angegeben von:
addin SchnittstelleSet<T extends SecurityEntity>- Siehe auch:
-
add
Adds the entities in a Collection to this SecuritySet.- Parameter:
collection- A Collection of entities.- Gibt zurück:
- True if this Set changed as a result; false if no change to this Set occurred (this Set already contained all members of the added Set).
-
addAll
- Angegeben von:
addAllin SchnittstelleCollection<T extends SecurityEntity>- Angegeben von:
addAllin SchnittstelleSet<T extends SecurityEntity>
-
isEmpty
public boolean isEmpty()- Angegeben von:
isEmptyin SchnittstelleCollection<T extends SecurityEntity>- Angegeben von:
isEmptyin SchnittstelleSet<T extends SecurityEntity>
-
containsAll
- Angegeben von:
containsAllin SchnittstelleCollection<T extends SecurityEntity>- Angegeben von:
containsAllin SchnittstelleSet<T extends SecurityEntity>
-
removeAll
- Angegeben von:
removeAllin SchnittstelleCollection<T extends SecurityEntity>- Angegeben von:
removeAllin SchnittstelleSet<T extends SecurityEntity>
-
retainAll
- Angegeben von:
retainAllin SchnittstelleCollection<T extends SecurityEntity>- Angegeben von:
retainAllin SchnittstelleSet<T extends SecurityEntity>
-
toArray
- Angegeben von:
toArrayin SchnittstelleCollection<T extends SecurityEntity>- Angegeben von:
toArrayin SchnittstelleSet<T extends SecurityEntity>
-
contains
Checks whether this SecuritySet contains an entity.- Angegeben von:
containsin SchnittstelleCollection<T extends SecurityEntity>- Angegeben von:
containsin SchnittstelleSet<T extends SecurityEntity>- Parameter:
o- An entity.- Gibt zurück:
- True if this Set contains the entity, false otherwise.
-
remove
Removes an entity from this SecuritySet.- Angegeben von:
removein SchnittstelleCollection<T extends SecurityEntity>- Angegeben von:
removein SchnittstelleSet<T extends SecurityEntity>- Parameter:
o- An entity.- Gibt zurück:
- True if this Set contained the entity before it was removed.
-
toArray
public <A> A[] toArray(A[] a) - Angegeben von:
toArrayin SchnittstelleCollection<T extends SecurityEntity>- Angegeben von:
toArrayin SchnittstelleSet<T extends SecurityEntity>
-
getByName
Returns an entity with the given name, if it is contained in this SecuritySet.- Parameter:
name- Name of entity.- Gibt zurück:
- entity if argument matched an entity in this Set; null if no match.
-
getById
Returns an entity with the given id, if it is contained in this SecuritySet.- Parameter:
id- ID of entity.- Gibt zurück:
- entity if argument matched an entity in this Set; null if no match.
-