CLRA 0.1.2

com.clra.web
Interface INameList

All Known Subinterfaces:
IMemberNameList
All Known Implementing Classes:
MemberSet

public interface INameList

Declares JSP attributes and bean properties for alphabetized lists of stuff. Views that implement this interface may be controlled via components such as NameSelector.

For Java Server Pages, this interface declares three attributes that should be set and accessed within the scope of a request or session:

The Integer value specified by group refers to predefined groups:

  1. ABC - names less than 'D'
  2. DEF - names between 'D' and 'F'
  3. GHI - names between 'G' and 'I'
  4. JKL - names between 'J' and 'L'
  5. MNO - names between 'M' and 'O'
  6. PQRS - names between 'P' and 'S'
  7. TUV - names between 'T' and 'V'
  8. WXYZ - names greater than or equal to 'W'
Note that the first group, ABC, may contain names like "3Com", whereas the last group, WXYZ, may contain names like "Ėtvos". Also note that the group index is indexed from '1', not '0'.

For beans, this interface declares five properties:

Version:
$Revision: 1.2 $ $Date: 2002/02/18 18:06:05 $
Author:
Rick Hall

Field Summary
static String AN_COMPARATOR
          Names an attribute within the scope of an HTTP request or session that holds a bean which implements java.util.Comparator.
static String AN_GROUP
          Names an attribute within the scope of an HTTP request or session whose char[] value indicates the letters that with which a item name should begin within a restricted list.
static String AN_ISRESTRICTED
          Names an attribute within the scope of an HTTP request or session whose Boolean value indicates whether a list should be restricted to events that are scheduled to start within a particular month and year.
 
Method Summary
 ISerializableComparator getComparator()
          Returns the sort-order that an iterator will use.
 Integer getGroup()
          Returns the group of letters to which an iteration is restricted (if it is restricted).
 Iterator getIterator()
          Returns an iterator over a collection of INamed beans.
 Boolean getRestricted()
          Returns a flag that indicates whether an iterator will be restricted to events that are scheduled to start within a particular month and year.
 void setComparator(ISerializableComparator comparator)
          Sets the sort-order that an iterator will use.
 void setGroup(Integer group)
          Sets the group to which an iteration is restricted (if it is restricted).
 void setRestricted(Boolean restricted)
          Sets whether an iterator will be restricted to events that start within a particular month and year.
 

Field Detail

AN_ISRESTRICTED

public static final String AN_ISRESTRICTED
Names an attribute within the scope of an HTTP request or session whose Boolean value indicates whether a list should be restricted to events that are scheduled to start within a particular month and year. A blank, null or missing value should default to non-restricted.

AN_GROUP

public static final String AN_GROUP
Names an attribute within the scope of an HTTP request or session whose char[] value indicates the letters that with which a item name should begin within a restricted list.

AN_COMPARATOR

public static final String AN_COMPARATOR
Names an attribute within the scope of an HTTP request or session that holds a bean which implements java.util.Comparator. The comparator must be able to operate on instances of INamed. Current implementations ignore this attribute, but it is reserved for future enhancements.
Method Detail

getIterator

public Iterator getIterator()
                     throws WebException
Returns an iterator over a collection of INamed beans. The behavior of the iterator is specified by setting restricted, month, year, and comparator properties before the iterator is requested.

getRestricted

public Boolean getRestricted()
Returns a flag that indicates whether an iterator will be restricted to events that are scheduled to start within a particular month and year. A null value indicates behavior that is implementation-specific.

setRestricted

public void setRestricted(Boolean restricted)
Sets whether an iterator will be restricted to events that start within a particular month and year. A null value specifies implementation-specific behavior.

getGroup

public Integer getGroup()
Returns the group of letters to which an iteration is restricted (if it is restricted). If the return value is non-null, it must be in the range 1 - 8, inclusive.

setGroup

public void setGroup(Integer group)
Sets the group to which an iteration is restricted (if it is restricted). If the input value is non-null, it must be in the range 1 - 8, inclusive.

getComparator

public ISerializableComparator getComparator()
Returns the sort-order that an iterator will use. Valid comparators must be able to compare instances of INamed. A null comparator indicates the natural sort order of the events will be used.

setComparator

public void setComparator(ISerializableComparator comparator)
Sets the sort-order that an iterator will use. Valid comparators must be able to compare instances of INamed. A null comparator indicates the natural sort order of the events will be used.

CLRA 0.1.2