01: package com.teamkonzept.webman.mainint;
02:
03: import com.teamkonzept.field.db.*;
04: import com.teamkonzept.lib.*;
05:
06: public class TKContentIterator implements TKListIterator {
07:
08: private TKListIterator oldIterator;
09: private TKTemplate template;
10: private TKContentDBData data;
11:
12: private TKContentAttributeIterator attributes;
13:
14: public TKContentIterator(TKTemplate template, TKContentDBData data,
15: TKListIterator oldIterator) {
16:
17: this .oldIterator = oldIterator;
18: this .template = template;
19:
20: this .data = data;
21: this .attributes = new TKContentAttributeIterator(
22: "ATTRIBUTES_PER_CONTENT", data.content_attribute);
23: }
24:
25: public boolean apply(TKTemplate template, int i, String currListName) {
26:
27: if ((attributes != null)
28: && attributes.apply(template, currListName, null))
29: return true;
30: else if (oldIterator != null)
31: return oldIterator.apply(template, i, currListName);
32: else
33: return false;
34: }
35: }
|