KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > taglib > core > LoopTag


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.cocoon.taglib.core;
17
18 import org.apache.cocoon.taglib.Tag;
19
20 /**
21  * <p>Allows developers to write custom iteration tags by implementing
22  * the LoopTag interface. (This is not to be confused with
23  * org.apache.cocoon.taglib.IterationTag)
24  * LoopTag establishes a mechanism for iteration tags to be recognized
25  * and for type-safe communication with custom subtags.
26  *
27  * <p>In most cases, it will not be necessary to implement this interface
28  * manually, for a base support class (LoopTagSupport) is provided
29  * to facilitate implementation.</p>
30  *
31  * Migration from JSTL1.0
32  * @see javax.servlet.jsp.jstl.core.LoopTag
33  *
34  * @author <a HREF="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
35  * @version CVS $Id: LoopTag.java 30932 2004-07-29 17:35:38Z vgritsenko $
36  */

37 public interface LoopTag extends Tag {
38
39     /**
40      * Retrieves the current item in the iteration. Behaves
41      * idempotently; calling getCurrent() repeatedly should return the same
42      * Object until the iteration is advanced. (Specifically, calling
43      * getCurrent() does <b>not</b> advance the iteration.)
44      *
45      * @return the current item as an object
46      */

47     public Object JavaDoc getCurrent();
48
49     /**
50      * Retrieves a 'status' object to provide information about the
51      * current round of the iteration.
52      *
53      * @return the LoopTagStatus for the current LoopTag
54      */

55     public LoopTagStatus getIteratorStatus();
56 }
57
Popular Tags