org.jasig.portal.layout.dlm.providers
Class PersonEvaluatorFactory

java.lang.Object
  extended by org.jasig.portal.layout.dlm.providers.PersonEvaluatorFactory
All Implemented Interfaces:
EvaluatorFactory
Direct Known Subclasses:
GroupMembershipEvaluatorFactory

public class PersonEvaluatorFactory
extends java.lang.Object
implements EvaluatorFactory

Implementation of the Evaluator Factory interface that creates evaluators of string attributes in implementations of IPerson to determine if a user gets a layout fragment.

Since:
uPortal 2.5
Version:
$Revision: 1.7 $ $Date: 2005/05/03 05:55:35 $
Author:
mboyd@sungardsct.com

Field Summary
private static int AND
           
private static int NOT
           
private static int OR
           
static java.lang.String RCS_ID
           
 
Constructor Summary
PersonEvaluatorFactory()
           
 
Method Summary
private  Evaluator createAttributeEvaluator(org.w3c.dom.Node n)
           
private  Evaluator createEvaluator(org.w3c.dom.Node node)
           
private  Evaluator createGroupEvaluator(int type, org.w3c.dom.NodeList nodes)
           
private  Evaluator createParen(org.w3c.dom.Node n)
           
 Evaluator getAttributeEvaluator(java.lang.String name, java.lang.String mode, java.lang.String value)
          returns an Evaluator unique to the type of attribute being evaluated.
 Evaluator getEvaluator(org.w3c.dom.Node audience)
           
private  Evaluator getGroupEvaluator(int type, org.w3c.dom.Node node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RCS_ID

public static final java.lang.String RCS_ID
See Also:
Constant Field Values

OR

private static final int OR
See Also:
Constant Field Values

AND

private static final int AND
See Also:
Constant Field Values

NOT

private static final int NOT
See Also:
Constant Field Values
Constructor Detail

PersonEvaluatorFactory

public PersonEvaluatorFactory()
Method Detail

getEvaluator

public Evaluator getEvaluator(org.w3c.dom.Node audience)
Specified by:
getEvaluator in interface EvaluatorFactory

getGroupEvaluator

private Evaluator getGroupEvaluator(int type,
                                    org.w3c.dom.Node node)

createGroupEvaluator

private Evaluator createGroupEvaluator(int type,
                                       org.w3c.dom.NodeList nodes)

createEvaluator

private Evaluator createEvaluator(org.w3c.dom.Node node)

createParen

private Evaluator createParen(org.w3c.dom.Node n)

createAttributeEvaluator

private Evaluator createAttributeEvaluator(org.w3c.dom.Node n)

getAttributeEvaluator

public Evaluator getAttributeEvaluator(java.lang.String name,
                                       java.lang.String mode,
                                       java.lang.String value)
                                throws java.lang.Exception
returns an Evaluator unique to the type of attribute being evaluated. subclasses can override this method to return the Evaluator that's appropriate to their implementation.

Parameters:
name - the attribute's name.
mode - the attribute's mode. (i.e. 'equals')
value - the attribute's value.
Returns:
an Evaluator for evaluating attributes
Throws:
java.lang.Exception