01: /**
02: * $Id: PortletProvisionPreferences.java,v 1.3 2005/06/03 19:31:59 mjain Exp $
03: * Copyright 2005 Sun Microsystems, Inc. All
04: * rights reserved. Use of this product is subject
05: * to license terms. Federal Acquisitions:
06: * Commercial Software -- Government Users
07: * Subject to Standard License Terms and
08: * Conditions.
09: *
10: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
11: * are trademarks or registered trademarks of Sun Microsystems,
12: * Inc. in the United States and other countries.
13: */package com.sun.portal.portlet.service.provision;
14:
15: import java.util.Set;
16: import java.util.List;
17:
18: /**
19: * PortletProvisionPreferences is an interface that can be used
20: * by the developer to set and get default portlet preferences
21: * for a portlet instance. It shows the same properties that
22: * can be set through amconsole or taskadmin on a jsr168 channel.
23: * @author mjain
24: */
25: public interface PortletProvisionPreferences {
26:
27: /**
28: * Returns names of the properties
29: * @throws com.sun.portal.portlet.service.provision.PortletProvisionPreferencesException
30: * @return
31: */
32: Set getNames() throws PortletProvisionPreferencesException;
33:
34: /**
35: * Returns the portlet preference value as a string for a given
36: * preference key.
37: * @param key
38: * @throws com.sun.portal.portlet.service.provision.PortletProvisionPreferencesException
39: * @return
40: */
41: String getValue(String key)
42: throws PortletProvisionPreferencesException;
43:
44: /**
45: * gets the preference values list for a given preference key.
46: * @param key
47: * @throws com.sun.portal.portlet.service.provision.PortletProvisionPreferencesException
48: * @return
49: */
50: List getValues(String key)
51: throws PortletProvisionPreferencesException;
52:
53: /**
54: * sets the portlet preference value as a string string for a
55: * given portlet key.
56: * @param key
57: * @param value
58: * @throws com.sun.portal.portlet.service.provision.PortletProvisionPreferencesException
59: */
60: void setValue(String key, String value)
61: throws PortletProvisionPreferencesException;
62:
63: /**
64: * sets the portlet preference values for a given preference key.
65: * @param key
66: * @param values
67: * @throws com.sun.portal.portlet.service.provision.PortletProvisionPreferencesException
68: */
69: void setValues(String key, String[] values)
70: throws PortletProvisionPreferencesException;
71:
72: }
|