JBoss Portal SVN: r6304 - trunk/core/src/resources/portal-core-war/WEB-INF/jsp/management.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-02-15 20:07:08 -0500 (Thu, 15 Feb 2007)
New Revision: 6304
Modified:
trunk/core/src/resources/portal-core-war/WEB-INF/jsp/management/index.xhtml
Log:
Remove ugly blue border around image links: [JBPORTAL-1267]
Modified: trunk/core/src/resources/portal-core-war/WEB-INF/jsp/management/index.xhtml
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/jsp/management/index.xhtml 2007-02-16 00:05:24 UTC (rev 6303)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/jsp/management/index.xhtml 2007-02-16 01:07:08 UTC (rev 6304)
@@ -27,7 +27,7 @@
action="#{portalobjectmgr.selectObject}" title="Context">
<t:graphicImage
value="/images/management/tree/context.png"
- style="vertical-align:middle;"/>
+ style="vertical-align:middle;border-width:0;"/>
<f:param
name="id"
value="#{node.identifier}"/>
@@ -53,7 +53,7 @@
action="#{portalobjectmgr.selectObject}" title="Portal">
<t:graphicImage
value="/images/management/tree/portal.png"
- style="vertical-align:middle;"/>
+ style="vertical-align:middle;border-width:0;"/>
<f:param
name="id"
value="#{node.identifier}"/>
@@ -79,7 +79,7 @@
action="#{portalobjectmgr.selectObject}" title="Page">
<t:graphicImage
value="/images/management/tree/page.png"
- style="vertical-align:middle;"/>
+ style="vertical-align:middle;border-width:0;"/>
<f:param
name="id"
value="#{node.identifier}"/>
@@ -105,7 +105,7 @@
action="#{portalobjectmgr.selectObject}" title="Window">
<t:graphicImage
value="/images/management/tree/window.png"
- style="vertical-align:middle;"/>
+ style="vertical-align:middle;border-width:0;"/>
<f:param
name="id"
value="#{node.identifier}"/>
19 years, 2 months
JBoss Portal SVN: r6303 - trunk/identity/src/resources/example.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-02-15 19:05:24 -0500 (Thu, 15 Feb 2007)
New Revision: 6303
Added:
trunk/identity/src/resources/example/portal-sample-rhds.ldif
Log:
- copy of example ldif
Added: trunk/identity/src/resources/example/portal-sample-rhds.ldif
===================================================================
--- trunk/identity/src/resources/example/portal-sample-rhds.ldif (rev 0)
+++ trunk/identity/src/resources/example/portal-sample-rhds.ldif 2007-02-16 00:05:24 UTC (rev 6303)
@@ -0,0 +1,133 @@
+dn: o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: organization
+o: test
+
+dn: ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: People
+
+
+dn: uid=admin,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: admin
+cn: Java Duke
+sn: Duke
+userPassword: admin
+mail: email(a)email.com
+
+dn: uid=user,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: user
+cn: user
+sn: Portal User
+userPassword: user
+mail: email(a)email.com
+
+dn: uid=jduke,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke
+cn: Java Duke
+sn: Duke
+userPassword: theduke
+mail: email(a)email.com
+
+dn: uid=jduke1,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke1
+cn: Java Duke1
+sn: Duke1
+userPassword: theduke
+mail: email(a)email.com
+
+
+dn: uid=jduke2,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke2
+cn: Java Duke2
+sn: Duke2
+userPassword: theduke
+mail: email(a)email.com
+
+dn: uid=jduke3,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke3
+cn: Java Duke3
+sn: Duke3
+userPassword: theduke
+mail: email(a)email.com
+
+dn: uid=jduke4,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke4
+cn: Java Duke4
+sn: Duke4
+userPassword: theduke
+mail: email(a)email.com
+
+dn: ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: Roles
+
+dn: cn=Admin,ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: Admin
+description: Portal admin role
+member: uid=admin,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+
+dn: cn=User,ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: User
+description: Portal user role
+member: uid=admin,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=user,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke1,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke2,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke3,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke4,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+
+
+
+dn: cn=Echo,ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: Echo
+description: the JBossAdmin group
+member: uid=jduke1,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke3,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke4,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+
+dn: cn=Echo1,ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: Echo1
+description: the JBossAdmin group 2
+member: uid=jduke2,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke3,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke5,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+
+dn: cn=TheDuke,ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectClass: groupOfNames
+objectClass: top
+cn: TheDuke
+description: TheDuke role context
+member: uid=jduke,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
\ No newline at end of file
19 years, 2 months
JBoss Portal SVN: r6302 - in docs/trunk/quickstartuser/en: modules and 1 other directory.
by portal-commits@lists.jboss.org
Author: roy.russo(a)jboss.com
Date: 2007-02-15 11:37:59 -0500 (Thu, 15 Feb 2007)
New Revision: 6302
Added:
docs/trunk/quickstartuser/en/images/image108.jpg
Modified:
docs/trunk/quickstartuser/en/images/image084.jpg
docs/trunk/quickstartuser/en/images/image085.jpg
docs/trunk/quickstartuser/en/images/image086.jpg
docs/trunk/quickstartuser/en/images/image087.jpg
docs/trunk/quickstartuser/en/images/image088.jpg
docs/trunk/quickstartuser/en/images/image091.jpg
docs/trunk/quickstartuser/en/images/image092.jpg
docs/trunk/quickstartuser/en/images/image093.jpg
docs/trunk/quickstartuser/en/images/image094.jpg
docs/trunk/quickstartuser/en/images/image095.jpg
docs/trunk/quickstartuser/en/images/image096.jpg
docs/trunk/quickstartuser/en/images/image098.jpg
docs/trunk/quickstartuser/en/images/image100.jpg
docs/trunk/quickstartuser/en/images/image103.jpg
docs/trunk/quickstartuser/en/images/image106.jpg
docs/trunk/quickstartuser/en/modules/deployportlet.xml
docs/trunk/quickstartuser/en/modules/interaction.xml
Log:
JBPORTAL-1114 - updating quickstart guide
Modified: docs/trunk/quickstartuser/en/images/image084.jpg
===================================================================
(Binary files differ)
Modified: docs/trunk/quickstartuser/en/images/image085.jpg
===================================================================
(Binary files differ)
Modified: docs/trunk/quickstartuser/en/images/image086.jpg
===================================================================
(Binary files differ)
Modified: docs/trunk/quickstartuser/en/images/image087.jpg
===================================================================
(Binary files differ)
Modified: docs/trunk/quickstartuser/en/images/image088.jpg
===================================================================
(Binary files differ)
Modified: docs/trunk/quickstartuser/en/images/image091.jpg
===================================================================
(Binary files differ)
Modified: docs/trunk/quickstartuser/en/images/image092.jpg
===================================================================
(Binary files differ)
Modified: docs/trunk/quickstartuser/en/images/image093.jpg
===================================================================
(Binary files differ)
Modified: docs/trunk/quickstartuser/en/images/image094.jpg
===================================================================
(Binary files differ)
Modified: docs/trunk/quickstartuser/en/images/image095.jpg
===================================================================
(Binary files differ)
Modified: docs/trunk/quickstartuser/en/images/image096.jpg
===================================================================
(Binary files differ)
Modified: docs/trunk/quickstartuser/en/images/image098.jpg
===================================================================
(Binary files differ)
Modified: docs/trunk/quickstartuser/en/images/image100.jpg
===================================================================
(Binary files differ)
Modified: docs/trunk/quickstartuser/en/images/image103.jpg
===================================================================
(Binary files differ)
Modified: docs/trunk/quickstartuser/en/images/image106.jpg
===================================================================
(Binary files differ)
Added: docs/trunk/quickstartuser/en/images/image108.jpg
===================================================================
(Binary files differ)
Property changes on: docs/trunk/quickstartuser/en/images/image108.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: docs/trunk/quickstartuser/en/modules/deployportlet.xml
===================================================================
--- docs/trunk/quickstartuser/en/modules/deployportlet.xml 2007-02-15 16:31:50 UTC (rev 6301)
+++ docs/trunk/quickstartuser/en/modules/deployportlet.xml 2007-02-15 16:37:59 UTC (rev 6302)
@@ -1,113 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="deployportlet">
- <chapterinfo>
- <author>
- <firstname>Kevin</firstname>
+ <chapterinfo>
+ <author>
+ <firstname>Kevin</firstname>
- <surname>Barfield</surname>
+ <surname>Barfield</surname>
- <email>kevin.barfield(a)jboss.com</email>
- </author>
- </chapterinfo>
+ <email>kevin.barfield(a)jboss.com</email>
+ </author>
+ </chapterinfo>
- <title>Deploying Portlets</title>
+ <title>Deploying Portlets</title>
- <para>Let's add a portlet from Portletswap to the JBoss Portal we have
- running. Open a browser to the following URL: <ulink
- url="http://www.portletswap.com">http://www.portletswap.com</ulink> (Figure
- 47). <mediaobject>
- <imageobject>
- <imagedata align="center" fileref="images/image089.png" format="png"
- valign="middle" />
- </imageobject>
+ <para>Let's add a portlet from Portletswap to the JBoss Portal we have
+ running. Open a browser to the following URL:
+ <ulink
+ url="http://www.portletswap.com">http://www.portletswap.com
+ </ulink>
+ (Figure
+ 47).
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center" fileref="images/image089.png" format="png"
+ valign="middle"/>
+ </imageobject>
- <caption><para>Figure 47. Portletswap website</para></caption>
- </mediaobject> Click on the "Browse Portlets" link to see the categories
- of portlets available (Figure 48). <mediaobject>
- <imageobject>
- <imagedata align="left" fileref="images/image101.jpg" format="JPG"
- valign="middle" />
- </imageobject>
+ <caption>
+ <para>Figure 47. Portletswap website</para>
+ </caption>
+ </mediaobject>
+ Click on the "Browse Portlets" link to see the categories
+ of portlets available (Figure 48).
+ <mediaobject>
+ <imageobject>
+ <imagedata align="left" fileref="images/image101.jpg" format="JPG"
+ valign="middle"/>
+ </imageobject>
- <caption><para>Figure 48. Portlet categories on
- portletswap.</para></caption>
- </mediaobject> Click on the Miscellaneous Portlets browse link to see a
- list of portlets (Figure 49). <mediaobject>
- <imageobject>
- <imagedata align="left" fileref="images/image102.jpg" format="JPG"
- valign="middle" />
- </imageobject>
+ <caption>
+ <para>Figure 48. Portlet categories on
+ portletswap.
+ </para>
+ </caption>
+ </mediaobject>
+ Click on the Miscellaneous Portlets browse link to see a
+ list of portlets (Figure 49).
+ <mediaobject>
+ <imageobject>
+ <imagedata align="left" fileref="images/image102.jpg" format="JPG"
+ valign="middle"/>
+ </imageobject>
- <caption><para>Figure 49. List of portlets on
- portletswap.</para></caption>
- </mediaobject> Click on the download link next to the Flash MoviePortlet.
- The download dialog will appear (Figure 50). <mediaobject>
- <imageobject>
- <imagedata align="center" fileref="images/image064.jpg" format="JPG"
- valign="middle" />
- </imageobject>
+ <caption>
+ <para>Figure 49. List of portlets on
+ portletswap.
+ </para>
+ </caption>
+ </mediaobject>
+ Click on the download link next to the Flash MoviePortlet.
+ The download dialog will appear (Figure 50).
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center" fileref="images/image064.jpg" format="JPG"
+ valign="middle"/>
+ </imageobject>
- <caption><para>Figure 50. Download dialog.</para></caption>
- </mediaobject> This zip file contains both the binary and the source for
- the portlet. Open the zip and extract the flash.war file. Place this file in
- the $JBOSS_HOME\server\default\deploy directory. The console for the
- JBoss Portal will show the portlet being deployed (Figure 51). <mediaobject>
- <imageobject>
- <imagedata align="center" fileref="images/image066.jpg" format="JPG"
- valign="middle" />
- </imageobject>
+ <caption>
+ <para>Figure 50. Download dialog.</para>
+ </caption>
+ </mediaobject>
+ This zip file contains both the binary and the source for
+ the portlet. Open the zip and extract the flash.war file. Place this file in
+ the $JBOSS_HOME\server\default\deploy directory. The console for the
+ JBoss Portal will show the portlet being deployed (Figure 51).
- <caption><para>Figure 51. Flash portlet is deployed to JBoss
- Portal.</para></caption>
- </mediaobject> To see the deployed portlet, we need to add it to our
- Starter portal page. First, we need to create an instance of the portlet. Go
- to the Admin portal page (Figure 52). <mediaobject>
- <imageobject>
- <imagedata align="left" fileref="images/image012.jpg" format="JPG"
- valign="middle" />
- </imageobject>
+ <emphasis>11:23:17,640 INFO [TomcatDeployer] deploy, ctxPath=/flash, warUrl=.../tmp/deploy/tmp64975flash-exp.war/</emphasis>
- <caption><para>Figure 52. Admin portal page.</para></caption>
- </mediaobject></para>
+ To see the deployed portlet, we need to add it to our
+ Starter portal page. First, we need to create an instance of the portlet. Go
+ to the Management portlet (Figure 52).
+ <mediaobject>
+ <imageobject>
+ <imagedata align="left" fileref="images/image108.jpg" format="JPG"
+ valign="middle"/>
+ </imageobject>
- <para>Click on the Portlets link. A list of all portlets will be displayed.
- Click on the FlashPortlet link. A dialog to create an instance will appear
- (Figure 53).<mediaobject>
- <imageobject>
- <imagedata align="center" fileref="images/image103.jpg" format="JPG"
- valign="middle" />
- </imageobject>
+ <caption>
+ <para>Figure 52. Admin portal page.</para>
+ </caption>
+ </mediaobject>
+ </para>
- <caption><para>Figure 53. Portlets admininstration.</para></caption>
- </mediaobject> Type in "Flash Portlet " as the instance name and click on
- the create instance button. Now there is an instance of the portlet that can
- be added to the Starter portal page. Click on the Instances link to see all
- portlet instances (Figure 54).<mediaobject>
- <imageobject>
- <imagedata align="left" fileref="images/image104.jpg" format="JPG"
- valign="middle" />
- </imageobject>
+ <para>Click on the Portlets link. A list of all portlets will be displayed.
+ Click on the FlashPortlet link. A dialog to create an instance will appear
+ (Figure 53).
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center" fileref="images/image103.jpg" format="JPG"
+ valign="middle"/>
+ </imageobject>
- <caption><para>Figure 54. Portlet instances
- admininstration.</para></caption>
- </mediaobject>Click on the Portal link and expand the tree to the Starter
- portal page. Select the Flash Portlet from the portlet list, and add it to
- the Starter portal page with a name of "flash" (Figure 55).<mediaobject>
- <imageobject>
- <imagedata align="left" fileref="images/image105.jpg" format="JPG"
- valign="middle" />
- </imageobject>
+ <caption>
+ <para>Figure 53. Portlets admininstration.</para>
+ </caption>
+ </mediaobject>
+ Type in "Flash Portlet " as the instance name and click on
+ the create instance button. Now there is an instance of the portlet that can
+ be added to the Starter portal page. Click on the Instances link to see all
+ portlet instances (Figure 54).
+ <mediaobject>
+ <imageobject>
+ <imagedata align="left" fileref="images/image104.jpg" format="JPG"
+ valign="middle"/>
+ </imageobject>
- <caption><para>Figure 55. Starter portal page with flash portlet
- added.</para></caption>
- </mediaobject> Click on the Starter portal page, and the flash portlet is
- displayed (Figure 56).<mediaobject>
- <imageobject>
- <imagedata align="left" fileref="images/image106.jpg" format="JPG"
- valign="middle" />
- </imageobject>
+ <caption>
+ <para>Figure 54. Portlet instances
+ admininstration.
+ </para>
+ </caption>
+ </mediaobject>
+ Click on the Portal link and expand the tree to the Starter
+ portal page. Select the Flash Portlet from the portlet list, and add it to
+ the Starter portal page with a name of "flash" (Figure 55).
+ <mediaobject>
+ <imageobject>
+ <imagedata align="left" fileref="images/image105.jpg" format="JPG"
+ valign="middle"/>
+ </imageobject>
- <caption><para>Figure 56. Starter portal page with flash
- portlet.</para></caption>
- </mediaobject></para>
+ <caption>
+ <para>Figure 55. Starter portal page with flash portlet
+ added.
+ </para>
+ </caption>
+ </mediaobject>
+ Click on the Starter portal page, and the flash portlet is
+ displayed (Figure 56).
+ <mediaobject>
+ <imageobject>
+ <imagedata align="left" fileref="images/image106.jpg" format="JPG"
+ valign="middle"/>
+ </imageobject>
+
+ <caption>
+ <para>Figure 56. Starter portal page with flash
+ portlet.
+ </para>
+ </caption>
+ </mediaobject>
+ </para>
</chapter>
\ No newline at end of file
Modified: docs/trunk/quickstartuser/en/modules/interaction.xml
===================================================================
--- docs/trunk/quickstartuser/en/modules/interaction.xml 2007-02-15 16:31:50 UTC (rev 6301)
+++ docs/trunk/quickstartuser/en/modules/interaction.xml 2007-02-15 16:37:59 UTC (rev 6302)
@@ -342,11 +342,11 @@
<sect1>
<title>Portal Management</title>
- <para>Click on the Admin portal page. The user, role, catalog, CMS Admin,
- and management portlets are on this portal page (Figure 29).
+ <para>Click on the Admin link. From this Admin Portal, you should have access to the Members, CMS, and Portal
+ management interfaces. (Figure 29).
<mediaobject>
<imageobject>
- <imagedata align="left" fileref="images/image012.jpg" format="JPG"
+ <imagedata align="left" fileref="images/image108.jpg" format="JPG"
valign="middle"/>
</imageobject>
@@ -354,7 +354,7 @@
<para>Figure 29. Admin portal page.</para>
</caption>
</mediaobject>
- Click on the "List of all the users" link to see the users
+ Click the "Members" tab to access the member management page. Click on the "Search" button to see the users
in the portal (Figure 30).
<mediaobject>
<imageobject>
@@ -397,7 +397,7 @@
</caption>
</mediaobject>
Now let's look at the user profile for the starter user.
- Click on the "List of all users" link, then the "Profile" link next to the
+ Click on the "Search" button, then the "Profile" link next to the
starter user. The user profile view appears (Figure 33).
<mediaobject>
<imageobject>
@@ -411,12 +411,11 @@
</mediaobject>
This shows all of the fields available in the user
profile. Enter the first name of "starter" and click the "Save changes"
- button. The User portlet menu view is displayed again. Click on the
- default size icon to go back to the Admin portal page default view (Figure
+ button. The Member management page is displayed now.(Figure
34).
<mediaobject>
<imageobject>
- <imagedata align="left" fileref="images/image012.jpg" format="jpg"
+ <imagedata align="left" fileref="images/image108.jpg" format="jpg"
valign="middle"/>
</imageobject>
@@ -426,13 +425,11 @@
</para>
</caption>
</mediaobject>
- Now, let's explore the management portlet. This portlet
+ Now, let's explore the management portlet, by clicking on the "Home" tab. This portlet
shows a tree view of the portals, portal pages, and portlet instances.
- Click on the "+" icon next to root, then the "+" icon next to default, and
- finally the "+" icon next to Admin. This shows us that there is a default
- portal with four portal pages defined. In addition, we can see the six
- portlet instances (including navigation) that are used in the management
- portal page (Figure 35).
+ Click on the "+" icon next to root, then the "+" icon next to "admin", then the "+" icon next to "Members".
+ This shows us that there is an admin portal with 3 portal pages defined. In addition, we can see the 2
+ portlet instances that are used in the Members portal page (Figure 35).
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/image088.jpg" format="JPG"
@@ -448,20 +445,8 @@
Using the arrows next to the portlet instance names, we
can dynamically move the portlet instances on the portal page. Click on
the up arrow icon next to the RolePortletWindow to move the role portlet
- above the user portlet The page now shows the role portlet above the user
- portlet on the page (Figure 36).
- <mediaobject>
- <imageobject>
- <imagedata align="left" fileref="images/image089.jpg" format="JPG"
- valign="middle"/>
- </imageobject>
+ above the user portlet.
- <caption>
- <para>Figure 36. Role portlet is moved on the management
- portlet page.
- </para>
- </caption>
- </mediaobject>
Let's create a new portal page. Click on the "default"
portal link. The add portal page view is shown (Figure 37).
<mediaobject>
@@ -506,7 +491,7 @@
</para>
</caption>
</mediaobject>
- First, let's add a navigation portlet. Choose the
+ First, let's add a weather portlet. Choose the
navigation portlet instance from the dropdown (Figure 40).
<mediaobject>
<imageobject>
@@ -521,8 +506,8 @@
</caption>
</mediaobject>
Type in the name you want to give this portlet instance
- ("nav") and click the "Add navigation" button. The "nav" portlet instance
- is now shown under navigation (Figure 41).
+ ("weather") and click the "Add Center" button. The "weather" portlet instance
+ is now shown under the "center" (Figure 41).
<mediaobject>
<imageobject>
<imagedata align="left" fileref="images/image094.jpg" format="JPG"
@@ -535,7 +520,7 @@
</para>
</caption>
</mediaobject>
- Click on the "nav" link to go into the details for that
+ Click on the "weather" link to go into the details for that
portlet instance (Figure 42)
<mediaobject>
<imageobject>
@@ -544,14 +529,13 @@
</imageobject>
<caption>
- <para>Figure 42. Details for the nav portlet
+ <para>Figure 42. Details for the weather portlet
instance.
</para>
</caption>
</mediaobject>
Click on the "Theme" link to update the theme for this
- portlet. Since this is a navigation portlet and it doesn't need portlet
- decorations, let's set the Window Renderer, Decoration Renderer, and
+ portlet. Let's set the Window Renderer, Decoration Renderer, and
Portlet Renderer to "emptyRenderer" (Figure 43).
<mediaobject>
<imageobject>
@@ -560,30 +544,11 @@
</imageobject>
<caption>
- <para>Figure 43. Theme details for the nav portlet
+ <para>Figure 43. Theme details for the weather portlet
instance.
</para>
</caption>
</mediaobject>
- Click the "Update" button, then click the Starter portal
- page in the management portlet to continue adding portlets to the Starter
- portal page. Select the CatalogPortletInstance from the portlet instance
- list, enter a name of "catalog", and click the "Add left" button. Select
- the CMSPortletInstance from the portlet instance list, enter a name of
- "CMS", and click the "Add center" button. See Figure 44 for the updated
- detail of the Starter portal page.
- <mediaobject>
- <imageobject>
- <imagedata align="left" fileref="images/image097.jpg" format="JPG"
- valign="middle"/>
- </imageobject>
-
- <caption>
- <para>Figure 44. Starter page detail with portlet instances
- added.
- </para>
- </caption>
- </mediaobject>
Finally, let's take a look at security in the management
portlet. Click on the "Security" link, and the list of available roles and
actions is shown for the Starter portal page.(Figure 45).
@@ -600,7 +565,7 @@
</caption>
</mediaobject>
Let's take a look at the Starter portal page we created.
- Click on the "Starter" tab at the top to go to the Starter portal page
+ Click on the "Main" link, and then the "Starter" tab at the top to go to the Starter portal page
(Figure 46).
<mediaobject>
<imageobject>
19 years, 2 months
JBoss Portal SVN: r6301 - in trunk/core/src/main/org/jboss/portal: core/model/portal and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-15 11:31:50 -0500 (Thu, 15 Feb 2007)
New Revision: 6301
Modified:
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java
trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java
trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectIdTestCase.java
Log:
- test case for PortalObject.getChildren(int mask)
- implemented and tested PortalObjectId.compareTo(Object o)
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2007-02-15 15:03:34 UTC (rev 6300)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2007-02-15 16:31:50 UTC (rev 6301)
@@ -424,6 +424,25 @@
return objectNode.toString();
}
+ public boolean equals(Object obj)
+ {
+ if (obj == this)
+ {
+ return true;
+ }
+ if (obj instanceof PortalObjectImpl)
+ {
+ PortalObjectImpl that = (PortalObjectImpl)obj;
+ return getId().equals(that.getId());
+ }
+ return false;
+ }
+
+ public int hashCode()
+ {
+ return getId().hashCode();
+ }
+
/** Return the default child of this object based on the declared property that specifies the default object name. */
protected PortalObject getDefaultChild()
{
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java 2007-02-15 15:03:34 UTC (rev 6300)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java 2007-02-15 16:31:50 UTC (rev 6301)
@@ -198,9 +198,25 @@
return hashCode.intValue();
}
+ /**
+ * Lexicographical order based implementation on the names atoms.
+ */
public int compareTo(Object o)
{
- throw new NotYetImplemented();
+ PortalObjectId that = (PortalObjectId)o;
+ int index = 0;
+ while (index < this.names.length && index < that.names.length)
+ {
+ String thisName = this.names[index];
+ String thatName = that.names[index];
+ int order = thisName.compareTo(thatName);
+ if (order != 0)
+ {
+ return order;
+ }
+ index++;
+ }
+ return that.names.length - this.names.length;
}
/**
Modified: trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java 2007-02-15 15:03:34 UTC (rev 6300)
+++ trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java 2007-02-15 16:31:50 UTC (rev 6301)
@@ -41,11 +41,16 @@
import org.jboss.portal.common.test.TestParametrization;
import org.jboss.portal.common.test.junit.JUnitAdapter;
import org.jboss.portal.common.test.junit.POJOJUnitTest;
+import org.jboss.portal.common.junit.TransactionAssert;
+import org.jboss.portal.common.util.CollectionBuilder;
import org.jboss.portal.WindowState;
import org.jboss.portal.Mode;
import java.net.URL;
import java.util.Collections;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Comparator;
/**
* Portal Object Container Test Cases based on the microcontainer architecture
@@ -126,23 +131,15 @@
/** todo same with a transaction wrapping the start method */
public void testRootNodeCreation() throws Exception
{
- hibernate.openSession();
- assertTrue(hibernate.commitTransaction());
-
- //
- hibernate.openSession();
+ TransactionAssert.beginTransaction();
PortalObject root = container.getRootObject();
assertNotNull(root);
- assertTrue(hibernate.commitTransaction());
+ TransactionAssert.commitTransaction();
}
public void testCRUD() throws Exception
{
- hibernate.openSession();
- assertTrue(hibernate.commitTransaction());
-
- //
- hibernate.openSession();
+ TransactionAssert.beginTransaction();
PortalContainer ctx = (PortalContainer)container.getRootObject();
Portal portal = ctx.createPortal("default");
PortalObjectId portalId = portal.getId();
@@ -180,10 +177,10 @@
assertNotNull(windowId);
assertEquals(page, window.getParent());
assertEquals(window, page.getChild("default"));
- assertTrue(hibernate.commitTransaction());
+ TransactionAssert.commitTransaction();
//
- hibernate.openSession();
+ TransactionAssert.beginTransaction();
PortalObject portalIdObject = container.getObject(portalId);
assertNotNull(portalIdObject);
assertTrue(portalIdObject instanceof Portal);
@@ -196,10 +193,10 @@
assertNotNull(windowIdObject);
assertTrue(windowIdObject instanceof Window);
assertEquals(windowId, windowIdObject.getId());
- assertTrue(hibernate.commitTransaction());
+ TransactionAssert.commitTransaction();
//
- hibernate.openSession();
+ TransactionAssert.beginTransaction();
ctx = (PortalContainer)container.getRootObject();
assertNotNull(ctx);
portal = ctx.getPortal("default");
@@ -211,28 +208,63 @@
window = page.getWindow("default");
assertNotNull(window);
assertEquals(windowId, window.getId());
- assertTrue(hibernate.commitTransaction());
+ TransactionAssert.commitTransaction();
//
- hibernate.openSession();
+ TransactionAssert.beginTransaction();
ctx = (PortalContainer)container.getRootObject();
assertNotNull(ctx);
ctx.destroyChild("default");
portal = ctx.getPortal("default");
assertNull(portal);
- assertTrue(hibernate.commitTransaction());
+ TransactionAssert.commitTransaction();
//
- hibernate.openSession();
+ TransactionAssert.beginTransaction();
ctx = (PortalContainer)container.getRootObject();
portal = ctx.getPortal("default");
assertNull(portal);
- assertTrue(hibernate.commitTransaction());
+ TransactionAssert.commitTransaction();
}
public void testGetChildren() throws Exception
{
-
+ TransactionAssert.beginTransaction();
+ PortalContainer ctx = (PortalContainer)container.getRootObject();
+ Portal portal_1 = ctx.createPortal("1");
+ Page page_1_1 = portal_1.createPage("1");
+ Page page_1_2 = portal_1.createPage("2");
+ Page page_1_1_1 = page_1_1.createPage("1");
+ Window window_1_1_2 = page_1_1.createWindow("2", ContentType.PORTLET, "uri");
+ Page page_1_1_3 = page_1_1.createPage("3");
+ Window window_1_1_4 = page_1_1.createWindow("4", ContentType.PORTLET, "uri");
+ TransactionAssert.commitTransaction();
+
+ //
+ TransactionAssert.beginTransaction();
+ PortalObject o_1 = container.getRootObject().getChild("1");
+ PortalObject o_1_1 = o_1.getChild("1");
+ PortalObject o_1_2 = o_1.getChild("2");
+ PortalObject o_1_1_1 = o_1_1.getChild("1");
+ PortalObject o_1_1_2 = o_1_1.getChild("2");
+ PortalObject o_1_1_3 = o_1_1.getChild("3");
+ PortalObject o_1_1_4 = o_1_1.getChild("4");
+ List l1 = new ArrayList(o_1_1.getChildren());
+ Collections.sort(l1, new PortalObjectComparator());
+ assertEquals(new CollectionBuilder().add(o_1_1_1).add(o_1_1_2).add(o_1_1_3).add(o_1_1_4).toArrayList(), l1);
+ List l2 = new ArrayList(o_1_1.getChildren(PortalObject.PAGE_MASK));
+ Collections.sort(l2, new PortalObjectComparator());
+ assertEquals(new CollectionBuilder().add(o_1_1_1).add(o_1_1_3).toArrayList(), l2);
+ List l3 = new ArrayList(o_1_1.getChildren(PortalObject.WINDOW_MASK));
+ Collections.sort(l3, new PortalObjectComparator());
+ assertEquals(new CollectionBuilder().add(o_1_1_2).add(o_1_1_4).toArrayList(), l3);
+ List l4 = new ArrayList(o_1_1.getChildren(0));
+ Collections.sort(l4, new PortalObjectComparator());
+ assertEquals(new CollectionBuilder().toArrayList(), l4);
+ List l5 = new ArrayList(o_1_1.getChildren(PortalObject.PORTAL_MASK));
+ Collections.sort(l5, new PortalObjectComparator());
+ assertEquals(new CollectionBuilder().toArrayList(), l5);
+ TransactionAssert.commitTransaction();
}
public void testRecreate() throws Exception
@@ -240,7 +272,7 @@
PortalObjectId defaultId = new PortalObjectId(new String[]{"default"});
//
- hibernate.openSession();
+ TransactionAssert.beginTransaction();
PortalContainer ctx = (PortalContainer)container.getRootObject();
Portal portal = ctx.createPortal("default");
assertNotNull(portal);
@@ -257,7 +289,8 @@
object = container.getObject(defaultId);
assertNotNull(object);
- assertTrue(hibernate.commitTransaction());
+ //
+ TransactionAssert.commitTransaction();
}
/**
@@ -269,7 +302,7 @@
PortalObjectId defaultId = new PortalObjectId(new String[]{"portal"});
//
- hibernate.openSession();
+ TransactionAssert.beginTransaction();
PortalContainer ctx = (PortalContainer)container.getRootObject();
Portal portal = ctx.createPortal("portal");
portal.setDeclaredProperty("portalname", "portalvalue");
@@ -284,10 +317,10 @@
ContentState contentState = content.getState();
assertNotNull(contentState);
contentState.setProperty("content.abc", "def");
- assertTrue(hibernate.commitTransaction());
+ TransactionAssert.commitTransaction();
//
- hibernate.openSession();
+ TransactionAssert.beginTransaction();
ctx = (PortalContainer)container.getRootObject();
portal = (Portal)container.getObject(defaultId);
portal = (Portal)portal.copy(ctx, "copy", true);
@@ -308,7 +341,7 @@
contentState = content.getState();
assertNotNull(contentState);
assertEquals("def", contentState.getProperty("content.abc"));
- assertTrue(hibernate.commitTransaction());
+ TransactionAssert.commitTransaction();
}
// private void constructPortalObjects() throws Exception
@@ -320,4 +353,14 @@
// Page page = portal.createPage("default");
// assertNotNull(page);
// }
+
+ private static class PortalObjectComparator implements Comparator
+ {
+ public int compare(Object o1, Object o2)
+ {
+ PortalObject po1 = (PortalObject)o1;
+ PortalObject po2 = (PortalObject)o2;
+ return po1.getId().compareTo(po2.getId());
+ }
+ }
}
Modified: trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectIdTestCase.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectIdTestCase.java 2007-02-15 15:03:34 UTC (rev 6300)
+++ trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectIdTestCase.java 2007-02-15 16:31:50 UTC (rev 6301)
@@ -163,6 +163,15 @@
assertTrue(new PortalObjectId(new String[]{"a","b"}).equals(new PortalObjectId(new String[]{"a","b"})));
}
+ public void testComparable()
+ {
+ assertTrue(new PortalObjectId(new String[]{"a"}).compareTo(new PortalObjectId(new String[]{"a"})) == 0);
+ assertTrue(new PortalObjectId(new String[]{"a"}).compareTo(new PortalObjectId(new String[]{"b"})) < 0);
+ assertTrue(new PortalObjectId(new String[]{"b"}).compareTo(new PortalObjectId(new String[]{"a"})) > 0);
+ assertTrue(new PortalObjectId(new String[]{"a"}).compareTo(new PortalObjectId(new String[]{"a","b"})) > 0);
+ assertTrue(new PortalObjectId(new String[]{"a","b"}).compareTo(new PortalObjectId(new String[]{"a"})) < 0);
+ }
+
public void testIterator()
{
ExtendedAssert.assertEquals(new Object[]{}, Tools.toArray(new PortalObjectId(new String[]{}).names()));
19 years, 2 months
JBoss Portal SVN: r6300 - trunk/identity/src/resources/example.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-02-15 10:03:34 -0500 (Thu, 15 Feb 2007)
New Revision: 6300
Modified:
trunk/identity/src/resources/example/portal-sample-qa.ldif
trunk/identity/src/resources/example/portal-sample.ldif
Log:
- small fix of example ldifs
Modified: trunk/identity/src/resources/example/portal-sample-qa.ldif
===================================================================
--- trunk/identity/src/resources/example/portal-sample-qa.ldif 2007-02-15 14:33:13 UTC (rev 6299)
+++ trunk/identity/src/resources/example/portal-sample-qa.ldif 2007-02-15 15:03:34 UTC (rev 6300)
@@ -104,7 +104,6 @@
member: uid=jduke2,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
member: uid=jduke3,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
member: uid=jduke4,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
-member: uid=jduke5,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
dn: cn=common,ou=Roles,o=qa,dc=portal,dc=my-domain,dc=com
objectClass: top
@@ -118,7 +117,6 @@
member: uid=jduke2,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
member: uid=jduke3,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
member: uid=jduke4,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
-member: uid=jduke5,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
dn: cn=Echo,ou=Roles,o=qa,dc=portal,dc=my-domain,dc=com
Modified: trunk/identity/src/resources/example/portal-sample.ldif
===================================================================
--- trunk/identity/src/resources/example/portal-sample.ldif 2007-02-15 14:33:13 UTC (rev 6299)
+++ trunk/identity/src/resources/example/portal-sample.ldif 2007-02-15 15:03:34 UTC (rev 6300)
@@ -104,7 +104,6 @@
member: uid=jduke2,ou=People,o=portal,dc=my-domain,dc=com
member: uid=jduke3,ou=People,o=portal,dc=my-domain,dc=com
member: uid=jduke4,ou=People,o=portal,dc=my-domain,dc=com
-member: uid=jduke5,ou=People,o=portal,dc=my-domain,dc=com
dn: cn=Echo,ou=Roles,o=portal,dc=my-domain,dc=com
19 years, 2 months
JBoss Portal SVN: r6299 - trunk/workflow.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-02-15 09:33:13 -0500 (Thu, 15 Feb 2007)
New Revision: 6299
Removed:
trunk/workflow/build.log
Log:
Removed log
Deleted: trunk/workflow/build.log
===================================================================
--- trunk/workflow/build.log 2007-02-15 13:53:49 UTC (rev 6298)
+++ trunk/workflow/build.log 2007-02-15 14:33:13 UTC (rev 6299)
@@ -1,50 +0,0 @@
-
-configure:
-Overriding previous definition of reference to apache.ant.classpath
-
-configure-modules:
-
-configure-defaults:
-Overriding previous definition of reference to javac.classpath
-
-configure-tools:
-
-_configure:jbossaop:task:
-
-_configure:xdoclet:task:
-
-_configure:xdoclet:ejbdoclet:
-
-_configure:xdoclet:jmxdoclet:
-
-_default:compile-classes:
- [mkdir] Created dir: C:\projects\core-portal\jboss-portal-trunk\workflow\output\classes
- [mkdir] Created dir: C:\projects\core-portal\jboss-portal-trunk\workflow\output\gen\classes
- [javac] Compiling 12 source files to C:\projects\core-portal\jboss-portal-trunk\workflow\output\classes
-
-_default:check-exists-etc:
-
-_default:compile-etc:
- [mkdir] Created dir: C:\projects\core-portal\jboss-portal-trunk\workflow\output\etc
- [copy] Copying 1 file to C:\projects\core-portal\jboss-portal-trunk\workflow\output\etc
-
-_default:check-exists-resources:
-
-_default:compile-resources:
- [mkdir] Created dir: C:\projects\core-portal\jboss-portal-trunk\workflow\output\resources
- [copy] Copying 6 files to C:\projects\core-portal\jboss-portal-trunk\workflow\output\resources
- [copy] Copied 10 empty directories to 1 empty directory under C:\projects\core-portal\jboss-portal-trunk\workflow\output\resources
-
-compile:
-
-output:
- [mkdir] Created dir: C:\projects\core-portal\jboss-portal-trunk\workflow\output\lib
- [jar] Building jar: C:\projects\core-portal\jboss-portal-trunk\workflow\output\lib\portal-workflow-lib.jar
-
-_default:most:
-
-most:
-
-main:
-
-BUILD SUCCESSFUL
19 years, 2 months
JBoss Portal SVN: r6298 - in trunk/core: src/main/org/jboss/portal/test/core/model/portal and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-15 08:53:49 -0500 (Thu, 15 Feb 2007)
New Revision: 6298
Modified:
trunk/core/build.xml
trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java
Log:
run all test cases in core
Modified: trunk/core/build.xml
===================================================================
--- trunk/core/build.xml 2007-02-15 13:50:31 UTC (rev 6297)
+++ trunk/core/build.xml 2007-02-15 13:53:49 UTC (rev 6298)
@@ -550,7 +550,6 @@
</x-sysproperty>
<x-test>
-<!--
<zest todir="${test.reports}" name="org.jboss.portal.test.core.model.portal.PortalObjectContainerTestCase"
outfile="TEST-PortalObjectContainerTestCase">
<parameter name="CacheNaturalId" value="true"/>
@@ -579,7 +578,6 @@
<parameter name="CloneOnCreate" value="false"/>
<parameter name="CacheNaturalId" value="true"/>
</zest>
--->
<zest todir="${test.reports}" name="org.jboss.portal.test.core.state.ProducerTestCase"
outfile="TEST-ProducerTestCase-WithoutRegistration">
<parameter name="UseRegistration" value="false"/>
@@ -588,19 +586,15 @@
outfile="TEST-ProducerTestCase-WithRegistration">
<parameter name="UseRegistration" value="true"/>
</zest>
-<!--
<zest todir="${test.reports}" name="org.jboss.portal.test.core.state.RegistrationPersistenceManagerTestCase"
outfile="TEST-RegistrationPersistenceManagerTestCase">
</zest>
--->
-<!--
<test todir="${test.reports}"
name="org.jboss.portal.test.core.deployment.JBossApplicationMetaDataFactoryTestCase"/>
<test todir="${test.reports}"
name="org.jboss.portal.test.core.model.portal.PortalObjectPermissionTestCase"/>
<test todir="${test.reports}"
name="org.jboss.portal.test.core.model.portal.PortalObjectIdTestCase"/>
--->
</x-test>
<x-classpath>
<pathelement location="${build.lib}/portal-core-lib.jar"/>
Modified: trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java 2007-02-15 13:50:31 UTC (rev 6297)
+++ trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java 2007-02-15 13:53:49 UTC (rev 6298)
@@ -230,6 +230,11 @@
assertTrue(hibernate.commitTransaction());
}
+ public void testGetChildren() throws Exception
+ {
+
+ }
+
public void testRecreate() throws Exception
{
PortalObjectId defaultId = new PortalObjectId(new String[]{"default"});
19 years, 2 months
JBoss Portal SVN: r6297 - in trunk/core/src/main/org/jboss/portal/core: model/portal and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-15 08:50:31 -0500 (Thu, 15 Feb 2007)
New Revision: 6297
Modified:
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java
trunk/core/src/main/org/jboss/portal/core/model/portal/command/RenderPageCommand.java
Log:
JBPORTAL-1240 : Nested pages issue in JS for navigation
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2007-02-15 13:43:33 UTC (rev 6296)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2007-02-15 13:50:31 UTC (rev 6297)
@@ -47,6 +47,9 @@
/** The logger. */
protected static final Logger log = Logger.getLogger(PortalObjectImpl.class);
+ /** . */
+ protected static final int ALL_TYPES_MASK = CONTEXT_MASK | PORTAL_MASK | PAGE_MASK | WINDOW_MASK;
+
// Persistent fields
/** The primary key when the object is persisted */
@@ -63,7 +66,7 @@
// Runtime fields
- private Collection collection;
+ private Map childrenMap;
private Map properties;
private PortalObjectIdImpl id;
private DashboardContext dashboardContext;
@@ -79,11 +82,6 @@
this.listener = null;
}
- void addChild(String name, PortalObjectImpl childObject) throws DuplicatePortalObjectException, IllegalArgumentException
- {
- objectNode.addChild(name, childObject);
- }
-
public Long getKey()
{
return key;
@@ -139,47 +137,34 @@
return copy((PortalObjectImpl)parent, name, deep);
}
- private PortalObjectImpl copy(PortalObjectImpl parent, String name, boolean deep) throws DuplicatePortalObjectException
+ public Collection getChildren()
{
- // Clone this node
- PortalObjectImpl clone = cloneObject();
+ return getChildren(ALL_TYPES_MASK);
+ }
- // Add the clone to the specified parent
- parent.addChild(name, clone);
+ public Collection getChildren(int wantedMask)
+ {
+ /// Correct eventually the mask
+ final int mask = wantedMask & ALL_TYPES_MASK;
- // Clone children recursively
- if (deep)
+ // Compute the lookup cache key
+ Integer key = new Integer(mask);
+
+ //
+ Collection children = null;
+ if (childrenMap == null)
{
- for (Iterator i = getChildren().iterator();i.hasNext();)
- {
- PortalObjectImpl child = (PortalObjectImpl)i.next();
-
- //
- child.copy(clone, child.getName(), true);
- }
+ childrenMap = new HashMap();
}
+ else
+ {
+ children = (Collection)childrenMap.get(key);
+ }
//
- return clone;
- }
-
- protected abstract PortalObjectImpl cloneObject();
-
- public Collection getChildren(int type)
- {
- return getChildren(new Integer(type));
- }
-
- public Collection getChildren()
- {
- return getChildren(null);
- }
-
- public Collection getChildren(final Integer type)
- {
- if (collection == null)
+ if (children == null)
{
- collection = new Collection()
+ children = new Collection()
{
public void clear()
{
@@ -228,7 +213,7 @@
public int size()
{
- if (type == null)
+ if (mask == ALL_TYPES_MASK)
{
return objectNode.getChildren().size();
}
@@ -251,7 +236,7 @@
public Iterator iterator()
{
- return iterator(type);
+ return iterator(mask);
}
public Object[] toArray(Object a[])
@@ -265,7 +250,7 @@
return tmp.toArray(a);
}
- public Iterator iterator(final Integer type)
+ public Iterator iterator(final int mask)
{
return new Iterator()
{
@@ -282,8 +267,8 @@
while (next == null && iterator.hasNext())
{
ObjectNode node = (ObjectNode)iterator.next();
- PortalObject object = node.getObject();
- if (type == null || object.getType() == type.intValue())
+ PortalObjectImpl object = node.getObject();
+ if (mask == ALL_TYPES_MASK || (object.getMask() & mask) != 0)
{
next = object;
}
@@ -308,8 +293,9 @@
};
}
};
+ childrenMap.put(key, children);
}
- return collection;
+ return children;
}
public String getListener()
@@ -426,13 +412,18 @@
return (String)properties.get(name);
}
+ public final boolean isDashboard()
+ {
+ return getDashboardContext() != null;
+ }
+
+ public abstract int getType();
+
public String toString()
{
return objectNode.toString();
}
- public abstract int getType();
-
/** Return the default child of this object based on the declared property that specifies the default object name. */
protected PortalObject getDefaultChild()
{
@@ -444,10 +435,7 @@
return getChild(portalName);
}
- public final boolean isDashboard()
- {
- return getDashboardContext() != null;
- }
+ protected abstract PortalObjectImpl cloneObject();
/**
* Overridable callback.
@@ -456,6 +444,31 @@
{
}
+ protected final int getMask()
+ {
+ return getMask(getType());
+ }
+
+ /**
+ * Returns the mask for this kind of object.
+ */
+ protected final int getMask(int portalObjectType)
+ {
+ switch (portalObjectType)
+ {
+ case TYPE_CONTEXT:
+ return CONTEXT_MASK;
+ case TYPE_PORTAL:
+ return PORTAL_MASK;
+ case TYPE_PAGE:
+ return PAGE_MASK;
+ case TYPE_WINDOW:
+ return WINDOW_MASK;
+ default:
+ throw new IllegalArgumentException("Unknown type " + portalObjectType);
+ }
+ }
+
protected final DashboardContext getDashboardContext()
{
if (dashboardContext == null)
@@ -485,6 +498,35 @@
//
return dashboardContext;
}
+
+ protected final void addChild(String name, PortalObjectImpl childObject) throws DuplicatePortalObjectException, IllegalArgumentException
+ {
+ objectNode.addChild(name, childObject);
+ }
+
+ private PortalObjectImpl copy(PortalObjectImpl parent, String name, boolean deep) throws DuplicatePortalObjectException
+ {
+ // Clone this node
+ PortalObjectImpl clone = cloneObject();
+
+ // Add the clone to the specified parent
+ parent.addChild(name, clone);
+
+ // Clone children recursively
+ if (deep)
+ {
+ for (Iterator i = getChildren().iterator();i.hasNext();)
+ {
+ PortalObjectImpl child = (PortalObjectImpl)i.next();
+
+ //
+ child.copy(clone, child.getName(), true);
+ }
+ }
+
+ //
+ return clone;
+ }
}
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java 2007-02-15 13:43:33 UTC (rev 6296)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java 2007-02-15 13:50:31 UTC (rev 6297)
@@ -52,6 +52,18 @@
/** . */
int TYPE_WINDOW = 3;
+ /** . */
+ int CONTEXT_MASK = 0x00000001;
+
+ /** . */
+ int PORTAL_MASK = 0x00000002;
+
+ /** . */
+ int PAGE_MASK = 0x00000004;
+
+ /** . */
+ int WINDOW_MASK = 0x00000008;
+
/**
* Return the object id unique in the scope of its container.
*
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/command/RenderPageCommand.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/command/RenderPageCommand.java 2007-02-15 13:43:33 UTC (rev 6296)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/command/RenderPageCommand.java 2007-02-15 13:50:31 UTC (rev 6297)
@@ -127,7 +127,7 @@
super.create();
// All windows on the page
- windows = new ArrayList(getPage().getChildren(PortalObject.TYPE_WINDOW));
+ windows = new ArrayList(getPage().getChildren(PortalObject.WINDOW_MASK));
//
LayoutService layoutService = context.getController().getPageService().getLayoutService();
19 years, 2 months
JBoss Portal SVN: r6296 - trunk/theme/src/main/org/jboss/portal/theme.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-02-15 08:43:33 -0500 (Thu, 15 Feb 2007)
New Revision: 6296
Modified:
trunk/theme/src/main/org/jboss/portal/theme/PageRendition.java
Log:
Display naavigation tabs in maximized mode: [JBPORTAL-1265]
Modified: trunk/theme/src/main/org/jboss/portal/theme/PageRendition.java
===================================================================
--- trunk/theme/src/main/org/jboss/portal/theme/PageRendition.java 2007-02-15 13:16:28 UTC (rev 6295)
+++ trunk/theme/src/main/org/jboss/portal/theme/PageRendition.java 2007-02-15 13:43:33 UTC (rev 6296)
@@ -32,7 +32,10 @@
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
+import java.util.Collection;
import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -72,12 +75,27 @@
WindowResult res = pageResult.getWindowResult(windowId);
if (WindowState.MAXIMIZED.equals(res.getWindowState()))
{
+ // TODO: Deep clone instead ?
PageResult newRes = new PageResult(
pageResult.getPageName(),
pageResult.getPageProperties(),
pageResult.getPortalProperties());
newRes.setThemeResult(pageResult.getThemeResult());
-
+ Collection set = pageResult.getWindowContextMap().values();
+ Iterator setIterator = set.iterator();
+ while (setIterator.hasNext())
+ {
+ WindowContext windowContext = (WindowContext)setIterator.next();
+ newRes.addWindowContext(windowContext);
+ }
+ Map map = pageResult.getWindowResultMap();
+ Iterator keyIterator = map.keySet().iterator();
+ while (keyIterator.hasNext())
+ {
+ Object key = keyIterator.next();
+ newRes.addWindowResult(key, (WindowResult)map.get(key));
+ }
+
//
WindowContext ctx = pageResult.getWindowContext(windowId);
19 years, 2 months
JBoss Portal SVN: r6295 - trunk/theme/src/main/org/jboss/portal/theme.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-02-15 08:16:28 -0500 (Thu, 15 Feb 2007)
New Revision: 6295
Modified:
trunk/theme/src/main/org/jboss/portal/theme/PageRendition.java
Log:
Theme should be applied on maximized windows: [JBPORTAL-1265]
Modified: trunk/theme/src/main/org/jboss/portal/theme/PageRendition.java
===================================================================
--- trunk/theme/src/main/org/jboss/portal/theme/PageRendition.java 2007-02-15 13:00:45 UTC (rev 6294)
+++ trunk/theme/src/main/org/jboss/portal/theme/PageRendition.java 2007-02-15 13:16:28 UTC (rev 6295)
@@ -76,6 +76,7 @@
pageResult.getPageName(),
pageResult.getPageProperties(),
pageResult.getPortalProperties());
+ newRes.setThemeResult(pageResult.getThemeResult());
//
WindowContext ctx = pageResult.getWindowContext(windowId);
19 years, 2 months