KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > test > portlet > preferences > spec > CreateASingleInstanceOfValidatorValidator


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Forums JBoss Portlet *
6  * *
7  * Distributable under LGPL license. *
8  * See terms of license at gnu.org. *
9  * *
10  *****************************************/

11 package org.jboss.portal.test.portlet.preferences.spec;
12
13 import javax.portlet.PreferencesValidator;
14 import javax.portlet.PortletPreferences;
15 import javax.portlet.ValidatorException;
16
17 /**
18  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
19  * @version $Revision: 1.1 $
20  */

21 public class CreateASingleInstanceOfValidatorValidator implements PreferencesValidator
22 {
23
24    private static int createdCount = 0;
25
26    public static int getCreatedCount()
27    {
28       return createdCount;
29    }
30
31    public CreateASingleInstanceOfValidatorValidator()
32    {
33       synchronized(CreateASingleInstanceOfValidatorValidator.class)
34       {
35          createdCount++;
36       }
37    }
38
39    public void validate(PortletPreferences preferences) throws ValidatorException
40    {
41    }
42 }
43
Popular Tags