net.geant.edugain.attributes.matchers
Class AbstractProviderMatcher

java.lang.Object
  extended by net.geant.edugain.attributes.matchers.AbstractProviderMatcher
All Implemented Interfaces:
Matcher
Direct Known Subclasses:
LocalProviderMatcher, RemoteProviderMatcher

public abstract class AbstractProviderMatcher
extends java.lang.Object
implements Matcher

Abstract superclass for RemoteProviderMatcher and LocalProviderMatcher.

Author:
Adam Lantos

Field Summary
protected  MatchType configuration
          Stores the configuration.
private  org.apache.log4j.Logger log
           
protected  java.lang.String matcherID
          The id of the regular expression matching.
protected  RegularExpressionHelper regexpHelper
          Helper object for regular expression matching.
 
Constructor Summary
AbstractProviderMatcher()
           
 
Method Summary
protected abstract  java.lang.String getProviderId(RuleContext c)
          Abstract method to return the provider identifier.
 void init(MatchType configuration)
          Initialize the Matcher with parsed configuration.
 boolean match(RuleContext c)
          Do the actual matching.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configuration

protected MatchType configuration
Stores the configuration.


matcherID

protected java.lang.String matcherID
The id of the regular expression matching.


regexpHelper

protected RegularExpressionHelper regexpHelper
Helper object for regular expression matching.


log

private org.apache.log4j.Logger log
Constructor Detail

AbstractProviderMatcher

public AbstractProviderMatcher()
Method Detail

init

public void init(MatchType configuration)
Initialize the Matcher with parsed configuration.

Specified by:
init in interface Matcher
Parameters:
configuration -

match

public boolean match(RuleContext c)
Do the actual matching. If the id attribute is set, put the matcher groups in the RuleContext.

Specified by:
match in interface Matcher
Parameters:
c -
Returns:

getProviderId

protected abstract java.lang.String getProviderId(RuleContext c)
Abstract method to return the provider identifier.

Parameters:
c -
Returns: