KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > teamkonzept > webman > mainint > TKContentIterator


1 package com.teamkonzept.webman.mainint;
2
3 import com.teamkonzept.field.db.*;
4 import com.teamkonzept.lib.*;
5
6 public class TKContentIterator implements TKListIterator {
7
8     private TKListIterator oldIterator;
9     private TKTemplate template;
10     private TKContentDBData data;
11     
12     private TKContentAttributeIterator attributes;
13
14     public TKContentIterator (
15         TKTemplate template, TKContentDBData data, TKListIterator oldIterator) {
16
17         this.oldIterator = oldIterator;
18         this.template = template;
19
20         this.data = data;
21         this.attributes = new TKContentAttributeIterator ("ATTRIBUTES_PER_CONTENT",data.content_attribute);
22     }
23
24     public boolean apply( TKTemplate template, int i, String JavaDoc currListName ) {
25
26         if ((attributes != null) && attributes.apply (template,currListName,null)) return true;
27         else if (oldIterator != null) return oldIterator.apply (template,i,currListName);
28         else return false;
29     }
30 }
Popular Tags