Package wt.workflow

Class SortedEnumByPrincipal

java.lang.Object
wt.workflow.SortedEnumByPrincipal
All Implemented Interfaces:
Serializable, Enumeration

public class SortedEnumByPrincipal extends Object implements Enumeration, Serializable
An enumeration that returns objects in sorted order.

Supported API: true
Supported API: true
See Also:
  • Constructor Details

    • SortedEnumByPrincipal

      public SortedEnumByPrincipal(Enumeration source, CollationKeyFactory key_factory)
      Construct a sorted Enumeration containing the elements of another Enumeration. Elements are sorted into ascending order.

      Supported API: true
      Parameters:
      source - source Enumeration
      collation_key_factory - factory to produce collation keys for the elements
      order - sort order (ASCENDING or DECENDING)
    • SortedEnumByPrincipal

      public SortedEnumByPrincipal(Enumeration source, CollationKeyFactory key_factory, int order)
      Construct a sorted Enumeration containing the elements of another Enumeration.

      Supported API: true
      Parameters:
      source - source Enumeration
      collation_key_factory - factory to produce collation keys for the elements
      order - sort order (ASCENDING or DECENDING)
    • SortedEnumByPrincipal

      public SortedEnumByPrincipal(Enumeration source, boolean byFullName, int order)
      Construct a sorted Enumeration containing the WTPrincipals of another Enumeration.

      Supported API: true
      Parameters:
      source - source Enumeration
      byFullName - boolean to collate by FullName instead of Name attribute. If the elements are WTUsers, true will sort by FullName, else by web server id. If the elements are WTGroups, the sort will be by GroupName regardless.
      order - sort order (ASCENDING or DECENDING)
  • Method Details

    • hasMoreElements

      public boolean hasMoreElements()

      Supported API: true
      Specified by:
      hasMoreElements in interface Enumeration
    • nextElement

      public Object nextElement()

      Supported API: true
      Specified by:
      nextElement in interface Enumeration
    • size

      public int size()
      Return the number of elements remaining in the enumeration. Since each element of the underlying enumeration had to be accessed in order to sort them, the total number of elements is known.

      Supported API: true
      Returns:
      number of elements remaining