01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/assignment/tags/taggable_sakai_2-4-1/api/TagList.java $
03: * $Id: TagList.java 20874 2007-02-01 19:03:08Z jmpease@syr.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2006, 2007 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.assignment.taggable.api;
21:
22: import java.util.List;
23:
24: /**
25: * A specialized list that can provide column information in the form of a
26: * {@link TagColumn} for each field that the {@link Tag} objects in the list can
27: * provide.
28: *
29: * @author The Sakai Foundation.
30: * @see Tag
31: */
32: public interface TagList extends List<Tag> {
33:
34: /**
35: * Method to get a particular {@link TagColumn} object from the list of
36: * columns identified by the given name.
37: *
38: * @param name
39: * The name that identifies that column to retrieve.
40: * @return The {@link TagColumn} object.
41: * @see #getColumns()
42: */
43: public TagColumn getColumn(String name);
44:
45: /**
46: * Method to get a list of {@link TagColumn} that the {@link Tag} objects in
47: * this list can provide data for.
48: *
49: * @return A list of {@link TagColumn} that the {@link Tag} objects in this
50: * list can provide data for.
51: * @see Tag#getField(String)
52: * @see Tag#getFields()
53: */
54: public List<TagColumn> getColumns();
55:
56: /**
57: * Method to sort the {@link Tag} objects in this list by the fields
58: * represented by the given {@link TagColumn}.
59: *
60: * @param column
61: * The tag column to sort by. This may be null, indicating a
62: * default sort column.
63: * @param ascending
64: * True if the objects should be assorted in ascending order,
65: * false otherwise.
66: * @see Tag#getField(String)
67: * @see Tag#getFields()
68: */
69: public void sort(TagColumn column, boolean ascending);
70: }
|