01: /**
02: * Copyright 2003 IBM Corporation and Sun Microsystems, Inc.
03: * All rights reserved.
04: * Use is subject to license terms.
05: */package javax.portlet;
06:
07: /**
08: * The <CODE>PreferencesValidator</CODE> allows to validate the set of
09: * preferences of the associated portlet just before they are
10: * stored in the persistent store.
11: * <p/>
12: * The portlet container invokes the <code>validate</code> method as
13: * part of the invocation of the <code>store</code> method of the
14: * <code>PortletPreferences</code>.
15: */
16: public interface PreferencesValidator {
17:
18: /**
19: * If the preferences values are successfully validated the call to this method
20: * must finish gracefully. Otherwise it must throw a <code>ValidatorException</code>.
21: *
22: * @param preferences preferences to validate
23: * @throws ValidatorException if the given preferences contains invalid
24: * settings
25: */
26:
27: public void validate(PortletPreferences preferences)
28: throws ValidatorException;
29: }
|