Author: mmcallis
Date: 2008-03-31 00:41:23 -0400 (Mon, 31 Mar 2008)
New Revision: 10423
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
Log:
6.2.2. The portlet-instances.xml Descriptor
- revising content
- adding content from previous sections
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
===================================================================
---
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2008-03-31
04:10:24 UTC (rev 10422)
+++
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2008-03-31
04:41:23 UTC (rev 10423)
@@ -376,7 +376,7 @@
</screen>
</para>
<para>
- The <computeroutput><portlet-ref></computeroutput> element
defines the portlet that an instance will represent. The
<computeroutput><portlet-ref></computeroutput> value must match
the <computeroutput><portlet-name></computeroutput> given in the
<filename>WEB-INF/portlet.xml</filename> file.
+ The <computeroutput><portlet-ref></computeroutput> element
defines the portlet that an instance represents. The
<computeroutput><portlet-ref></computeroutput> value must match
the <computeroutput><portlet-name></computeroutput> given in the
<filename>WEB-INF/portlet.xml</filename> file.
</para>
<para>
<screen><![CDATA[
@@ -384,7 +384,7 @@
</screen>
</para>
<para>
- The <computeroutput><preferences></computeroutput> element
configures the instance with a set of preferences.
+ The <computeroutput><preferences></computeroutput> element
configures an instance with a set of preferences.
</para>
</listitem>
</varlistentry>
@@ -1180,15 +1180,18 @@
<programlisting><![CDATA[<portlet-ref>...</portlet-ref>]]></programlisting>
</para>
<para>
- The <computeroutput><portlet-ref></computeroutput> element
defines the portlet that an instance will represent. The
<computeroutput><portlet-ref></computeroutput> value must match
the <computeroutput><portlet-name></computeroutput> given in the
<filename>WEB-INF/portlet.xml</filename> file.
+ The <computeroutput><portlet-ref></computeroutput> element
defines the portlet that an instance represents. The
<computeroutput><portlet-ref></computeroutput> value must match
the <computeroutput><portlet-name></computeroutput> given in the
<filename>WEB-INF/portlet.xml</filename> file.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<preferences><preference>...</preference></preferences>]]></programlisting>
- Preferences for this portlet instance are defined here, as type
String, in a key-value pair style.
- It is also possible to specify preferences as type String[], as in:
- <programlisting><![CDATA[
+ </para>
+ <para>
+ The <computeroutput><preferences></computeroutput> element
configures an instance with a set of preferences, and is a container for the
<computeroutput><preference></computeroutput> element. The
<computeroutput><preference></computeroutput> element configures
an instance with a set of preferences. Prefences can be described as a
<emphasis>String</emphasis> type, or a key-value pair. The following specifies
preferences as a <emphasis>String[]</emphasis> type:
+ </para>
+ <para>
+<screen><![CDATA[
<preferences>
<preference>
<name>fruit</name>
@@ -1197,57 +1200,71 @@
<value>kiwi</value>
</preference>
</preferences>
-]]></programlisting>
- </para>
+]]></screen>
+ </para>
+ <para>
+ The <computeroutput><preference></computeroutput> element
configures one preference, which is part of a set of preferences. Use the
<computeroutput><preferences></computeroutput> element to define
a set of preferences.
+ </para>
</listitem>
<listitem>
<para>
- <programlisting><![CDATA[<security-constraint>
+ The <computeroutput><security-constraint></computeroutput>
element is a container for
<computeroutput><policy-permission></computeroutput> elements.
The following is an example of the
<computeroutput><security-constraint></computeroutput> and
<computeroutput><policy-permission></computeroutput> elements:
+ </para>
+ <para>
+<screen><![CDATA[<security-constraint>
<policy-permission>
<action-name>viewrecursive</action-name>
<unchecked/>
</policy-permission>
-</security-constraint>]]></programlisting>
- The security contraint portion is worth taking a look at, in an
isolated fashion. It allows you to
- secure a specific portlet instance based on a user's role.
- </para>
- <para>
- <emphasis role="bold">Role
definition:</emphasis>
- You must define a role that this security constraint will apply to.
Possible values are:
- <itemizedlist>
- <listitem>
- <emphasis
role="bold"><unchecked/></emphasis>
- Anyone can view this page.
- </listitem>
- <listitem>
- <emphasis
role="bold"><role-name>SOMEROLE</role-name></emphasis>
- Access to this page is limited to the defined role.
- </listitem>
- </itemizedlist>
- <emphasis role="bold">Access
Rights:</emphasis>
- You must define the access rights given to the role defined.
Possible values are:
- <itemizedlist>
- <listitem>
- <emphasis role="bold">view</emphasis>
- Users can view the page.
- </listitem>
- <listitem>
- <emphasis
role="bold">viewrecursive</emphasis>
- Users can view the page and child pages.
- </listitem>
- <listitem>
- <emphasis
role="bold">personalize</emphasis>
- Users are able to personalize the page's theme.
- </listitem>
- <listitem>
- <emphasis
role="bold">personalizerecursive</emphasis>
- Users are able to personalize the page AND its children's
themes.
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </itemizedlist>
- </para>
+</security-constraint>]]></screen>
+ </para>
+ <para>
+ The <computeroutput><action-name></computeroutput> element
is used to define the access rights given to the role defined. Accepted values are:
+ </para>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <computeroutput>view</computeroutput>: users can view the page.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <computeroutput>viewrecursive</computeroutput>: users can view the
page and child pages.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <computeroutput>personalize</computeroutput>: users are able
personalize the page's theme.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <computeroutput>personalizerecursive</computeroutput>: users are able
personalize the page and child pages themes.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ You must define a role that the security constraint will apply to:
+ </para>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <computeroutput>unchecked</computeroutput>: anyone can view the page.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <computeroutput><role-name>EXAMPLEROLE</role-name></computeroutput>:
only allow users that are part of the
<computeroutput>EXAMPLEROLE</computeroutput> role to access the instance.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </listitem>
+</itemizedlist>
+</para>
<para>The example portlet-instances.xml, above, makes reference to items
found in other descriptor files. To
help with this topic, we have included a sample image that depicts the
relationship:
<mediaobject>
Show replies by date