01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.cocoon.taglib.core;
18:
19: import org.apache.cocoon.taglib.Tag;
20:
21: /**
22: * <p>Allows developers to write custom iteration tags by implementing
23: * the LoopTag interface. (This is not to be confused with
24: * org.apache.cocoon.taglib.IterationTag)
25: * LoopTag establishes a mechanism for iteration tags to be recognized
26: * and for type-safe communication with custom subtags.
27: *
28: * <p>In most cases, it will not be necessary to implement this interface
29: * manually, for a base support class (LoopTagSupport) is provided
30: * to facilitate implementation.</p>
31: *
32: * Migration from JSTL1.0
33: * @see javax.servlet.jsp.jstl.core.LoopTag
34: *
35: * @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
36: * @version CVS $Id: LoopTag.java 433543 2006-08-22 06:22:54Z crossley $
37: */
38: public interface LoopTag extends Tag {
39:
40: /**
41: * Retrieves the current item in the iteration. Behaves
42: * idempotently; calling getCurrent() repeatedly should return the same
43: * Object until the iteration is advanced. (Specifically, calling
44: * getCurrent() does <b>not</b> advance the iteration.)
45: *
46: * @return the current item as an object
47: */
48: public Object getCurrent();
49:
50: /**
51: * Retrieves a 'status' object to provide information about the
52: * current round of the iteration.
53: *
54: * @return the LoopTagStatus for the current LoopTag
55: */
56: public LoopTagStatus getIteratorStatus();
57: }
|