01: /* Copyright 2004 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal.groups.pags.testers;
07:
08: import org.jasig.portal.groups.pags.testers.StringTester;
09:
10: /**
11: * Tests whether or not the user has <em>some</em>
12: * value for a particular attribute.
13: * This tester ignores the test-value field.
14: * If the attribute has any value, then it returns true.
15: * @author Nick Blair, nblair@wisc.edu
16: * @version $Revision: 34851 $
17: */
18: public class ValueExistsTester extends StringTester {
19:
20: public ValueExistsTester(String attribute, String test) {
21: super (attribute, test);
22: }
23:
24: public boolean test(String att) {
25: boolean result = false;
26: if (att != null && !att.equals("")) {
27: result = true;
28: }
29: return result;
30: }
31: }
|