Author: julien(a)jboss.com
Date: 2007-08-07 16:06:17 -0400 (Tue, 07 Aug 2007)
New Revision: 7873
Added:
docs/trunk/referenceGuide/en/images/portletmodes/
docs/trunk/referenceGuide/en/images/portletmodes/editor.png
docs/trunk/referenceGuide/en/modules/portletmodes.xml
Removed:
docs/trunk/referenceGuide/en/images/portletmodes/editor.png
Modified:
docs/trunk/referenceGuide/en/master.xml
Log:
JBPORTAL-1622:Implement 'admin' portlet mode
Copied: docs/trunk/referenceGuide/en/images/portletmodes (from rev 7870,
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/portletmodes)
Deleted: docs/trunk/referenceGuide/en/images/portletmodes/editor.png
===================================================================
(Binary files differ)
Copied: docs/trunk/referenceGuide/en/images/portletmodes/editor.png (from rev 7870,
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/portletmodes/editor.png)
===================================================================
(Binary files differ)
Modified: docs/trunk/referenceGuide/en/master.xml
===================================================================
--- docs/trunk/referenceGuide/en/master.xml 2007-08-07 20:04:32 UTC (rev 7872)
+++ docs/trunk/referenceGuide/en/master.xml 2007-08-07 20:06:17 UTC (rev 7873)
@@ -28,6 +28,7 @@
<!ENTITY contentintegration SYSTEM
"modules/contentintegration.xml">
<!ENTITY portalapi SYSTEM "modules/portalapi.xml">
<!ENTITY errorhandling SYSTEM "modules/errorhandling.xml">
+ <!ENTITY portletmodes SYSTEM "modules/portletmodes.xml">
]>
<book lang="en">
<bookinfo>
@@ -75,6 +76,7 @@
<!-- Understanding urls --> &urls;
<!-- Error handling --> &errorhandling;
<!-- Content integration --> &contentintegration;
+ <!-- Portlet modes --> &portletmodes;
<!-- Portal API --> &portalapi;
<!-- Clustering configuration --> &clustering;
<!-- WSRP --> &wsrp;
Copied: docs/trunk/referenceGuide/en/modules/portletmodes.xml (from rev 7870,
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/portletmodes.xml)
===================================================================
--- docs/trunk/referenceGuide/en/modules/portletmodes.xml (rev 0)
+++ docs/trunk/referenceGuide/en/modules/portletmodes.xml 2007-08-07 20:06:17 UTC (rev
7873)
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="portletmodes">
+ <chapterinfo>
+ <author>
+ <firstname>Julien</firstname>
+ <surname>Viet</surname>
+ <email>julien.viet(a)jboss.com</email>
+ </author>
+ </chapterinfo>
+ <title>Portlet Modes</title>
+ <para>JBoss Portal suppors the standard portlets modes mandated by the JSR-168
specification which are <emphasis>view</emphasis>,
+ <emphasis>edit</emphasis> and <emphasis>help</emphasis>. In
addition of that it also supports the <emphasis>admin</emphasis>
+ portlet mode.
+ </para>
+ <sect1>
+ <title>Admin Portlet Mode</title>
+ <para>The admin mode defines a mode for the portlet which allow
administration of the portlet. Its access
+ is only granted to users having an appropriate role. In order to grant admin access
to a portlet, the user must have a role which
+ grants him the <emphasis>admin</emphasis> action permission on the
portlet instance. This can be done in the
+ instance deployment descriptor or using the administation portlet of the portal.
</para>
+ <sect2>
+ <title>Portlet configuration</title>
+ <para>In order to be able to use the admin mode, the portlet must declares
it in the portlet deployment descriptor.</para>
+ <programlisting><![CDATA[
+<portlet-app>
+ ...
+ <portlet>
+ ...
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>admin</portlet-mode>
+ </supports>
+ ...
+ </portlet>
+ ...
+ <custom-portlet-mode>
+ <name>admin</name>
+ </custom-portlet-mode>
+ ...
+</portlet-app>
+]]></programlisting>
+ </sect2>
+ <sect2>
+ <title>Declarative instance security configuration</title>
+ <para>The following example shows the configuration of a portlet instance
that grants the admin action permission
+ to the <emphasis>Admin</emphasis> security role. It also grant
the view action permission to all users.
+ </para>
+<programlisting><![CDATA[
+...
+<instance>
+ <instance-id>ModePortletInstance</instance-id>
+ <portlet-ref>ModePortlet</portlet-ref>
+ <security-constraint>
+ <policy-permission>
+ <action-name>admin</action-name>
+ <role-name>Admin</role-name>
+ </policy-permission>
+ <policy-permission>
+ <action-name>view</action-name>
+ <unchecked/>
+ </policy-permission>
+ </security-constraint>
+</instance>
+...
+]]></programlisting>
+ </sect2>
+ <sect2>
+ <title>Instance security configuration with the administration
portlet</title>
+ <para>At runtime the security configuration section of the administration
portlet can be used to grant or revoke
+ the admin access. It can be done by clicking the security action of the
portlet instance and then use the
+ security editor.</para>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center"
fileref="images/portletmodes/editor.png" format="png"/>
+ </imageobject>
+ <caption>
+ <para>Edit the security instance configuration</para>
+ </caption>
+ </mediaobject>
+ </sect2>
+ </sect1>
+</chapter>
\ No newline at end of file
Show replies by date