KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > openedit > store > convert > CompositeConverter


1 /*
2  * Created on Aug 16, 2005
3  */

4 package com.openedit.store.convert;
5
6 import java.util.Iterator JavaDoc;
7 import java.util.List JavaDoc;
8
9 import com.openedit.store.CatalogConverter;
10 import com.openedit.store.Store;
11 //TODO: Make it implement an Interface
12
public class CompositeConverter extends CatalogConverter
13 {
14     List JavaDoc fiedlCatalogImportConverters;
15     
16     public boolean convert(Store inStore, List JavaDoc inLog) throws Exception JavaDoc
17     {
18         boolean converted = false;
19         
20         for ( Iterator JavaDoc iter = getCatalogConverters().iterator(); iter.hasNext(); )
21         {
22             CatalogConverter converter = (CatalogConverter) iter.next();
23             if ( converter.convert(inStore, inLog) )
24             {
25                 converted = true;
26             }
27         }
28         return converted;
29     }
30     public List JavaDoc getCatalogConverters()
31     {
32         return fiedlCatalogImportConverters;
33     }
34
35     public void setCatalogConverters(List JavaDoc inFiedlCatalogImportConverters)
36     {
37         fiedlCatalogImportConverters = inFiedlCatalogImportConverters;
38     }
39 }
40
Popular Tags