⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 portletpreferences.html.svn-base

📁 portal越来越流行了
💻 SVN-BASE
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0) on Wed Feb 06 17:53:06 CET 2008 --><TITLE>PortletPreferences</TITLE><META NAME="keywords" CONTENT="javax.portlet.PortletPreferences interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="PortletPreferences";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/PortletPreferences.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../javax/portlet/PortletModeException.html" title="class in javax.portlet"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../javax/portlet/PortletRequest.html" title="interface in javax.portlet"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html?javax/portlet/PortletPreferences.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="PortletPreferences.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.portlet</FONT><BR>Interface PortletPreferences</H2><HR><DL><DT><PRE>public interface <B>PortletPreferences</B></DL></PRE><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><P><HR><P><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.util.Map&lt;java.lang.String,java.lang.String[]&gt;</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletPreferences.html#getMap()">getMap</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;java.util.Enumeration&lt;java.lang.String&gt;</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletPreferences.html#getNames()">getNames</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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&nbsp;key,         java.lang.String&nbsp;def)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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&nbsp;key,          java.lang.String[]&nbsp;def)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletPreferences.html#isReadOnly(java.lang.String)">isReadOnly</A></B>(java.lang.String&nbsp;key)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true, if the value of this key is defined as read-only and thus cannot be modified by the user.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletPreferences.html#reset(java.lang.String)">reset</A></B>(java.lang.String&nbsp;key)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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&nbsp;key,         java.lang.String&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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&nbsp;key,          java.lang.String[]&nbsp;values)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletPreferences.html#store()">store</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Commits all changes made to the preferences via the  <code>set</code> methods in the persistent store.</TD></TR></TABLE>&nbsp;<P><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="isReadOnly(java.lang.String)"><!-- --></A><H3>isReadOnly</H3><PRE>boolean <B>isReadOnly</B>(java.lang.String&nbsp;key)</PRE><DL><DD>Returns true, if the value of this key is defined as read-only and thus 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, like the <code>CONFIG</code> mode, it may be allowed changing them. <p> 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. <p> Note that even if this call returns <code>false</code> and the  preference key is modifiable in general it does not mean that it is modifiable in the scope of the current request, e.g. if this request is a render request.<P><DD><DL><DT><B>Returns:</B><DD>false, if the value of this key can be changed, or          if the key is not known<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>key</code> is <code>null</code>.</DL></DD></DL><HR><A NAME="getValue(java.lang.String, java.lang.String)"><!-- --></A><H3>getValue</H3><PRE>java.lang.String <B>getValue</B>(java.lang.String&nbsp;key,                          java.lang.String&nbsp;def)</PRE><DL><DD>Returns the first String value associated with the specified key of this preference. If there is one or more preference values associated with the given key 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -