Source code: com/clra/web/IMemberNameList.java
1 /*
2 * Copyright (c) Carnegie Lake Rowing Association 2002. All rights reserved.
3 * Distributed under the GPL license. See doc/COPYING.
4 * $RCSfile: IMemberNameList.java,v $
5 * $Date: 2003/02/26 03:38:46 $
6 * $Revision: 1.3 $
7 */
8
9 package com.clra.web;
10
11 /**
12 * Declares JSP attributes and bean properties for alphabetized lists of
13 * members. Views that implement this interface may be controlled via components
14 * such as NameSelector. This interface is an extension of INameList.<p>
15 *
16 * For Java Server Pages, this interface declares one attribute (in addition
17 * to the attributes declared by INameList) that should
18 * be set and accessed within the scope of a request or session:<ul>
19 * <li><strong>membernameformat</strong>: the format with which member names
20 * are presented and sorted. [MemberNameFormat.FIRSTLAST]</li>
21 * </ul>
22 *
23 * For beans, this interface declares one property (in addition to the
24 * properties declared by INameList):<ul>
25 * <li><strong>memberNameFormat</strong>: read/write MemberNameFormat</li>
26 * </ul>
27 *
28 * @version $Revision: 1.3 $ $Date: 2003/02/26 03:38:46 $
29 * @author <a href="mailto:rphall@pluto.njcc.com">Rick Hall</a>
30 */
31 public interface IMemberNameList extends INameList {
32
33 /**
34 * Names an attribute within the scope of an HTTP request or session
35 * that determines how member names are presented and sorted. The
36 * value of this attribute should be an instance of MemberNameFormat.
37 * A null value indicates the default, <tt>MemberNameFormat.FIRSTLAST</tt>.
38 */
39 public final static String AN_MEMBERNAMEFORMAT = "membernameformat";
40
41 /**
42 * Returns a String that indicates whether an iterator will be sorted
43 * by first or last name.
44 * @return <tt>FIRST</tt> or <tt>LAST</tt>.
45 */
46 public MemberNameFormat getMemberNameFormat();
47
48 /**
49 * Sets whether an iterator will be sorted by first or last name. The
50 * argument can not be null. The argument is trimmed of any leading or
51 * trailing whitespace, then compared in a case-insensitive manner to
52 * <tt>FIRST</tt> and <tt>LAST</tt>. If the normalized value matches
53 * either, then that value is set. Otherwise an IllegalArgumentException
54 * is thrown.
55 */
56 public void setMemberNameFormat( MemberNameFormat memberNameFormat );
57
58 } // IMemberNameList
59
60 /*
61 * $Log: IMemberNameList.java,v $
62 * Revision 1.3 2003/02/26 03:38:46 rphall
63 * Added copyright and GPL license
64 *
65 * Revision 1.2 2002/02/18 18:06:03 rphall
66 * Ran dos2unix to remove ^M (carriage return) from end of lines
67 *
68 * Revision 1.1.1.1 2002/01/03 21:57:28 rphall
69 * Initial load, 5th try, Jan-03-2002 4:57 PM
70 *
71 * Revision 1.1 2002/01/01 18:54:07 rphall
72 * Selects first or last name
73 *
74 */
75