KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > portlet > PreferencesValidator


1 /**
2   * Copyright 2003 IBM Corporation and Sun Microsystems, Inc.
3   * All rights reserved.
4   * Use is subject to license terms.
5   */

6
7 package javax.portlet;
8
9
10 /**
11  * The <CODE>PreferencesValidator</CODE> allows to validate the set of
12  * preferences of the associated portlet just before they are
13  * stored in the persistent store.
14  * <p>
15  * The portlet container invokes the <code>validate</code> method as
16  * part of the invocation of the <code>store</code> method of the
17  * <code>PortletPreferences</code>.
18  */

19 public interface PreferencesValidator
20 {
21
22   /**
23    * If the preferences values are successfully validated the call to this method
24    * must finish gracefully. Otherwise it must throw a <code>ValidatorException</code>.
25    *
26    * @param preferences preferences to validate
27    *
28    * @throws ValidatorException if the given preferences contains invalid
29    * settings
30    *
31    */

32
33   public void validate(PortletPreferences preferences)
34     throws ValidatorException;
35 }
36
Popular Tags