|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.geant.edugain.attributes.matchers.AttributeMatcher
public class AttributeMatcher
Matcher class for simple and regular expression matching against attributes. Simple match is done by attributeName checking - if attribute exists with the given name - the match succeeds. Regular expression match is done against the attribute values of the given attribute. Only the matching attribute values are to be bound to the RuleContext.
| Field Summary | |
|---|---|
private java.lang.String |
attributeName
|
private AttributeMatchType |
configuration
|
private RegularExpressionHelper |
helper
|
private org.apache.log4j.Logger |
log
|
| Constructor Summary | |
|---|---|
AttributeMatcher()
|
|
| Method Summary | |
|---|---|
void |
init(MatchType configuration)
Initialize this matcher with the parsed configuration. |
boolean |
match(RuleContext c)
Do a match against the attributes in rule context. |
private boolean |
match(RuleContext c,
AttributeSet aSet)
Internal method to support attribute set matching. |
protected boolean |
regexpMatch(RuleContext c,
AttributeValues values)
Match against the regular expression defined as the text value in AttributeMatch node. |
protected boolean |
simpleMatch(RuleContext c,
AttributeValues values)
Simple match - check only the attributeName, and put the attribute in the RuleContext. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private AttributeMatchType configuration
private java.lang.String attributeName
private RegularExpressionHelper helper
private org.apache.log4j.Logger log
| Constructor Detail |
|---|
public AttributeMatcher()
| Method Detail |
|---|
public void init(MatchType configuration)
init in interface Matcherconfiguration - public boolean match(RuleContext c)
match in interface Matcherc -
private boolean match(RuleContext c,
AttributeSet aSet)
c - aSet -
protected boolean simpleMatch(RuleContext c,
AttributeValues values)
c - values -
protected boolean regexpMatch(RuleContext c,
AttributeValues values)
c - values -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||