JBoss Portal SVN: r6775 - trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-03-20 11:10:11 -0400 (Tue, 20 Mar 2007)
New Revision: 6775
Modified:
trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/PortalLib.java
Log:
JDK 1.4 code...
Modified: trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/PortalLib.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/PortalLib.java 2007-03-20 13:18:41 UTC (rev 6774)
+++ trunk/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/PortalLib.java 2007-03-20 15:10:11 UTC (rev 6775)
@@ -136,8 +136,8 @@
{
if (toto != null)
{
- toto = toto.replace("<", "<");
- toto = toto.replace(">", ">");
+ toto = toto.replaceAll("<", "<");
+ toto = toto.replaceAll(">", ">");
}
return toto;
}
17 years, 3 months
JBoss Portal SVN: r6774 - trunk/core-samples/src/main/org/jboss/portal/core/portlet/test.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-03-20 09:18:41 -0400 (Tue, 20 Mar 2007)
New Revision: 6774
Modified:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/ExceptionPortlet.java
Log:
slight improvements in ExceptionPortlet
Modified: trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/ExceptionPortlet.java
===================================================================
--- trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/ExceptionPortlet.java 2007-03-20 13:02:58 UTC (rev 6773)
+++ trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/ExceptionPortlet.java 2007-03-20 13:18:41 UTC (rev 6774)
@@ -22,13 +22,15 @@
******************************************************************************/
package org.jboss.portal.core.portlet.test;
-import org.jboss.portlet.JBossPortlet;
-import org.jboss.portlet.JBossRenderRequest;
-import org.jboss.portlet.JBossRenderResponse;
-
import javax.portlet.PortletException;
import javax.portlet.PortletSecurityException;
import javax.portlet.PortletURL;
+import javax.portlet.GenericPortlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletRequest;
import java.io.IOException;
import java.io.PrintWriter;
@@ -36,30 +38,17 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 5448 $
*/
-public class ExceptionPortlet extends JBossPortlet
+public class ExceptionPortlet extends GenericPortlet
{
- protected void doView(JBossRenderRequest req, JBossRenderResponse resp) throws PortletException, PortletSecurityException, IOException
+ public void processAction(ActionRequest req, ActionResponse resp) throws PortletException, PortletSecurityException, IOException
{
- String op = req.getParameter("op");
+ throwException(req);
+ }
- // Throw any required exception
- if ("portletexception".equals(op))
- {
- throw new PortletException();
- }
- if ("portletsecurityexception".equals(op))
- {
- throw new PortletSecurityException("");
- }
- if ("ioexception".equals(op))
- {
- throw new IOException();
- }
- if ("runtimeexception".equals(op))
- {
- throw new RuntimeException();
- }
+ protected void doView(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, IOException
+ {
+ throwException(req);
//
resp.setContentType("text/html");
@@ -79,6 +68,8 @@
writer.write("<div><a href=\"" + renderURL + "\">render IOException</a></div>");
renderURL.setParameter("op", "runtimeexception");
writer.write("<div><a href=\"" + renderURL + "\">render RuntimeException</a></div>");
+ actionURL.setParameter("op", "error");
+ writer.write("<div><a href=\"" + renderURL + "\">render Error</a></div>");
actionURL.setParameter("op", "portletexception");
writer.write("<div><a href=\"" + actionURL + "\">action PortletException</a></div>");
actionURL.setParameter("op", "portletsecurityexception");
@@ -87,7 +78,36 @@
writer.write("<div><a href=\"" + actionURL + "\">action IOException</a></div>");
actionURL.setParameter("op", "runtimeexception");
writer.write("<div><a href=\"" + actionURL + "\">action RuntimeException</a></div>");
+ actionURL.setParameter("op", "error");
+ writer.write("<div><a href=\"" + actionURL + "\">action Error</a></div>");
writer.write("</div>");
writer.write("</p>");
}
+
+ private void throwException(PortletRequest req) throws PortletException, IOException
+ {
+ String op = req.getParameter("op");
+
+ // Throw any required exception
+ if ("portletexception".equals(op))
+ {
+ throw new PortletException();
+ }
+ if ("portletsecurityexception".equals(op))
+ {
+ throw new PortletSecurityException("");
+ }
+ if ("ioexception".equals(op))
+ {
+ throw new IOException();
+ }
+ if ("runtimeexception".equals(op))
+ {
+ throw new RuntimeException();
+ }
+ if ("error".equals(op))
+ {
+ throw new Error();
+ }
+ }
}
17 years, 3 months
JBoss Portal SVN: r6773 - trunk/core/src/resources/portal-core-sar/conf/hibernate/portal.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-03-20 09:02:58 -0400 (Tue, 20 Mar 2007)
New Revision: 6773
Modified:
trunk/core/src/resources/portal-core-sar/conf/hibernate/portal/domain.hbm.xml
Log:
revert wrong change of JBP_PORTAL_OBJECT table name
Modified: trunk/core/src/resources/portal-core-sar/conf/hibernate/portal/domain.hbm.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/conf/hibernate/portal/domain.hbm.xml 2007-03-20 11:16:55 UTC (rev 6772)
+++ trunk/core/src/resources/portal-core-sar/conf/hibernate/portal/domain.hbm.xml 2007-03-20 13:02:58 UTC (rev 6773)
@@ -89,7 +89,7 @@
</class>
<class
name="org.jboss.portal.core.impl.model.portal.PortalObjectImpl"
- table="JBP_PORTAL_NODE">
+ table="JBP_PORTAL_OBJECT">
<cache usage="@portal.hibernate.cache.usage@"/>
<id
name="key"
17 years, 3 months
JBoss Portal SVN: r6772 - trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/editor.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-03-20 07:16:55 -0400 (Tue, 20 Mar 2007)
New Revision: 6772
Modified:
trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/editor/main.jsp
Log:
fix cms content editor on safari because JSP url where generated using <p:portletURL/> which was causing extra space in the HREF attribute of link and causing issues.
Modified: trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/editor/main.jsp
===================================================================
--- trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/editor/main.jsp 2007-03-20 10:11:40 UTC (rev 6771)
+++ trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/editor/main.jsp 2007-03-20 11:16:55 UTC (rev 6772)
@@ -5,6 +5,7 @@
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.StringTokenizer" %>
+<%@ page import="javax.portlet.PortletURL" %>
<%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
@@ -17,13 +18,13 @@
List folders = (List)request.getAttribute("folders");
List files = (List)request.getAttribute("files");
String uri = (String)renderRequest.getParameter("uri");
+ PortletURL url = renderResponse.createRenderURL();
+ url.setParameter("op", CMSAdminConstants.OP_MAIN);
+ url.setParameter("path", "/");
%>
<!-- Currently browsing -->
-Browsing: <a href="<portlet:renderURL>
-<portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN %>"/>
-<portlet:param name="path" value="/"/>
- </portlet:renderURL>">Home</a>
+Browsing: <a href="<%= url %>">Home</a>
<%
StringTokenizer parser = new StringTokenizer(sCurrPath, "/");
String sPathBuilder = "";
@@ -33,13 +34,9 @@
sPathBuilder += "/" + sPathChunk;
if (parser.hasMoreTokens())
{
+ url.setParameter("path", sPathBuilder);
%>
-> <a href="
-<portlet:renderURL>
- <portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN %>"/>
- <portlet:param name="path" value="<%= sPathBuilder %>"/>
-</portlet:renderURL>
-"><%= sPathChunk %>
+> <a href="<%= url %>"><%= sPathChunk %>
</a>
<%
}
@@ -72,15 +69,13 @@
for (int i = 0; i < folders.size(); i++)
{
Folder folder = (Folder)folders.get(i);
+ url.setParameter("path", folder.getBasePath());
%>
<tr onmouseover="this.className='portlet-section-alternate';" onmouseout="this.className='portlet-section-body';">
<td><img
src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/folder.gif"
alt="${n:i18n("CMS_FOLDER")}"
- border="0"> <a href="<portlet:renderURL>
- <portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN %>"/>
- <portlet:param name="path" value="<%= folder.getBasePath() %>"/>
- </portlet:renderURL>"><%=
+ border="0"> <a href="<%= url %>"><%=
folder.getBasePath().substring(folder.getBasePath().lastIndexOf("/") + 1, folder.getBasePath().length()) %>
</a>
</td>
@@ -88,14 +83,17 @@
<%
}
}
-%>
-<%
if (files.size() > 0)
{
for (int j = 0; j < files.size(); j++)
{
File file = (File)files.get(j);
+ PortletURL metaURL = renderResponse.createActionURL();
+ metaURL.setParameter("uri", file.getBasePath());
+ metaURL.setParameter("path", sCurrPath);
+ metaURL.setParameter("meta_action", "select");
+
if ((uri!=null) && (uri.equals(file.getBasePath())))
{
out.println("<tr class=\"portlet-section-selected\">");
@@ -105,13 +103,10 @@
out.println("<tr onmouseover=\"this.className='portlet-section-alternate';\" onmouseout=\"this.className='portlet-section-body';\">");
}
%>
+<tr>
<td><img src="<%= renderRequest.getContextPath() + CMSAdminConstants.DEFAULT_IMAGES_PATH%>/file.gif"
alt="${n:i18n("CMS_FILE")}"
- border="0"> <a href="<portlet:actionURL>
- <portlet:param name="uri" value="<%= file.getBasePath() %>"/>
- <portlet:param name="path" value="<%= sCurrPath %>"/>
- <portlet:param name="meta_action" value="select"/>
- </portlet:actionURL>"><%=
+ border="0"> <a href="<%= metaURL %>"><%=
file.getBasePath().substring(file.getBasePath().lastIndexOf("/") + 1, file.getBasePath().length()) %>
</a>
</td>
17 years, 3 months
JBoss Portal SVN: r6771 - in trunk: identity/src/resources/test/config/extrole and 2 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-03-20 06:11:40 -0400 (Tue, 20 Mar 2007)
New Revision: 6771
Added:
trunk/identity/src/resources/test/config/extrole/openldap-config.xml
trunk/identity/src/resources/test/config/extrole/rhds-config.xml
trunk/identity/src/resources/test/config/extuser/openldap-config.xml
trunk/identity/src/resources/test/config/extuser/rhds-config.xml
Modified:
trunk/identity/build.xml
trunk/identity/src/resources/test/config/extrole/opends-config.xml
trunk/identity/src/resources/test/config/extuser/opends-config.xml
trunk/test/src/etc/directories-extrolemodule.xml
trunk/test/src/etc/directories-extusermodule.xml
Log:
- test LDAP ext modules on OpenLDAP and RH Directory
Modified: trunk/identity/build.xml
===================================================================
--- trunk/identity/build.xml 2007-03-20 09:24:08 UTC (rev 6770)
+++ trunk/identity/build.xml 2007-03-20 10:11:40 UTC (rev 6771)
@@ -453,14 +453,14 @@
<x-test>
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.db.DBIdentityTestCase"/>-->
- <test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPIdentityTestCase"/>
+ <!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPIdentityTestCase"/>-->
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPSimpleUserModuleTestCase"/>-->
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPSimpleRoleModuleTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPStaticGroupMembershipModuleTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPStaticRoleMembershipModuleTestCase"/>
- <test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPUserProfileModuleTestCase"/>
- <test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPExtUserModuleTestCase"/>-->
- <!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPExtRoleModuleTestCase"/>-->
+ <test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPUserProfileModuleTestCase"/>-->
+ <test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPExtUserModuleTestCase"/>
+ <test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPExtRoleModuleTestCase"/>
</x-test>
<x-classpath>
<pathelement location="${build.lib}/portal-identity-lib.jar"/>
Modified: trunk/identity/src/resources/test/config/extrole/opends-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/extrole/opends-config.xml 2007-03-20 09:24:08 UTC (rev 6770)
+++ trunk/identity/src/resources/test/config/extrole/opends-config.xml 2007-03-20 10:11:40 UTC (rev 6771)
@@ -120,19 +120,5 @@
<value>SUBTREE_SCOPE</value>
</option>
</option-group>
- <option-group>
- <group-name>roleCreateAttibutes</group-name>
- <!--Schema requires those to have initial value-->
- <option>
- <name>cn</name>
- <value>none</value>
- </option>
- <!--Some directory servers require this attribute to be valid DN-->
- <!--For safety reasons point to the admin user here-->
- <option>
- <name>member</name>
- <value>uid=admin,ou=People,dc=example,dc=com</value>
- </option>
- </option-group>
</options>
</identity-configuration>
\ No newline at end of file
Added: trunk/identity/src/resources/test/config/extrole/openldap-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/extrole/openldap-config.xml (rev 0)
+++ trunk/identity/src/resources/test/config/extrole/openldap-config.xml 2007-03-20 10:11:40 UTC (rev 6771)
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+ <!--<!DOCTYPE identity-configuration PUBLIC
+ "-//JBoss Portal//DTD JBoss Identity Configuration 1.0//EN"
+ "http://www.jboss.org/portal/dtd/identity-config_1_0.dtd">-->
+
+<identity-configuration>
+ <datasources>
+ <datasource>
+ <name>LDAP</name>
+ <config>
+ <option>
+ <name>host</name>
+ <value>dev39.qa.atl.jboss.com</value>
+ </option>
+ <option>
+ <name>port</name>
+ <value>389</value>
+ </option>
+ <option>
+ <name>adminDN</name>
+ <value>cn=Manager,dc=my-domain,dc=com</value>
+ </option>
+ <option>
+ <name>adminPassword</name>
+ <value>jbossqa</value>
+ </option>
+ </config>
+ </datasource>
+ </datasources>
+ <modules>
+ <module>
+ <!--type used to correctly map in IdentityContext registry-->
+ <type>User</type>
+ <implementation>LDAP</implementation>
+ <class>org.jboss.portal.identity.ldap.LDAPExtUserModuleImpl</class>
+ <config/>
+ </module>
+ <module>
+ <type>Role</type>
+ <implementation>LDAP</implementation>
+ <class>org.jboss.portal.identity.ldap.LDAPExtRoleModuleImpl</class>
+ <config/>
+ </module>
+ <module>
+ <type>Membership</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+
+ <module>
+ <type>UserProfile</type>
+ <implementation>DELEGATING</implementation>
+ <config>
+ <option>
+ <name>profileConfigFile</name>
+ <value>test/config/profile-config.xml</value>
+ </option>
+ <option>
+ <name>ldapModuleJNDIName</name>
+ <value>java:/portal/LDAPUserProfileModule</value>
+ </option>
+ </config>
+ </module>
+ <module>
+ <type>DBDelegateUserProfile</type>
+ <implementation>DB</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>LDAPDelegateUserProfile</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ </modules>
+
+ <options>
+ <option-group>
+ <group-name>common</group-name>
+ <option>
+ <name>userCtxDN</name>
+ <value>ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com</value>
+ </option>
+ <option>
+ <name>roleCtxDN</name>
+ <value>ou=Roles,dc=testsuite,dc=portal,dc=my-domain,dc=com</value>
+ </option>
+ <option>
+ <name>userSearchFilter</name>
+ <value>(uid={0})</value>
+ </option>
+ <option>
+ <name>roleSearchFilter</name>
+ <value><![CDATA[(& (objectClass=groupOfNames) (cn={0}))]]></value>
+ </option>
+ <option>
+ <name>searchScope</name>
+ <value>SUBTREE_SCOPE</value>
+ </option>
+ </option-group>
+ </options>
+</identity-configuration>
\ No newline at end of file
Added: trunk/identity/src/resources/test/config/extrole/rhds-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/extrole/rhds-config.xml (rev 0)
+++ trunk/identity/src/resources/test/config/extrole/rhds-config.xml 2007-03-20 10:11:40 UTC (rev 6771)
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+ <!--<!DOCTYPE identity-configuration PUBLIC
+ "-//JBoss Portal//DTD JBoss Identity Configuration 1.0//EN"
+ "http://www.jboss.org/portal/dtd/identity-config_1_0.dtd">-->
+
+<identity-configuration>
+ <datasources>
+ <datasource>
+ <name>LDAP</name>
+ <config>
+ <option>
+ <name>host</name>
+ <value>dev39.qa.atl.jboss.com</value>
+ </option>
+ <option>
+ <name>port</name>
+ <value>10389</value>
+ </option>
+ <option>
+ <name>adminDN</name>
+ <value>cn=Directory Manager</value>
+ </option>
+ <option>
+ <name>adminPassword</name>
+ <value>qpq123qpq</value>
+ </option>
+ </config>
+ </datasource>
+ </datasources>
+ <modules>
+ <module>
+ <!--type used to correctly map in IdentityContext registry-->
+ <type>User</type>
+ <implementation>LDAP</implementation>
+ <class>org.jboss.portal.identity.ldap.LDAPExtUserModuleImpl</class>
+ <config/>
+ </module>
+ <module>
+ <type>Role</type>
+ <implementation>LDAP</implementation>
+ <class>org.jboss.portal.identity.ldap.LDAPExtRoleModuleImpl</class>
+ <config/>
+ </module>
+ <module>
+ <type>Membership</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+
+ <module>
+ <type>UserProfile</type>
+ <implementation>DELEGATING</implementation>
+ <config>
+ <option>
+ <name>profileConfigFile</name>
+ <value>test/config/profile-config.xml</value>
+ </option>
+ <option>
+ <name>ldapModuleJNDIName</name>
+ <value>java:/portal/LDAPUserProfileModule</value>
+ </option>
+ </config>
+ </module>
+ <module>
+ <type>DBDelegateUserProfile</type>
+ <implementation>DB</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>LDAPDelegateUserProfile</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ </modules>
+
+ <options>
+ <option-group>
+ <group-name>common</group-name>
+ <option>
+ <name>userCtxDN</name>
+ <value>ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ <option>
+ <name>roleCtxDN</name>
+ <value>ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ <option>
+ <name>userSearchFilter</name>
+ <value>(uid={0})</value>
+ </option>
+ <option>
+ <name>roleSearchFilter</name>
+ <value><![CDATA[(& (objectClass=groupOfNames) (cn={0}))]]></value>
+ </option>
+ <option>
+ <name>searchScope</name>
+ <value>SUBTREE_SCOPE</value>
+ </option>
+ </option-group>
+ </options>
+</identity-configuration>
\ No newline at end of file
Modified: trunk/identity/src/resources/test/config/extuser/opends-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/extuser/opends-config.xml 2007-03-20 09:24:08 UTC (rev 6770)
+++ trunk/identity/src/resources/test/config/extuser/opends-config.xml 2007-03-20 10:11:40 UTC (rev 6771)
@@ -111,19 +111,5 @@
<value>ou=Roles,dc=example,dc=com</value>
</option>
</option-group>
- <option-group>
- <group-name>roleCreateAttibutes</group-name>
- <!--Schema requires those to have initial value-->
- <option>
- <name>cn</name>
- <value>none</value>
- </option>
- <!--Some directory servers require this attribute to be valid DN-->
- <!--For safety reasons point to the admin user here-->
- <option>
- <name>member</name>
- <value>uid=admin,ou=People,dc=example,dc=com</value>
- </option>
- </option-group>
</options>
</identity-configuration>
\ No newline at end of file
Added: trunk/identity/src/resources/test/config/extuser/openldap-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/extuser/openldap-config.xml (rev 0)
+++ trunk/identity/src/resources/test/config/extuser/openldap-config.xml 2007-03-20 10:11:40 UTC (rev 6771)
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+ <!--<!DOCTYPE identity-configuration PUBLIC
+ "-//JBoss Portal//DTD JBoss Identity Configuration 1.0//EN"
+ "http://www.jboss.org/portal/dtd/identity-config_1_0.dtd">-->
+
+<identity-configuration>
+ <datasources>
+ <datasource>
+ <name>LDAP</name>
+ <config>
+ <option>
+ <name>host</name>
+ <value>dev39.qa.atl.jboss.com</value>
+ </option>
+ <option>
+ <name>port</name>
+ <value>389</value>
+ </option>
+ <option>
+ <name>adminDN</name>
+ <value>cn=Manager,dc=my-domain,dc=com</value>
+ </option>
+ <option>
+ <name>adminPassword</name>
+ <value>jbossqa</value>
+ </option>
+ </config>
+ </datasource>
+ </datasources>
+ <modules>
+ <module>
+ <!--type used to correctly map in IdentityContext registry-->
+ <type>User</type>
+ <implementation>LDAP</implementation>
+ <class>org.jboss.portal.identity.ldap.LDAPExtUserModuleImpl</class>
+ <config/>
+ </module>
+ <module>
+ <type>Role</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>Membership</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+
+ <module>
+ <type>UserProfile</type>
+ <implementation>DELEGATING</implementation>
+ <config>
+ <option>
+ <name>profileConfigFile</name>
+ <value>test/config/profile-config.xml</value>
+ </option>
+ <option>
+ <name>ldapModuleJNDIName</name>
+ <value>java:/portal/LDAPUserProfileModule</value>
+ </option>
+ </config>
+ </module>
+ <module>
+ <type>DBDelegateUserProfile</type>
+ <implementation>DB</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>LDAPDelegateUserProfile</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ </modules>
+
+ <options>
+ <option-group>
+ <group-name>common</group-name>
+ <option>
+ <name>userCtxDN</name>
+ <value>ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com</value>
+ </option>
+ <option>
+ <name>roleCtxDN</name>
+ <value>ou=Roles,dc=testsuite,dc=portal,dc=my-domain,dc=com</value>
+ </option>
+ <option>
+ <name>userSearchFilter</name>
+ <value>(uid={0})</value>
+ </option>
+ </option-group>
+ </options>
+</identity-configuration>
\ No newline at end of file
Added: trunk/identity/src/resources/test/config/extuser/rhds-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/extuser/rhds-config.xml (rev 0)
+++ trunk/identity/src/resources/test/config/extuser/rhds-config.xml 2007-03-20 10:11:40 UTC (rev 6771)
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+ <!--<!DOCTYPE identity-configuration PUBLIC
+ "-//JBoss Portal//DTD JBoss Identity Configuration 1.0//EN"
+ "http://www.jboss.org/portal/dtd/identity-config_1_0.dtd">-->
+
+<identity-configuration>
+ <datasources>
+ <datasource>
+ <name>LDAP</name>
+ <config>
+ <option>
+ <name>host</name>
+ <value>dev39.qa.atl.jboss.com</value>
+ </option>
+ <option>
+ <name>port</name>
+ <value>10389</value>
+ </option>
+ <option>
+ <name>adminDN</name>
+ <value>cn=Directory Manager</value>
+ </option>
+ <option>
+ <name>adminPassword</name>
+ <value>qpq123qpq</value>
+ </option>
+ </config>
+ </datasource>
+ </datasources>
+ <modules>
+ <module>
+ <!--type used to correctly map in IdentityContext registry-->
+ <type>User</type>
+ <implementation>LDAP</implementation>
+ <class>org.jboss.portal.identity.ldap.LDAPExtUserModuleImpl</class>
+ <config/>
+ </module>
+ <module>
+ <type>Role</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>Membership</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+
+ <module>
+ <type>UserProfile</type>
+ <implementation>DELEGATING</implementation>
+ <config>
+ <option>
+ <name>profileConfigFile</name>
+ <value>test/config/profile-config.xml</value>
+ </option>
+ <option>
+ <name>ldapModuleJNDIName</name>
+ <value>java:/portal/LDAPUserProfileModule</value>
+ </option>
+ </config>
+ </module>
+ <module>
+ <type>DBDelegateUserProfile</type>
+ <implementation>DB</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>LDAPDelegateUserProfile</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ </modules>
+
+ <options>
+ <option-group>
+ <group-name>common</group-name>
+ <option>
+ <name>userCtxDN</name>
+ <value>ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ <option>
+ <name>roleCtxDN</name>
+ <value>ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ <option>
+ <name>userSearchFilter</name>
+ <value>(uid={0})</value>
+ </option>
+ </option-group>
+ </options>
+</identity-configuration>
\ No newline at end of file
Modified: trunk/test/src/etc/directories-extrolemodule.xml
===================================================================
--- trunk/test/src/etc/directories-extrolemodule.xml 2007-03-20 09:24:08 UTC (rev 6770)
+++ trunk/test/src/etc/directories-extrolemodule.xml 2007-03-20 10:11:40 UTC (rev 6771)
@@ -24,7 +24,7 @@
<directories>
<directory>
<directory-name>OpenDS</directory-name>
- <description>OpenDS service deployed on JBoss AS as an mbean - StaticRoleMembership config</description>
+ <description>OpenDS service deployed on JBoss AS as an mbean</description>
<config-file>test/config/extrole/opends-config.xml</config-file>
<host>localhost</host>
<port>10389</port>
@@ -34,52 +34,36 @@
<populate-ldif>ldap/ldif/initial-tests-qa-opends.ldif</populate-ldif>
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
- <!--<directory>
- <directory-name>RedHatDS</directory-name>
- <description>RedHat Directory in QA Labs (need vpn access) - StaticGroupMembership config</description>
-
- <config-file>test/config/identity/rhds-config.xml</config-file>
- <host>dev39.qa.atl.jboss.com</host>
- <port>10389</port>
- <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
- <admin-dn>cn=Directory Manager</admin-dn>
- <admin-password>qpq123qpq</admin-password>
-
- <populate-ldif>ldap/ldif/initial-tests-notpopulated.ldif</populate-ldif>
-
- <cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
- </directory>
<directory>
<directory-name>RedHatDS</directory-name>
- <description>RedHat Directory in QA Labs (need vpn access) - StaticRoleMembership config</description>
+ <description>RedHat Directory in QA Labs (need vpn access)</description>
- <config-file>test/config/identity/rhds-config-staticrole.xml</config-file>
+ <config-file>test/config/extrole/rhds-config.xml</config-file>
<host>dev39.qa.atl.jboss.com</host>
<port>10389</port>
<context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>qpq123qpq</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-notpopulated.ldif</populate-ldif>
+ <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
</directory>
-
<directory>
<directory-name>OpenLDAP</directory-name>
- <description>OpenLDAP Directory in QA Labs (need vpn access) - StaticGroupMembership config</description>
+ <description>OpenLDAP Directory in QA Labs (need vpn access)</description>
- <config-file>test/config/identity/openldap-config.xml</config-file>
+ <config-file>test/config/extrole/openldap-config.xml</config-file>
<host>dev39.qa.atl.jboss.com</host>
<port>389</port>
<context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
<admin-dn>cn=Manager,dc=my-domain,dc=com</admin-dn>
<admin-password>jbossqa</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-notpopulated-openldap.ldif</populate-ldif>
+ <populate-ldif>ldap/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
- </directory>-->
+ </directory>
<!--<directory>
<directory-name>MSAD</directory-name>
<description>Microsoft Active Directory in QA Labs (need vpn access)</description>
Modified: trunk/test/src/etc/directories-extusermodule.xml
===================================================================
--- trunk/test/src/etc/directories-extusermodule.xml 2007-03-20 09:24:08 UTC (rev 6770)
+++ trunk/test/src/etc/directories-extusermodule.xml 2007-03-20 10:11:40 UTC (rev 6771)
@@ -24,7 +24,7 @@
<directories>
<directory>
<directory-name>OpenDS</directory-name>
- <description>OpenDS service deployed on JBoss AS as an mbean - StaticRoleMembership config</description>
+ <description>OpenDS service deployed on JBoss AS as an mbean</description>
<config-file>test/config/extuser/opends-config.xml</config-file>
<host>localhost</host>
<port>10389</port>
@@ -34,52 +34,36 @@
<populate-ldif>ldap/ldif/initial-tests-qa-opends.ldif</populate-ldif>
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
- <!--<directory>
- <directory-name>RedHatDS</directory-name>
- <description>RedHat Directory in QA Labs (need vpn access) - StaticGroupMembership config</description>
-
- <config-file>test/config/identity/rhds-config.xml</config-file>
- <host>dev39.qa.atl.jboss.com</host>
- <port>10389</port>
- <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
- <admin-dn>cn=Directory Manager</admin-dn>
- <admin-password>qpq123qpq</admin-password>
-
- <populate-ldif>ldap/ldif/initial-tests-notpopulated.ldif</populate-ldif>
-
- <cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
- </directory>
<directory>
<directory-name>RedHatDS</directory-name>
- <description>RedHat Directory in QA Labs (need vpn access) - StaticRoleMembership config</description>
-
- <config-file>test/config/identity/rhds-config-staticrole.xml</config-file>
+ <description>RedHat Directory in QA Labs (need vpn access)</description>
+ <config-file>test/config/extuser/rhds-config.xml</config-file>
<host>dev39.qa.atl.jboss.com</host>
<port>10389</port>
<context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>qpq123qpq</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-notpopulated.ldif</populate-ldif>
+ <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
</directory>
<directory>
<directory-name>OpenLDAP</directory-name>
- <description>OpenLDAP Directory in QA Labs (need vpn access) - StaticGroupMembership config</description>
+ <description>OpenLDAP Directory in QA Labs (need vpn access)</description>
- <config-file>test/config/identity/openldap-config.xml</config-file>
+ <config-file>test/config/extuser/openldap-config.xml</config-file>
<host>dev39.qa.atl.jboss.com</host>
<port>389</port>
<context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
<admin-dn>cn=Manager,dc=my-domain,dc=com</admin-dn>
<admin-password>jbossqa</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-notpopulated-openldap.ldif</populate-ldif>
+ <populate-ldif>ldap/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
- </directory>-->
+ </directory>
<!--<directory>
<directory-name>MSAD</directory-name>
<description>Microsoft Active Directory in QA Labs (need vpn access)</description>
17 years, 3 months
JBoss Portal SVN: r6770 - in trunk/identity/src/main/org/jboss/portal/identity: ldap and 1 other directory.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-03-20 05:24:08 -0400 (Tue, 20 Mar 2007)
New Revision: 6770
Modified:
trunk/identity/src/main/org/jboss/portal/identity/IdentityConfiguration.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPMembershipModule.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleImpl.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModule.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java
Log:
- code cleanup
- make possible to force LDAP membership module to assign no users to role
Modified: trunk/identity/src/main/org/jboss/portal/identity/IdentityConfiguration.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/IdentityConfiguration.java 2007-03-20 05:36:14 UTC (rev 6769)
+++ trunk/identity/src/main/org/jboss/portal/identity/IdentityConfiguration.java 2007-03-20 09:24:08 UTC (rev 6770)
@@ -31,9 +31,6 @@
public interface IdentityConfiguration
{
- //TODO: isMembershipAttributeRequired
- //TODO: memebershipAttributeEmptyValue
-
public static final String GROUP_COMMON = "common";
public static final String GROUP_CONNECTION = "connection";
@@ -62,14 +59,10 @@
public static final String USER_PRINCIPAL_SUFFIX = "principalDNSuffix";
- //public static final String USER_CONTAINER_DN = "userContainerDN";
-
public static final String USER_UID_ATTRIBUTE_ID = "uidAttributeID";
public static final String USER_PASSWORD_ATTRIBUTE_ID = "passwordAttributeID";
- //public static final String USER_EMAIL_ATTRIBUTE_ID = "emailAttributeID";
-
public static final String USER_CONTEXT_DN = "userCtxDN";
public static final String USER_CONTAINER_DN = USER_CONTEXT_DN;
@@ -82,13 +75,8 @@
public static final String ROLE_DISPLAY_NAME_ATTRIBUTE_ID = "roleDisplayNameAttributeID";
- //TODO:
- public static final String ROLE_RECURSION = "roleRecursion";
-
- //TODO:
public static final String ROLE_SEARCH_FILTER = "roleSearchFilter";
- //TODO:
public static final String ROLE_CONTEXT_DN = "roleCtxDN";
public static final String ROLE_CONTAINER_DN = ROLE_CONTEXT_DN;
@@ -97,10 +85,12 @@
public static final String MEMBERSHIP_ATTRIBUTE_IS_DN = "membershipAttributeIsDN";
- //TODO: check if this is applied to every search in modules
+ public static final String MEMBERSHIP_MEMBERSHIP_ATTRIBUTE_REQUIRED = "membershipAttributeRequired";
+
+ public static final String MEMBERSHIP_MEMBERSHIP_ATTRIBUTE_EMPTY_VALUE = "membershipAttributeEmptyValue";
+
public static final String SEARCH_TIME_LIMIT = "searchTimeLimit";
- //TODO: check if this is applied to role searches in role and membership modules
public static final String SEARCH_SCOPE = "searchScope";
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPMembershipModule.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPMembershipModule.java 2007-03-20 05:36:14 UTC (rev 6769)
+++ trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPMembershipModule.java 2007-03-20 09:24:08 UTC (rev 6770)
@@ -124,4 +124,24 @@
return getIdentityConfiguration().getValue(IdentityConfiguration.MEMBERSHIP_ATTRIBUTE_IS_DN).equals("true");
}
+ protected boolean isMembershipAttributeRequired() throws IdentityException
+ {
+ if (getIdentityConfiguration().getValue(IdentityConfiguration.MEMBERSHIP_MEMBERSHIP_ATTRIBUTE_REQUIRED) == null)
+ {
+ return true;
+ }
+
+ return getIdentityConfiguration().getValue(IdentityConfiguration.MEMBERSHIP_MEMBERSHIP_ATTRIBUTE_REQUIRED).equals("true");
+ }
+
+ protected String getMembershipAttributeValue() throws IdentityException
+ {
+ String value = getIdentityConfiguration().getValue(IdentityConfiguration.MEMBERSHIP_ATTRIBUTE_ID);
+ if (value == null)
+ {
+ return "cn=emptyMembershipValue";
+ }
+ return value;
+ }
+
}
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleImpl.java 2007-03-20 05:36:14 UTC (rev 6769)
+++ trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleImpl.java 2007-03-20 09:24:08 UTC (rev 6770)
@@ -121,7 +121,6 @@
return displayName;
}
- //TODO: testcase this
public void setDisplayName(String name)
{
if (name == null)
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModule.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModule.java 2007-03-20 05:36:14 UTC (rev 6769)
+++ trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModule.java 2007-03-20 09:24:08 UTC (rev 6770)
@@ -268,7 +268,7 @@
}
}
- protected int getRoleRecurtion() throws IdentityException
+ /* protected int getRoleRecurtion() throws IdentityException
{
int recurtion = 0;
String rr = getIdentityConfiguration().getValue(IdentityConfiguration.ROLE_RECURSION);
@@ -284,7 +284,7 @@
}
}
return recurtion;
- }
+ }*/
}
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java 2007-03-20 05:36:14 UTC (rev 6769)
+++ trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java 2007-03-20 09:24:08 UTC (rev 6770)
@@ -319,51 +319,6 @@
}
}
- //TODO:remove this - it's only a fasade to make this implementation compatible with old RoleModule interface
- public Set findRoleMembers(String roleName, int offset, int limit, String userNameFilter) throws IdentityException
- {
- try
- {
- MembershipModule mm = (MembershipModule)getIdentityContext().getObject(IdentityContext.TYPE_MEMBERSHIP_MODULE);
- return mm.findRoleMembers(roleName, offset, limit, userNameFilter);
- }
- catch (IdentityException e)
- {
- throw new IdentityException("Unable to delegate method to MembershipModule: ", e);
- }
-
- }
-
- //TODO:remove this - it's only a fasade to make this implementation compatible with old RoleModule interface
- public void setRoles(User user, Set roles) throws IdentityException
- {
- try
- {
- MembershipModule mm = (MembershipModule)getIdentityContext().getObject(IdentityContext.TYPE_MEMBERSHIP_MODULE);
- mm.assignRoles(user,roles);
- }
- catch (IdentityException e)
- {
- throw new IdentityException("Unable to delegate method to MembershipModule: ", e);
- }
-
- }
-
- //TODO:remove this - it's only a fasade to make this implementation compatible with old RoleModule interface
- public Set getRoles(User user) throws IdentityException
- {
- try
- {
- MembershipModule mm = (MembershipModule)getIdentityContext().getObject(IdentityContext.TYPE_MEMBERSHIP_MODULE);
- return mm.getRoles(user);
- }
- catch (IdentityException e)
- {
- throw new IdentityException("Unable to delegate method to MembershipModule: ", e);
- }
-
- }
-
private Map getAttributesToAdd() throws IdentityException
{
Map attributesToAdd = getIdentityConfiguration().getOptions(IdentityConfiguration.GROUP_ROLE_CREATE_ATTRIBUTES);
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java 2007-03-20 05:36:14 UTC (rev 6769)
+++ trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java 2007-03-20 09:24:08 UTC (rev 6770)
@@ -221,7 +221,7 @@
- if (users.size() == 0)
+ if (users.size() == 0 && isMembershipAttributeRequired())
{
throw new IdentityException("Cannot assigne 0 users to a role using this membership strategy (because some LDAPs " +
"require the member field to be set). ");
@@ -257,12 +257,19 @@
}
catch (ClassCastException e)
{
- throw new IdentityException("Only can add LDAPUserImpl objects", e);
+ throw new IdentityException("Can add only LDAPUserImpl objects", e);
}
}
attrs.put(member);
- getConnectionContext().createInitialContext().modifyAttributes(ldapRole.getDn(), DirContext.REPLACE_ATTRIBUTE, attrs);
+ if (users.size() > 0)
+ {
+ getConnectionContext().createInitialContext().modifyAttributes(ldapRole.getDn(), DirContext.REPLACE_ATTRIBUTE, attrs);
+ }
+ else
+ {
+ getConnectionContext().createInitialContext().modifyAttributes(ldapRole.getDn(), DirContext.REMOVE_ATTRIBUTE, attrs);
+ }
}
catch (NamingException e)
{
@@ -391,7 +398,6 @@
}
- //TODO: Implement usage of conditions!
public Set findRoleMembers(String roleName, int offset, int limit, String userNameFilter) throws IdentityException
{
//throw new UnsupportedOperationException("Not yet implemented");
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java 2007-03-20 05:36:14 UTC (rev 6769)
+++ trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java 2007-03-20 09:24:08 UTC (rev 6770)
@@ -242,7 +242,7 @@
}
catch(ClassCastException e)
{
- throw new IdentityException("Only can add LDAPUserImpl objects", e);
+ throw new IdentityException("Can add only LDAPUserImpl objects", e);
}
}
@@ -380,10 +380,9 @@
}
- //TODO: Implement usage of conditions
public Set findRoleMembers(String roleName, int offset, int limit, String userNameFilter) throws IdentityException
{
- //throw new UnsupportedOperationException("Not yet implemented");
+
Role role = getRoleModule().findRoleByName(roleName);
//if exception was thrown - propagate it, if not....
if (role != null)
17 years, 3 months
JBoss Portal SVN: r6769 - in trunk/build/ide/intellij/idea60/modules: core-admin and 4 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-03-20 01:36:14 -0400 (Tue, 20 Mar 2007)
New Revision: 6769
Modified:
trunk/build/ide/intellij/idea60/modules/core-admin/core-admin.iml
trunk/build/ide/intellij/idea60/modules/core/core.iml
trunk/build/ide/intellij/idea60/modules/portlet-server/portlet-server.iml
trunk/build/ide/intellij/idea60/modules/portlet/portlet.iml
trunk/build/ide/intellij/idea60/modules/widget/widget.iml
trunk/build/ide/intellij/idea60/modules/wsrp/wsrp.iml
Log:
- Updated modules.
Modified: trunk/build/ide/intellij/idea60/modules/core/core.iml
===================================================================
--- trunk/build/ide/intellij/idea60/modules/core/core.iml 2007-03-20 05:35:18 UTC (rev 6768)
+++ trunk/build/ide/intellij/idea60/modules/core/core.iml 2007-03-20 05:36:14 UTC (rev 6769)
@@ -259,6 +259,7 @@
<orderEntry type="module" module-name="registration" />
<orderEntry type="module" module-name="workflow" />
<orderEntry type="module" module-name="portlet-federation" />
+ <orderEntry type="module" module-name="portlet-server" />
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified: trunk/build/ide/intellij/idea60/modules/core-admin/core-admin.iml
===================================================================
--- trunk/build/ide/intellij/idea60/modules/core-admin/core-admin.iml 2007-03-20 05:35:18 UTC (rev 6768)
+++ trunk/build/ide/intellij/idea60/modules/core-admin/core-admin.iml 2007-03-20 05:36:14 UTC (rev 6769)
@@ -112,15 +112,6 @@
</orderEntry>
<orderEntry type="module" module-name="bridge" />
<orderEntry type="module" module-name="server" />
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-log4j/lib/log4j.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified: trunk/build/ide/intellij/idea60/modules/portlet/portlet.iml
===================================================================
--- trunk/build/ide/intellij/idea60/modules/portlet/portlet.iml 2007-03-20 05:35:18 UTC (rev 6768)
+++ trunk/build/ide/intellij/idea60/modules/portlet/portlet.iml 2007-03-20 05:36:14 UTC (rev 6769)
@@ -10,6 +10,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="server" />
<orderEntry type="module-library">
<library>
<CLASSES>
@@ -20,6 +21,7 @@
</library>
</orderEntry>
<orderEntry type="module" module-name="common" />
+ <orderEntry type="module" module-name="security" />
<orderEntry type="module-library">
<library>
<CLASSES>
@@ -138,6 +140,7 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module" module-name="jems" />
<orderEntry type="module" module-name="api" />
<orderEntryProperties />
</component>
Modified: trunk/build/ide/intellij/idea60/modules/portlet-server/portlet-server.iml
===================================================================
--- trunk/build/ide/intellij/idea60/modules/portlet-server/portlet-server.iml 2007-03-20 05:35:18 UTC (rev 6768)
+++ trunk/build/ide/intellij/idea60/modules/portlet-server/portlet-server.iml 2007-03-20 05:36:14 UTC (rev 6769)
@@ -82,5 +82,178 @@
<option name="ACTIVE_VCS_NAME" value="svn" />
<option name="USE_PROJECT_VCS" value="false" />
</component>
+ <component name="copyright">
+ <Base>
+ <setting name="state" value="1" />
+ </Base>
+ <LanguageOptions name="$TEMPLATE$">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="true" />
+ <option name="separateAfter" value="true" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="true" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="JBoss, a division of Red Hat Copyright &#36;today.year, Red Hat Middleware, LLC, and individual contributors as indicated by the @authors tag. See the copyright.txt in the distribution for a full listing of individual contributors. This is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this software; if not, write to the Free Software Foundation, Inc., 51 Fr!
anklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF site: http://www.fsf.org." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="4" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="CSS">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="1" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="HTML">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="1" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="JAVA">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="2" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="JSP">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="1" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="JavaScript">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="1" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="Properties">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="1" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="XML">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="2" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ </component>
</module>
Modified: trunk/build/ide/intellij/idea60/modules/widget/widget.iml
===================================================================
--- trunk/build/ide/intellij/idea60/modules/widget/widget.iml 2007-03-20 05:35:18 UTC (rev 6768)
+++ trunk/build/ide/intellij/idea60/modules/widget/widget.iml 2007-03-20 05:36:14 UTC (rev 6769)
@@ -29,34 +29,16 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module" module-name="api" />
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-httpclient/lib/commons-httpclient.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/backport-concurrent/lib/jboss-backport-concurrent.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-log4j/lib/log4j.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
+ <orderEntry type="module" module-name="api" />
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified: trunk/build/ide/intellij/idea60/modules/wsrp/wsrp.iml
===================================================================
--- trunk/build/ide/intellij/idea60/modules/wsrp/wsrp.iml 2007-03-20 05:35:18 UTC (rev 6768)
+++ trunk/build/ide/intellij/idea60/modules/wsrp/wsrp.iml 2007-03-20 05:36:14 UTC (rev 6769)
@@ -7,6 +7,7 @@
<content url="file://$MODULE_DIR$/../../../../../../wsrp">
<sourceFolder url="file://$MODULE_DIR$/../../../../../../wsrp/src/generated" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../../wsrp/src/main" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/../../../../../../wsrp/src/resources/portal-wsrp-war/WEB-INF" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/../../../../../../wsrp/output" />
</content>
<orderEntry type="inheritedJdk" />
@@ -161,10 +162,75 @@
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../thirdparty/hibernate/lib/hibernate3.jar!/" />
</CLASSES>
+ <JAVADOC>
+ <root url="http://www.hibernate.org/hib_docs/v3/api/" />
+ </JAVADOC>
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-myfaces/lib/myfaces-impl.jar!/" />
+ </CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-myfaces/lib/jstl.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-myfaces/lib/myfaces-api.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/facelets/lib/jsf-facelets.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/el/lib/el-api.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/el/lib/el-ri.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../core-admin/src/etc/sun-jsf/jsf-example.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
<javadoc-paths>
<root url="http://java.sun.com/j2ee/1.4/docs/api/" />
17 years, 3 months
JBoss Portal SVN: r6768 - in trunk: server/src/main/org/jboss/portal/server/deployment/jboss and 1 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-03-20 01:35:18 -0400 (Tue, 20 Mar 2007)
New Revision: 6768
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/AddPageAction.java
trunk/server/src/main/org/jboss/portal/server/deployment/jboss/AbstractDeploymentFactory.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RequestPrecursor.java
Log:
- Minor logging improvements.
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/AddPageAction.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/AddPageAction.java 2007-03-20 04:51:51 UTC (rev 6767)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/AddPageAction.java 2007-03-20 05:35:18 UTC (rev 6768)
@@ -22,9 +22,9 @@
******************************************************************************/
package org.jboss.portal.core.admin.ui.actions;
+import org.jboss.logging.Logger;
+import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.PageContainer;
-import org.jboss.portal.core.model.portal.Page;
-import org.apache.log4j.Logger;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
Modified: trunk/server/src/main/org/jboss/portal/server/deployment/jboss/AbstractDeploymentFactory.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/server/deployment/jboss/AbstractDeploymentFactory.java 2007-03-20 04:51:51 UTC (rev 6767)
+++ trunk/server/src/main/org/jboss/portal/server/deployment/jboss/AbstractDeploymentFactory.java 2007-03-20 05:35:18 UTC (rev 6768)
@@ -22,9 +22,9 @@
******************************************************************************/
package org.jboss.portal.server.deployment.jboss;
+import org.jboss.logging.Logger;
+import org.jboss.portal.common.net.URLFilter;
import org.jboss.portal.common.util.Tools;
-import org.jboss.portal.common.net.URLFilter;
-import org.apache.log4j.Logger;
import java.net.URL;
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RequestPrecursor.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RequestPrecursor.java 2007-03-20 04:51:51 UTC (rev 6767)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RequestPrecursor.java 2007-03-20 05:35:18 UTC (rev 6768)
@@ -24,10 +24,10 @@
package org.jboss.portal.wsrp.consumer;
import org.jboss.logging.Logger;
+import org.jboss.portal.common.util.ContentInfo;
import org.jboss.portal.common.util.ParameterValidation;
-import org.jboss.portal.common.util.ContentInfo;
+import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.PortletParametersStateString;
-import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.spi.PortletInvocationContext;
@@ -49,7 +49,8 @@
*/
class RequestPrecursor
{
- Logger log = Logger.getLogger(getClass());
+ private final static Logger log = Logger.getLogger(RequestPrecursor.class);
+
private PortletContext portletContext;
RuntimeContext runtimeContext;
MarkupParams markupParams;
17 years, 3 months
JBoss Portal SVN: r6767 - trunk/core-admin/src/bin/portal-admin-war.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-03-20 00:51:51 -0400 (Tue, 20 Mar 2007)
New Revision: 6767
Modified:
trunk/core-admin/src/bin/portal-admin-war/style.css
Log:
- Improve padding of pagination elements.
Modified: trunk/core-admin/src/bin/portal-admin-war/style.css
===================================================================
--- trunk/core-admin/src/bin/portal-admin-war/style.css 2007-03-20 04:21:33 UTC (rev 6766)
+++ trunk/core-admin/src/bin/portal-admin-war/style.css 2007-03-20 04:51:51 UTC (rev 6767)
@@ -21,10 +21,11 @@
.admin-ui ul.pagination {
margin: 0;
- padding: 4px 0px 3px 0px;
+ padding: .2em;
}
.admin-ui ul.pagination li {
+ text-align: center;
list-style-type: none;
display: inline;
margin-right: 2px;
17 years, 3 months
JBoss Portal SVN: r6766 - in trunk/wsrp/src/main/org/jboss/portal/wsrp: servlet and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-03-20 00:21:33 -0400 (Tue, 20 Mar 2007)
New Revision: 6766
Added:
trunk/wsrp/src/main/org/jboss/portal/wsrp/servlet/UserAccess.java
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java
Log:
- JBPORTAL-1254: Added UserAccess class to encapsulate user information retrieval from request.
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2007-03-20 02:05:40 UTC (rev 6765)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2007-03-20 04:21:33 UTC (rev 6766)
@@ -45,6 +45,7 @@
import org.jboss.portal.wsrp.core.RegistrationContext;
import org.jboss.portal.wsrp.core.ServiceDescription;
import org.jboss.portal.wsrp.core.WSRP_v1_PortletManagement_PortType;
+import org.jboss.portal.wsrp.servlet.UserAccess;
import java.util.Collections;
import java.util.HashMap;
@@ -428,7 +429,8 @@
log.debug("Retrieving portlet '" + portletHandle + "' via getPortletDescription");
GetPortletDescription gpd = WSRPTypeFactory.createGetPortletDescription(getRegistrationContext(), portletContext);
- gpd.setUserContext(null); // todo: deal with user context!!
+ gpd.setUserContext(UserAccess.getUserContext());
+
try
{
PortletDescriptionResponse response = persistentEndpointInfo.getPortletManagementService().getPortletDescription(gpd);
@@ -589,7 +591,7 @@
GetPortletPropertyDescription request = WSRPTypeFactory.createSimpleGetPortletPropertyDescription(portletHandle);
request.setRegistrationContext(getRegistrationContext());
- request.setUserContext(null); // todo: fix me!
+ request.setUserContext(UserAccess.getUserContext());
return service.getPortletPropertyDescription(request);
}
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java 2007-03-20 02:05:40 UTC (rev 6765)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java 2007-03-20 04:21:33 UTC (rev 6766)
@@ -68,6 +68,7 @@
import org.jboss.portal.wsrp.core.WSRP_v1_Registration_PortType;
import org.jboss.portal.wsrp.core.WSRP_v1_ServiceDescription_PortType;
import org.jboss.portal.wsrp.services.ServiceFactory;
+import org.jboss.portal.wsrp.servlet.UserAccess;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
@@ -204,9 +205,8 @@
throw new PortletInvokerException("No portlet '" + portletContext.getId() + "' to clone!");
}
- // todo: deal with user context
ClonePortlet clonePortlet = WSRPTypeFactory.createClonePortlet(getRegistrationContext(),
- WSRPUtils.convertToWSRPPortletContext(portletContext), null);
+ WSRPUtils.convertToWSRPPortletContext(portletContext), UserAccess.getUserContext());
try
{
PortletContext newPortletContext = WSRPUtils.convertToPortalPortletContext(getPortletManagementService().clonePortlet(clonePortlet));
Added: trunk/wsrp/src/main/org/jboss/portal/wsrp/servlet/UserAccess.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/servlet/UserAccess.java (rev 0)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/servlet/UserAccess.java 2007-03-20 04:21:33 UTC (rev 6766)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2007, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.servlet;
+
+import org.jboss.portal.wsrp.WSRPTypeFactory;
+import org.jboss.portal.wsrp.core.UserContext;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ * @since 2.6
+ */
+public class UserAccess
+{
+ public static String getUser()
+ {
+ HttpServletRequest req = ServletAccess.getRequest();
+ return req.getRemoteUser();
+ }
+
+ public static UserContext getUserContext()
+ {
+ String userId = getUser();
+ return userId != null ? WSRPTypeFactory.createUserContext(userId) : null;
+ }
+}
Property changes on: trunk/wsrp/src/main/org/jboss/portal/wsrp/servlet/UserAccess.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
17 years, 3 months