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übersichtFelder
- 
KonstruktorübersichtKonstruktoren
- 
MethodenübersichtModifizierer 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitVon Schnittstelle geerbte Methoden java.util.CollectionparallelStream, removeIf, stream, toArrayVon Schnittstelle geerbte Methoden java.util.Setequals, hashCode, spliterator
- 
Felddetails- 
nameMapMap for "name" is "security object"
- 
idMapMap for "id" is "security object"
 
- 
- 
Konstruktordetails- 
SecuritySetpublic SecuritySet()Constructs an empty Set
 
- 
- 
Methodendetails- 
getSetReturns a set of security objects in this object.- Gibt zurück:
- A Set Object
 
- 
getNamesReturns a set of Names in this Object.- Gibt zurück:
- The Set of Names in this Object, backed by the actual data.
 
- 
getIdsReturns a set of Id values in this Object.- Gibt zurück:
- The Set of Ids in this Object, backed by the actual data.
 
- 
clearpublic void clear()Removes all Objects from this Set.- Angegeben von:
- clearin Schnittstelle- Collection<T extends SecurityEntity>
- Angegeben von:
- clearin Schnittstelle- Set<T extends SecurityEntity>
 
- 
containsNameSearches 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.
 
- 
containsIdSearches 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.
 
- 
iteratorReturns an Iterator for Objects in this Set.- Angegeben von:
- iteratorin Schnittstelle- Collection<T extends SecurityEntity>
- Angegeben von:
- iteratorin Schnittstelle- Iterable<T extends SecurityEntity>
- Angegeben von:
- iteratorin Schnittstelle- Set<T extends SecurityEntity>
- Gibt zurück:
- An iterator for the Set
 
- 
sizepublic int size()Returns size (cardinality) of this set.- Angegeben von:
- sizein Schnittstelle- Collection<T extends SecurityEntity>
- Angegeben von:
- sizein Schnittstelle- Set<T extends SecurityEntity>
- Gibt zurück:
- The cardinality of this Set.
 
- 
toStringlist of role names in this set
- 
add- Angegeben von:
- addin Schnittstelle- Collection<T extends SecurityEntity>
- Angegeben von:
- addin Schnittstelle- Set<T extends SecurityEntity>
- Siehe auch:
 
- 
addAdds 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 Schnittstelle- Collection<T extends SecurityEntity>
- Angegeben von:
- addAllin Schnittstelle- Set<T extends SecurityEntity>
 
- 
isEmptypublic boolean isEmpty()- Angegeben von:
- isEmptyin Schnittstelle- Collection<T extends SecurityEntity>
- Angegeben von:
- isEmptyin Schnittstelle- Set<T extends SecurityEntity>
 
- 
containsAll- Angegeben von:
- containsAllin Schnittstelle- Collection<T extends SecurityEntity>
- Angegeben von:
- containsAllin Schnittstelle- Set<T extends SecurityEntity>
 
- 
removeAll- Angegeben von:
- removeAllin Schnittstelle- Collection<T extends SecurityEntity>
- Angegeben von:
- removeAllin Schnittstelle- Set<T extends SecurityEntity>
 
- 
retainAll- Angegeben von:
- retainAllin Schnittstelle- Collection<T extends SecurityEntity>
- Angegeben von:
- retainAllin Schnittstelle- Set<T extends SecurityEntity>
 
- 
toArray- Angegeben von:
- toArrayin Schnittstelle- Collection<T extends SecurityEntity>
- Angegeben von:
- toArrayin Schnittstelle- Set<T extends SecurityEntity>
 
- 
containsChecks whether this SecuritySet contains an entity.- Angegeben von:
- containsin Schnittstelle- Collection<T extends SecurityEntity>
- Angegeben von:
- containsin Schnittstelle- Set<T extends SecurityEntity>
- Parameter:
- o- An entity.
- Gibt zurück:
- True if this Set contains the entity, false otherwise.
 
- 
removeRemoves an entity from this SecuritySet.- Angegeben von:
- removein Schnittstelle- Collection<T extends SecurityEntity>
- Angegeben von:
- removein Schnittstelle- Set<T extends SecurityEntity>
- Parameter:
- o- An entity.
- Gibt zurück:
- True if this Set contained the entity before it was removed.
 
- 
toArraypublic <A> A[] toArray(A[] a) - Angegeben von:
- toArrayin Schnittstelle- Collection<T extends SecurityEntity>
- Angegeben von:
- toArrayin Schnittstelle- Set<T extends SecurityEntity>
 
- 
getByNameReturns 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.
 
- 
getByIdReturns 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.
 
 
-