KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > workflow > loader > ValidationHelper


1 /*
2  * Copyright (c) 2002-2003 by OpenSymphony
3  * All rights reserved.
4  */

5 package com.opensymphony.workflow.loader;
6
7 import com.opensymphony.workflow.InvalidWorkflowDescriptorException;
8 import com.opensymphony.workflow.util.Validatable;
9
10 import java.util.Collection JavaDoc;
11 import java.util.Iterator JavaDoc;
12
13
14 /**
15  * DOCUMENT ME!
16  *
17  * @author $author$
18  * @version $Revision: 1.2 $
19  */

20 public class ValidationHelper {
21     //~ Methods ////////////////////////////////////////////////////////////////
22

23     public static void validate(Collection JavaDoc c) throws InvalidWorkflowDescriptorException {
24         Iterator JavaDoc iter = c.iterator();
25
26         while (iter.hasNext()) {
27             Object JavaDoc o = iter.next();
28
29             if (o instanceof Validatable) {
30                 ((Validatable) o).validate();
31             }
32         }
33     }
34 }
35
Popular Tags