|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nbi.xmlsec.xacml.profile.rbac.RBACTarget
This class RBACTarget administers target sets in the RBAC context. It stores any kind of object in the subject, resource or action set and provides methods to handle these sets. Furthermore a Target representation can be generated.
Field Summary | |
private HashSet |
actions
Set of action elements of this target. |
private TargetMatchBuilderFactory |
builderFactory
Factory to generate TargetMatchBuilders for the target match elements. |
private static Logger |
logger
|
private TargetMatchParserFactory |
parserFactory
Factory to generate TargetMatches for the target match elements. |
private HashSet |
resources
Set of resource elements of this target. |
private HashSet |
subjects
Set of subject elements of this target. |
Constructor Summary | |
protected |
RBACTarget()
|
protected |
RBACTarget(TargetMatchBuilderFactory builderFactory,
TargetMatchParserFactory parserFactory)
Creates an instance. |
Method Summary | |
protected Iterator |
actionIterator()
Returns an iterator over the action elements. |
protected boolean |
add(Object obj,
int setId)
Adds any object to the target's set of subjects, actions or resources. |
boolean |
add(RBACTarget target)
Adds any subject, resource and action to the target's set of subjects, resources and actions. |
protected boolean |
add(Set objSet,
int setId)
Adds any set of objects to the target's set of subjects, actions or resources. |
boolean |
addAction(Object obj)
Adds any object to the target's set of actions. |
boolean |
addAction(Set objSet)
Adds any object set to the target's set of actions. |
boolean |
addResource(Object obj)
Adds any object to the target's set of resources. |
boolean |
addResource(Set objSet)
Adds any object set to the target's set of resources. |
boolean |
addSubject(Object obj)
Adds any object to the target's set of subject. |
boolean |
addSubject(Set objSet)
Adds any object set to the target's set of subjects. |
void |
clearActions()
Removes all elements from the subjects. |
void |
clearAll()
Removes all elements from all sets. |
void |
clearResources()
Removes all elements from the subjects. |
void |
clearSubjects()
Removes all elements from the subjects. |
boolean |
equals(Object obj)
Compares the specified object with this target. |
boolean |
equalsActions(Object obj)
Compares the specified object with the action set of this target. |
boolean |
equalsResources(Object obj)
Compares the specified object with the resource set of this target. |
boolean |
equalsSubjects(Object obj)
Compares the specified object with the subject set of this target. |
HashSet |
getActions()
Gets the actions of this target. |
HashSet |
getResources()
Gets the resources of this target. |
HashSet |
getSubjects()
Gets the subjects of this target. |
protected Iterator |
iterator(int setId)
Returns an iterator over the elements of the given set. |
void |
parse(Target target)
Parses an RBACTarget from its Target representation. |
protected boolean |
remove(Object obj,
int setId)
Removes any object from the target's set of subjects, actions or resources. |
boolean |
remove(RBACTarget target)
Removes any subject, resource and action to the target's set of subjects, resources and actions. |
protected boolean |
remove(Set objSet,
int setId)
Removes any object set from the target's set of subjects, actions or resources. |
boolean |
removeAction(Object obj)
Removes any object from the target's set of subjects. |
boolean |
removeAction(Set objSet)
Removes any object set from the target's set of actions. |
boolean |
removeResource(Object obj)
Removes any object from the target's set of subjects. |
boolean |
removeResource(Set objSet)
Removes any object set from the target's set of resources. |
boolean |
removeSubject(Object obj)
Removes any object from the target's set of subjects. |
boolean |
removeSubject(Set objSet)
Adds any object set to the target's set of subjects. |
protected Iterator |
resourceIterator()
Returns an iterator over the resource elements. |
protected Iterator |
subjectIterator()
Returns an iterator over the subject elements. |
protected StringBuffer |
targetSetToStringBuffer(int setId)
|
String |
toString()
|
Target |
toTarget()
Returns the Target representation of the RBACTarget. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final Logger logger
private HashSet subjects
private HashSet resources
private HashSet actions
private TargetMatchBuilderFactory builderFactory
private TargetMatchParserFactory parserFactory
Constructor Detail |
protected RBACTarget()
protected RBACTarget(TargetMatchBuilderFactory builderFactory, TargetMatchParserFactory parserFactory)
builderFactory
- Factory to generate TargetMatchBuilders for the target match
elementsparserFactory
- Factory to generate TargetMatchParsers for the target match
elementsMethod Detail |
protected boolean add(Object obj, int setId)
obj
- The object to add.setId
- The id of the set to add the object to (
SUBJECT
,
RESOURCE
or
ACTION
).
true
if the object has been added succesfully,
false
otherwise.protected boolean add(Set objSet, int setId)
objSet
- The object to add.setId
- The id of the set to add the object to (
SUBJECT
,
RESOURCE
or
ACTION
).
true
if the object set has been added succesfully,
false
otherwise.public boolean add(RBACTarget target)
target
- The target to add.
true
if any of the target objects has been added
succesfully, false
otherwise.public boolean remove(RBACTarget target)
target
- The target to remove.
true
if any of the target objects has been removed
succesfully, false
otherwise.public boolean addSubject(Object obj)
obj
- The object to add.
true
if the object has been added succesfully,
false
otherwise.public boolean addResource(Object obj)
obj
- The object to add.
true
if the object has been added succesfully,
false
otherwise.public boolean addAction(Object obj)
obj
- The object to add.
true
if the object has been added succesfully,
false
otherwise.public boolean addSubject(Set objSet)
objSet
- The object set to add.
true
if the object set has been added succesfully,
false
otherwise.public boolean addResource(Set objSet)
objSet
- The object set to add.
true
if the object set has been added succesfully,
false
otherwise.public boolean addAction(Set objSet)
objSet
- The object set to add.
true
if the object set has been added succesfully,
false
otherwise.public boolean removeSubject(Object obj)
obj
- The object to remove.
true
if the object has been removed succesfully,
false
otherwise.public boolean removeResource(Object obj)
obj
- The object to remove.
true
if the object has been removed succesfully,
false
otherwise.public boolean removeAction(Object obj)
obj
- The object to remove.
true
if the object has been removed succesfully,
false
otherwise.public boolean removeSubject(Set objSet)
objSet
- The object set to remove.
true
if the object set has been removed
succesfully, false
otherwise.public boolean removeResource(Set objSet)
objSet
- The object set to remove.
true
if the object set has been removed
succesfully, false
otherwise.public boolean removeAction(Set objSet)
objSet
- The object set to remove.
true
if the object set has been removed
succesfully, false
otherwise.protected boolean remove(Object obj, int setId)
obj
- The object to remove.setId
- The id of the set to remove the object from(
SUBJECT
,
RESOURCE
or
ACTION
).
true
if the object has been removed succesfully,
false
otherwise.protected boolean remove(Set objSet, int setId)
objSet
- The set of objects to remove.setId
- The id of the set to remove the object from(
SUBJECT
,
RESOURCE
or
ACTION
).
true
if the object has been removed succesfully,
false
otherwise.public void clearSubjects()
public void clearResources()
public void clearActions()
public void clearAll()
protected Iterator iterator(int setId)
setId
- The id of the set to return the iterator from(
SUBJECT
,
RESOURCE
or
ACTION
).
null
.protected Iterator subjectIterator()
null
.protected Iterator resourceIterator()
null
.protected Iterator actionIterator()
null
.public Target toTarget()
Target
representation of the RBACTarget.
Target
representation.public void parse(Target target) throws ParsingException
Target
representation.
target
- The target to parse.
ParsingException
public HashSet getActions()
public HashSet getResources()
public HashSet getSubjects()
public boolean equalsSubjects(Object obj)
obj
- Object to be compared for equality with the subject set.
true
if the specified Object is equal to the
subject set.public boolean equalsResources(Object obj)
obj
- Object to be compared for equality with the resource set.
true
if the specified Object is equal to the
resource set.public boolean equalsActions(Object obj)
obj
- Object to be compared for equality with the action set.
true
if the specified Object is equal to the
action set.public boolean equals(Object obj)
obj
- Object to be compared for equality with this target.
true
if the specified Object is equal to this
target.protected StringBuffer targetSetToStringBuffer(int setId)
public String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |