📄 portletpreferences.html.svn-base
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Mon Sep 08 18:33:40 CEST 2003 --><TITLE>Portlet API (V1.0) : Interface PortletPreferences</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>Portlet API (V1.0) </EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../javax/portlet/PortletContext.html"><B>PREV CLASS</B></A> <A HREF="../../javax/portlet/PortletRequest.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="PortletPreferences.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.portlet</FONT><BR>Interface PortletPreferences</H2><HR><DL><DT>public interface <B>PortletPreferences</B></DL><P>The <CODE>PortletPreferences</CODE> interface allows the portlet to store configuration data. It is not the purpose of this interface to replace general purpose databases. <p> There are two different types of preferences: <ul> <li>modifiable preferences - these preferences can be changed by the portlet in any standard portlet mode (<code>EDIT, HELP, VIEW</code>). Per default every preference is modifiable. <li>read-only preferences - these preferences cannot be changed by the portlet in any standard portlet mode, but may be changed by administrative modes. Preferences are read-only, if the are defined in the deployment descriptor with <code>read-only</code> set to <code>true</code>, or if the portlet container restricts write access. </ul> <p> Changes are persisted when the <code>store</code> method is called. The <code>store</code> method can only be invoked within the scope of a <code>processAction</code> call. Changes that are not persisted are discarded when the <code>processAction</code> or <code>render</code> method ends.<P><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Map</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletPreferences.html#getMap()">getMap</A></B>()</CODE><BR> Returns a <code>Map</code> of the preferences.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Enumeration</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletPreferences.html#getNames()">getNames</A></B>()</CODE><BR> Returns all of the keys that have an associated value, or an empty <code>Enumeration</code> if no keys are available.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletPreferences.html#getValue(java.lang.String, java.lang.String)">getValue</A></B>(java.lang.String key, java.lang.String def)</CODE><BR> Returns the first String value associated with the specified key of this preference.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletPreferences.html#getValues(java.lang.String, java.lang.String[])">getValues</A></B>(java.lang.String key, java.lang.String[] def)</CODE><BR> Returns the String array value associated with the specified key in this preference.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletPreferences.html#isReadOnly(java.lang.String)">isReadOnly</A></B>(java.lang.String key)</CODE><BR> Returns true, if the value of this key cannot be modified by the user.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletPreferences.html#reset(java.lang.String)">reset</A></B>(java.lang.String key)</CODE><BR> Resets or removes the value associated with the specified key.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletPreferences.html#setValue(java.lang.String, java.lang.String)">setValue</A></B>(java.lang.String key, java.lang.String value)</CODE><BR> Associates the specified String value with the specified key in this preference.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletPreferences.html#setValues(java.lang.String, java.lang.String[])">setValues</A></B>(java.lang.String key, java.lang.String[] values)</CODE><BR> Associates the specified String array value with the specified key in this preference.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletPreferences.html#store()">store</A></B>()</CODE><BR> Commits all changes made to the preferences via the <code>set</code> methods in the persistent store.</TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="isReadOnly(java.lang.String)"><!-- --></A><H3>isReadOnly</H3><PRE>public boolean <B>isReadOnly</B>(java.lang.String key)</PRE><DL><DD>Returns true, if the value of this key cannot be modified by the user. <p> Modifiable preferences can be changed by the portlet in any standard portlet mode (<code>EDIT, HELP, VIEW</code>). Per default every preference is modifiable. <p> Read-only preferences cannot be changed by the portlet in any standard portlet mode, but inside of custom modes it may be allowed changing them. Preferences are read-only, if they are defined in the deployment descriptor with <code>read-only</code> set to <code>true</code>, or if the portlet container restricts write access.<DD><DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -