JBoss Portal SVN: r6505 - trunk/wsrp/src/main/org/jboss/portal/wsrp/services.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-03-03 14:23:42 -0500 (Sat, 03 Mar 2007)
New Revision: 6505
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java
Log:
Revert to use openStream for BETA1.
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java 2007-03-03 19:22:03 UTC (rev 6504)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java 2007-03-03 19:23:42 UTC (rev 6505)
@@ -35,12 +35,9 @@
import javax.wsdl.factory.WSDLFactory;
import javax.wsdl.xml.WSDLLocator;
import javax.xml.namespace.QName;
-import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.PrintStream;
import java.net.MalformedURLException;
-import java.net.Socket;
import java.net.URL;
import java.util.Collection;
import java.util.Iterator;
@@ -204,51 +201,17 @@
try
{
- int port = wsdlURL.getPort();
- boolean isSecure = false;
- // check if we use default ports
- if (port == -1)
- {
- port = wsdlURL.getDefaultPort();
- String protocol = wsdlURL.getProtocol();
- if ("https".equals(protocol))
- {
- isSecure = true;
- }
- else
- {
- throw new IllegalArgumentException("Unknown protocol: " + protocol);
- }
- }
-
- String host = wsdlURL.getHost();
- Socket socket = new Socket(host, port);
- socket.setSoTimeout(1000);
-
- // Create a DataInputStream for reading from socket
- DataInputStream din = new DataInputStream(socket.getInputStream());
-
- // Create a PrintStream for writing to socket
- PrintStream pout = new PrintStream(socket.getOutputStream());
-
- // Print get request
- pout.print("GET " + wsdlURL.getFile() + " HTTP" + (isSecure ? "S" : "") + "/1.1\n\n");
-
- InputStream is = Tools.safeBufferedWrapper(din);
+ InputStream is = Tools.safeBufferedWrapper(wsdlURL.openStream());
if (is == null)
{
- String message = "Cannot retrieve WSDL: '" + wsdlURL + "' is not a valid URL.";
- log.info(message);
- throw new IllegalArgumentException(message);
+ throw new IllegalArgumentException("Cannot obtain wsdl from [" + wsdlURL + "]");
}
return new InputSource(is);
}
catch (IOException e)
{
- String message = "Cannot access wsdl from [" + wsdlURL + "], " + e.getMessage();
- log.info(message);
- throw new RuntimeException(message);
+ throw new RuntimeException("Cannot access wsdl from [" + wsdlURL + "], " + e.getMessage());
}
finally
{
17 years, 8 months
JBoss Portal SVN: r6504 - trunk/wsrp/src/main/org/jboss/portal/wsrp/services.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-03-03 14:22:03 -0500 (Sat, 03 Mar 2007)
New Revision: 6504
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java
Log:
Work on JBPORTAL-1279 but does not work properly. Committing to keep work for future reference but will commit new version using openStream for BETA1 scope.
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java 2007-03-03 19:08:28 UTC (rev 6503)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java 2007-03-03 19:22:03 UTC (rev 6504)
@@ -35,8 +35,10 @@
import javax.wsdl.factory.WSDLFactory;
import javax.wsdl.xml.WSDLLocator;
import javax.xml.namespace.QName;
+import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.io.PrintStream;
import java.net.MalformedURLException;
import java.net.Socket;
import java.net.URL;
@@ -54,8 +56,6 @@
private String wsdlDefinitionURL;
- private boolean available;
-
private static final String WSRP_URN = "urn:oasis:names:tc:wsrp:v1:wsdl";
private static final String DEFAULT_SERVICE_NAME = "WSRPService";
@@ -65,6 +65,7 @@
private static final String BASE = "base"; // some WSDL use WSRPBaseService instead of Markup
private static final String MANAGEMENT = "management";
private static final String REGISTRATION = "registration";
+ private boolean available;
public String getWsdlDefinitionURL()
@@ -98,10 +99,9 @@
}
}
-
public boolean isAvailable()
{
- return available && super.isAvailable();
+ return available;
}
private void initServices() throws MalformedURLException
@@ -197,13 +197,44 @@
public InputSource getBaseInputSource()
{
log.info("getBaseInputSource [wsdlUrl=" + wsdlURL + "]");
+
+ // use 1 second time outs and remember previous values
+ String connectTimeOut = System.setProperty("sun.net.client.defaultConnectTimeout", "1000");
+ String readTimeOut = System.setProperty("sun.net.client.defaultReadTimeout", "1000");
+
try
{
- Socket socket = new Socket(wsdlURL.getHost(), wsdlURL.getPort());
- socket.setSoTimeout(10000);
+ int port = wsdlURL.getPort();
+ boolean isSecure = false;
+ // check if we use default ports
+ if (port == -1)
+ {
+ port = wsdlURL.getDefaultPort();
+ String protocol = wsdlURL.getProtocol();
+ if ("https".equals(protocol))
+ {
+ isSecure = true;
+ }
+ else
+ {
+ throw new IllegalArgumentException("Unknown protocol: " + protocol);
+ }
+ }
-// url.setReadTimeout(10000); // would be nice but 1.5 only! :(
- InputStream is = Tools.safeBufferedWrapper(socket.getInputStream());
+ String host = wsdlURL.getHost();
+ Socket socket = new Socket(host, port);
+ socket.setSoTimeout(1000);
+
+ // Create a DataInputStream for reading from socket
+ DataInputStream din = new DataInputStream(socket.getInputStream());
+
+ // Create a PrintStream for writing to socket
+ PrintStream pout = new PrintStream(socket.getOutputStream());
+
+ // Print get request
+ pout.print("GET " + wsdlURL.getFile() + " HTTP" + (isSecure ? "S" : "") + "/1.1\n\n");
+
+ InputStream is = Tools.safeBufferedWrapper(din);
if (is == null)
{
String message = "Cannot retrieve WSDL: '" + wsdlURL + "' is not a valid URL.";
@@ -219,6 +250,13 @@
log.info(message);
throw new RuntimeException(message);
}
+ finally
+ {
+ // restore time outs
+ System.setProperty("sun.net.client.defaultConnectTimeout", connectTimeOut);
+ System.setProperty("sun.net.client.defaultReadTimeout", readTimeOut);
+ }
+
}
public String getBaseURI()
17 years, 8 months
JBoss Portal SVN: r6503 - in docs/trunk/referenceGuide/en: modules and 1 other directory.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-03-03 14:08:28 -0500 (Sat, 03 Mar 2007)
New Revision: 6503
Modified:
docs/trunk/referenceGuide/en/master.xml
docs/trunk/referenceGuide/en/modules/authentication.xml
docs/trunk/referenceGuide/en/modules/identity.xml
docs/trunk/referenceGuide/en/modules/ldap.xml
docs/trunk/referenceGuide/en/modules/migration.xml
docs/trunk/referenceGuide/en/modules/sso.xml
Log:
update
Modified: docs/trunk/referenceGuide/en/master.xml
===================================================================
--- docs/trunk/referenceGuide/en/master.xml 2007-03-03 19:04:10 UTC (rev 6502)
+++ docs/trunk/referenceGuide/en/master.xml 2007-03-03 19:08:28 UTC (rev 6503)
@@ -44,7 +44,7 @@
<author>
<firstname>Boleslaw</firstname>
<surname>Dawidowicz</surname>
- <email>boleslaw.dawidowicz(a)jboss.com</email>
+ <email>boleslaw dot dawidowicz at redhat dot com</email>
</author>
</bookinfo>
<toc/>
Modified: docs/trunk/referenceGuide/en/modules/authentication.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/authentication.xml 2007-03-03 19:04:10 UTC (rev 6502)
+++ docs/trunk/referenceGuide/en/modules/authentication.xml 2007-03-03 19:08:28 UTC (rev 6503)
@@ -3,7 +3,7 @@
<author>
<firstname>Boleslaw</firstname>
<surname>Dawidowicz</surname>
- <email>boleslaw.dawidowicz at jboss dot com</email>
+ <email>boleslaw dot dawidowicz at redhat dot com</email>
</author>
</chapterinfo>
<title>Authentication</title>
Modified: docs/trunk/referenceGuide/en/modules/identity.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/identity.xml 2007-03-03 19:04:10 UTC (rev 6502)
+++ docs/trunk/referenceGuide/en/modules/identity.xml 2007-03-03 19:08:28 UTC (rev 6503)
@@ -3,7 +3,7 @@
<author>
<firstname>Boleslaw</firstname>
<surname>Dawidowicz</surname>
- <email>boleslaw.dawidowicz at jboss dot com</email>
+ <email>boleslaw dot dawidowicz at redhat dot com</email>
</author>
</chapterinfo>
<title>JBoss Portal Identity management</title>
@@ -777,11 +777,44 @@
</sect1>
<sect1>
<title>Identity modules implementations</title>
- <para></para>
+ <note>Identity modules implementations related to LDAP are described in this <link linkend="ldap.ldap_identity_modules">section</link></note>
+ <sect2>
+ <title>Database modules</title>
+ <para>JBoss portal comes with a set of database related identity modules implementations done using Hibernate - those are configured
+ by default. Those are not very
+ configurable in <emphasis>identity-config.xml</emphasis> file. The reason is that to keep backwards compatibility of database schema with previous
+ portal version, we reused most of hibernate implementation. If you want to trigger hibernate mappings you should look into files in
+ <emphasis role="bold">jboss-portal.sar/conf/hibernate</emphasis>. Also those modules rely on hibernate <emphasis>SessionFactory</emphasis> components
+ that are created in <emphasis>SessionFactoryBinder</emphasis> mbeans defined in <emphasis>jboss-portal.sar/META-INF/jboss-service.xml</emphasis></para>
+ <para>Classes implementing identity modules:
+ <itemizedlist>
+ <listitem>
+ <emphasis role="bold">org.jboss.portal.identity.db.HibernateUserModuleImpl</emphasis> - implementaing <emphasis>UserModule</emphasis> interface
+ </listitem>
+ <listitem>
+ <emphasis role="bold">org.jboss.portal.identity.db.HibernateRoleModuleImpl</emphasis> - implementaing <emphasis>RoleModule</emphasis> interface
+ </listitem>
+ <listitem>
+ <emphasis role="bold">org.jboss.portal.identity.db.HibernateMembershipModuleImpl</emphasis> - implementaing <emphasis>MembershipModule</emphasis> interface
+ </listitem>
+ <listitem>
+ <emphasis role="bold">org.jboss.portal.identity.db.HibernateUserProfileModuleImpl</emphasis> - implementaing <emphasis>UserProfileModule</emphasis> interface
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>For each of those modules you can alter two config options:
+ <itemizedlist>
+ <listitem>
+ <emphasis>sessionFactoryJNDIName</emphasis> - JNDI name under which hibernate SessionFactory object is registered
+ </listitem>
+ <listitem>
+ <emphasis>jndiName</emphasis> - JNDI name under which this module should be registered
+ </listitem>
+ </itemizedlist>
+ </para>
+ </sect2>
+ <sect2>
+ <title>Delegating UserProfile module</title>
+ </sect2>
</sect1>
- <sect1>
- <title>Possible configuration scenarios with LDAP and RDBMS</title>
- <para>TODO:</para>
- </sect1>
-
</chapter>
Modified: docs/trunk/referenceGuide/en/modules/ldap.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/ldap.xml 2007-03-03 19:04:10 UTC (rev 6502)
+++ docs/trunk/referenceGuide/en/modules/ldap.xml 2007-03-03 19:08:28 UTC (rev 6503)
@@ -3,11 +3,13 @@
<author>
<firstname>Boleslaw</firstname>
<surname>Dawidowicz</surname>
- <email>boleslaw.dawidowicz at jboss dot com</email>
+ <email>boleslaw dot dawidowicz at redhat dot com</email>
</author>
</chapterinfo>
<title>LDAP</title>
<para>This chapter describes how to setup LDAP support in JBoss Portal</para>
+ <note>To be able to fully understand this chapter you should study <link linkend="identity">JBoss Portal Identity management</link> and
+ <link linkend="authentication">Authentication</link> chapters before</note>
<sect1>
<title>How to enable LDAP usage in JBoss Portal</title>
<para>We'll describe here the simple steps that you'll need to enable LDAP support in JBoss Portal.
@@ -15,7 +17,7 @@
<para>There are two ways to achieve this:</para>
<itemizedlist>
<listitem>
- <para>In
+ <para>
<emphasis role="bold">jboss-porta.sar/META-INF/jboss-service.xml</emphasis>
in section:
</para>
@@ -147,13 +149,13 @@
</para>
</sect2>
</sect1>
- <sect1>
- <title>Place holder 2</title>
- <para>TODO:</para>
+ <sect1 id="ldap.ldap_identity_modules">
+ <title>LDAP Identity Modules</title>
+ <para>TODO:</para>
</sect1>
<sect1>
- <title>Place holder 3</title>
- <para>TODO:</para>
+ <title>Place holder 3</title>
+ <para>TODO:</para>
</sect1>
</chapter>
Modified: docs/trunk/referenceGuide/en/modules/migration.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/migration.xml 2007-03-03 19:04:10 UTC (rev 6502)
+++ docs/trunk/referenceGuide/en/modules/migration.xml 2007-03-03 19:08:28 UTC (rev 6503)
@@ -8,7 +8,7 @@
<author>
<firstname>Boleslaw</firstname>
<surname>Dawidowicz</surname>
- <email>boleslaw.dawidowicz at jboss dot com</email>
+ <email>boleslaw dot dawidowicz at redhat dot com</email>
</author>
</chapterinfo>
<title>Upgrading 2.4 - 2.6</title>
Modified: docs/trunk/referenceGuide/en/modules/sso.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/sso.xml 2007-03-03 19:04:10 UTC (rev 6502)
+++ docs/trunk/referenceGuide/en/modules/sso.xml 2007-03-03 19:08:28 UTC (rev 6503)
@@ -3,7 +3,7 @@
<author>
<firstname>Boleslaw</firstname>
<surname>Dawidowicz</surname>
- <email>boleslaw.dawidowicz at jboss dot com</email>
+ <email>boleslaw dot dawidowicz at redhat dot com</email>
</author>
</chapterinfo>
<title>Single Sign ON</title>
17 years, 8 months
JBoss Portal SVN: r6502 - in trunk/common/src/main/org/jboss/portal: test/common and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-03-03 14:04:10 -0500 (Sat, 03 Mar 2007)
New Revision: 6502
Modified:
trunk/common/src/main/org/jboss/portal/common/util/URLTools.java
trunk/common/src/main/org/jboss/portal/test/common/URLToolsTestCase.java
Log:
- Added exists(urlAsString, allowNull) method.
- Added documentation and remark on possibility of hanging in case the URL refers to a host on which the resource does not exist.
Modified: trunk/common/src/main/org/jboss/portal/common/util/URLTools.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/util/URLTools.java 2007-03-03 17:47:59 UTC (rev 6501)
+++ trunk/common/src/main/org/jboss/portal/common/util/URLTools.java 2007-03-03 19:04:10 UTC (rev 6502)
@@ -25,6 +25,8 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.ArrayList;
@@ -107,12 +109,18 @@
return address != null && Pattern.matches(RE_EMAIL_VALIDATION, address);
}
- public static boolean exists(java.net.URL url)
+ /**
+ * Determines that the specified URL corresponds to an existing resource by trying to open a stream from it. NOTE:
+ * This is a potentially blocking method since by default there is no timeout on the connection... See
+ * http://jira.jboss.com/jira/browse/JBPORTAL-1279
+ *
+ * @param url
+ * @return
+ */
+ public static boolean exists(URL url)
{
- if (url == null)
- {
- throw new IllegalArgumentException("No null urls allowed");
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(url, "URL");
+
InputStream in = null;
try
{
@@ -129,6 +137,32 @@
}
}
+ /**
+ * @param urlAsString
+ * @param allowNull <code>true</code> if passing <code>null</code> will be ignored and just return
+ * <code>false</code>, <code>false</code> to throw an {@link IllegalArgumentException} is the
+ * given URL is <code>null</code>.
+ * @return
+ * @since 2.6
+ */
+ public static boolean exists(String urlAsString, boolean allowNull)
+ {
+ if (!allowNull)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(urlAsString, "URL", null);
+ }
+
+ try
+ {
+ URL url = new URL(urlAsString);
+ return exists(url);
+ }
+ catch (MalformedURLException e)
+ {
+ return false;
+ }
+ }
+
public static URLMatch[] extractURLsFrom(String markup)
{
// todo: will need to re-write without regex after 2.4
Modified: trunk/common/src/main/org/jboss/portal/test/common/URLToolsTestCase.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/test/common/URLToolsTestCase.java 2007-03-03 17:47:59 UTC (rev 6501)
+++ trunk/common/src/main/org/jboss/portal/test/common/URLToolsTestCase.java 2007-03-03 19:04:10 UTC (rev 6502)
@@ -160,4 +160,10 @@
assertEquals("http://hostname:8088/some/path", URLTools.replaceServerPortInURL("http://hostname/some/path", 8088));
assertEquals("https://hostname:8088/some/path", URLTools.replaceServerPortInURL("https://hostname/some/path", 8088));
}
+
+ public void testExistsURL()
+ {
+ // todo: add more tests
+ assertFalse(URLTools.exists(null, true));
+ }
}
17 years, 8 months
JBoss Portal SVN: r6501 - in trunk: identity/src/main/org/jboss/portal/test/identity and 1 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-03-03 12:47:59 -0500 (Sat, 03 Mar 2007)
New Revision: 6501
Removed:
trunk/identity/src/main/org/jboss/portal/test/identity/db_old/
Modified:
trunk/core/src/resources/portal-core-sar/conf/identity/standardidentity-config.xml
trunk/identity/src/main/org/jboss/portal/test/identity/UserProtoTestCase.java
trunk/identity/src/resources/test/config/standardidentity-config.xml
Log:
- cleanup
Modified: trunk/core/src/resources/portal-core-sar/conf/identity/standardidentity-config.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/conf/identity/standardidentity-config.xml 2007-03-03 16:38:30 UTC (rev 6500)
+++ trunk/core/src/resources/portal-core-sar/conf/identity/standardidentity-config.xml 2007-03-03 17:47:59 UTC (rev 6501)
@@ -63,45 +63,6 @@
</option>
</config>
</datasource>
- <!--<datasource>
- <name>DB</name>
- <service-name>portal:service=Hibernate</service-name>
- <class>org.jboss.portal.identity2.experimental.db.IdentitySessionFactoryBinder</class>
- <config>
- <option>
- <name>doChecking</name>
- <value>true</value>
- </option>
- <option>
- <name>configLocation</name>
- <value>hibernate-single.cfg.xml</value>
- </option>
- --><!--<option>
- <name>setupLocation</name>
- <value>conf/hibernate/user/setup.txt</value>
- </option>--><!--
- <option>
- <name>jNDIName</name>
- <value>java:/portal/UserSessionFactory</value>
- </option>
- <option>
- <name>profileConfigFile</name>
- <value>profile-config.xml</value>
- </option>
- <option>
- <name>mappingTemplateFile</name>
- <value>domain-template.hbm.xml</value>
- </option>
- <option>
- <name>mappingOutputFile</name>
- <value>domain-identity.hbm.xml</value>
- </option>
- <option>
- <name>mappingPattern</name>
- <value><![CDATA[<property name="@name@" column="@column@" type="java.lang.String" update="true" insert="true" unique="false"/>]]></value>
- </option>
- </config>
- </datasource>-->
</datasources>
<modules>
@@ -113,7 +74,7 @@
<!--name of service and class for creating mbean-->
<service-name>portal:service=Module,type=UserProfile</service-name>
<class>org.jboss.portal.identity.DelegatingUserProfileModuleImpl</class>
- <!--set of options that are passed to a class constructor-->
+ <!--set of options that are set in instantiated object-->
<config>
<option>
<name>jndiName</name>
@@ -141,7 +102,7 @@
<service-name>portal:service=Module,type=User</service-name>
<class>org.jboss.portal.identity.db.HibernateUserModuleImpl</class>
- <!--set of options that are passed to a class constructor-->
+ <!--set of options that are set in instantiated object-->
<config>
<option>
<name>sessionFactoryJNDIName</name>
@@ -163,7 +124,7 @@
<service-name>portal:service=Module,type=Role</service-name>
<class>org.jboss.portal.identity.db.HibernateRoleModuleImpl</class>
- <!--set of options that are passed to a class constructor-->
+ <!--set of options that are set in instantiated object-->
<config>
<option>
<name>sessionFactoryJNDIName</name>
@@ -185,7 +146,7 @@
<service-name>portal:service=Module,type=Membership</service-name>
<class>org.jboss.portal.identity.db.HibernateMembershipModuleImpl</class>
- <!--set of options that are passed to a class constructor-->
+ <!--set of options that are set in instantiated object-->
<config>
<option>
<name>sessionFactoryJNDIName</name>
@@ -207,7 +168,7 @@
<service-name>portal:service=Module,type=DBUserProfile</service-name>
<class>org.jboss.portal.identity.db.HibernateUserProfileModuleImpl</class>
- <!--set of options that are passed to a class constructor-->
+ <!--set of options that are set in instantiated object-->
<config>
<option>
<name>sessionFactoryJNDIName</name>
@@ -230,7 +191,7 @@
<service-name>portal:service=Module,type=User</service-name>
<class>org.jboss.portal.identity.ldap.LDAPUserModuleImpl</class>
- <!--set of options that are passed to a class constructor-->
+ <!--set of options that are set in instantiated object-->
<config>
<option>
<name>jndiName</name>
@@ -252,7 +213,7 @@
<service-name>portal:service=Module,type=Role</service-name>
<class>org.jboss.portal.identity.ldap.LDAPRoleModuleImpl</class>
- <!--set of options that are passed to a class constructor-->
+ <!--set of options that are set in instantiated object-->
<config>
<option>
<name>jndiName</name>
@@ -274,7 +235,7 @@
<service-name>portal:service=Module,type=Membership</service-name>
<class>org.jboss.portal.identity.ldap.LDAPStaticGroupMembershipModuleImpl</class>
- <!--set of options that are passed to a class constructor-->
+ <!--set of options that are set in instantiated object-->
<config>
<option>
<name>jndiName</name>
@@ -296,22 +257,9 @@
<service-name>portal:service=Module,type=LDAPUserProfile</service-name>
<class>org.jboss.portal.identity.ldap.LDAPUserProfileModuleImpl</class>
- <!--set of options that are passed to a class constructor-->
+ <!--set of options that are set in instantiated object-->
<config>
- <!--<option>
- <name>LDAPConnectionJNDIName</name>
- <value>java:/portal/UserSessionFactory</value>
- </option>-->
- <!--Hibernate mappings for db level store (dynamic properties not mapped as ldap attributes)-->
- <!--<option>
- <name>SessionFactoryJNDIName</name>
- <value>java:/portal/PropertyStoreSessionFactory</value>
- </option>
<option>
- <name>profileMappings</name>
- <value>ldap-profile.xml</value>
- </option>-->
- <option>
<name>jndiName</name>
<value>java:/portal/LDAPUserProfileModule</value>
</option>
Modified: trunk/identity/src/main/org/jboss/portal/test/identity/UserProtoTestCase.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/test/identity/UserProtoTestCase.java 2007-03-03 16:38:30 UTC (rev 6500)
+++ trunk/identity/src/main/org/jboss/portal/test/identity/UserProtoTestCase.java 2007-03-03 17:47:59 UTC (rev 6501)
@@ -53,7 +53,7 @@
Appender appender = new ConsoleAppender(new SimpleLayout());
Logger.getRoot().addAppender(appender);
Logger.getRoot().setLevel(Level.INFO);
- Logger.getLogger("org.jboss.portal.identity2").setLevel(Level.DEBUG);
+ Logger.getLogger("org.jboss.portal.identity").setLevel(Level.DEBUG);
}
/*public static TestSuite createTestSuite(Class clazz) throws Exception
Modified: trunk/identity/src/resources/test/config/standardidentity-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/standardidentity-config.xml 2007-03-03 16:38:30 UTC (rev 6500)
+++ trunk/identity/src/resources/test/config/standardidentity-config.xml 2007-03-03 17:47:59 UTC (rev 6501)
@@ -61,45 +61,6 @@
</option>
</config>
</datasource>
- <!--<datasource>
- <name>DB</name>
- <service-name>portal:service=Hibernate</service-name>
- <class>org.jboss.portal.identity2.experimental.db.IdentitySessionFactoryBinder</class>
- <config>
- <option>
- <name>doChecking</name>
- <value>true</value>
- </option>
- <option>
- <name>configLocation</name>
- <value>hibernate-single.cfg.xml</value>
- </option>
- --><!--<option>
- <name>setupLocation</name>
- <value>conf/hibernate/user/setup.txt</value>
- </option>--><!--
- <option>
- <name>jNDIName</name>
- <value>java:/portal/UserSessionFactory</value>
- </option>
- <option>
- <name>profileConfigFile</name>
- <value>profile-config.xml</value>
- </option>
- <option>
- <name>mappingTemplateFile</name>
- <value>domain-template.hbm.xml</value>
- </option>
- <option>
- <name>mappingOutputFile</name>
- <value>domain-identity.hbm.xml</value>
- </option>
- <option>
- <name>mappingPattern</name>
- <value><![CDATA[<property name="@name@" column="@column@" type="java.lang.String" update="true" insert="true" unique="false"/>]]></value>
- </option>
- </config>
- </datasource>-->
</datasources>
<modules>
17 years, 8 months
JBoss Portal SVN: r6500 - docs/trunk/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-03-03 11:38:30 -0500 (Sat, 03 Mar 2007)
New Revision: 6500
Added:
docs/trunk/referenceGuide/en/modules/ldap.xml
Log:
ldap chapter in reference guide
Added: docs/trunk/referenceGuide/en/modules/ldap.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/ldap.xml (rev 0)
+++ docs/trunk/referenceGuide/en/modules/ldap.xml 2007-03-03 16:38:30 UTC (rev 6500)
@@ -0,0 +1,159 @@
+<chapter id="ldap">
+ <chapterinfo>
+ <author>
+ <firstname>Boleslaw</firstname>
+ <surname>Dawidowicz</surname>
+ <email>boleslaw.dawidowicz at jboss dot com</email>
+ </author>
+ </chapterinfo>
+ <title>LDAP</title>
+ <para>This chapter describes how to setup LDAP support in JBoss Portal</para>
+ <sect1>
+ <title>How to enable LDAP usage in JBoss Portal</title>
+ <para>We'll describe here the simple steps that you'll need to enable LDAP support in JBoss Portal.
+ For additional information you need to study more about configuration of identity and specific implementations of identity modules</para>
+ <para>There are two ways to achieve this:</para>
+ <itemizedlist>
+ <listitem>
+ <para>In
+ <emphasis role="bold">jboss-porta.sar/META-INF/jboss-service.xml</emphasis>
+ in section:
+ </para>
+ <programlisting><![CDATA[
+<mbean
+ code="org.jboss.portal.identity.IdentityServiceControllerImpl"
+ name="portal:service=Module,type=IdentityServiceController"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends>portal:service=Hibernate</depends>
+ <!--<depends>jboss.jca:service=DataSourceBinding,name=@portal.datasource.name@</depends>-->
+ <attribute name="JndiName">java:/portal/IdentityServiceController</attribute>
+ <attribute name="RegisterMBeans">true</attribute>
+ <attribute name="ConfigFile">conf/identity/identity-config.xml</attribute>
+ <attribute name="DefaultConfigFile">conf/identity/standardidentity-config.xml</attribute>
+</mbean>]]></programlisting>
+ <para>
+ change
+ <emphasis role="bold">identity-config.xml</emphasis>
+ to
+ <emphasis role="bold">ldap_identity-config.xml</emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Swap the names or content of files in
+ <emphasis role="bold">jboss-porta.sar/conf/identity/identity-config.xml</emphasis>
+ and
+ <emphasis role="bold">jboss-porta.sar/conf/identity/ldap_identity-config.xml</emphasis>
+
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ After doing one of above changes you need to edit configuration file that you choose to
+ use (identity-config.xml or ldap_identity-config.xml) and configure LDAP connection options in section:
+ </para>
+ <programlisting><![CDATA[
+<datasource>
+ <name>LDAP</name>
+ <config>
+ <option>
+ <name>host</name>
+ <value>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>]]></programlisting>
+ <para>
+ You also need to specify options for your LDAP tree (described in configuration documentation) like those:
+ </para>
+ <programlisting><![CDATA[
+<option-group>
+ <group-name>common</group-name>
+ <option>
+ <name>userCtxDN</name>
+ <value>ou=People,dc=portal26,dc=jboss,dc=com</value>
+ </option>
+ <option>
+ <name>roleCtxDN</name>
+ <value>ou=Roles,dc=portal26,dc=jboss,dc=com</value>
+ </option>
+</option-group>]]></programlisting>
+
+ <note>
+ Under <emphasis role="bold">PORTAL_SOURCES/identity/src/resources/example/</emphasis> you can find a sample ldif that
+ you can use to populate LDAP server and quickly start playing with it.
+ </note>
+
+ </sect1>
+ <sect1>
+ <title>Configuration of LDAP connection</title>
+ <sect2>
+ <title>SSL</title>
+ <para>The setup is very similar to the one described in LdapLoginModule <ulink url="http://www.jboss.org/wiki/Wiki.jsp?page=LdapLoginModule">wiki page</ulink></para>
+ <para>You need to modify your identity configuration file and add "protocol"</para>
+ <programlisting><![CDATA[
+<datasource>
+ <name>LDAP</name>
+ <config>
+ ...
+ <option>
+ <name>protocol</name>
+ <value>ssl</value>
+ </option>
+ ...
+ </config>
+</datasource>]]></programlisting>
+ <para>
+ Then you need to have LDAP server certificate imported into your keystore. You can use following command:
+ <programlisting>keytool -import -file ldapcert.der -keystore ldap.truststore</programlisting>
+ </para>
+ <para>
+ Now you need to change the settings to use the alternative truststore. That can be done in the properties-service.xml in deploy directory:
+ <programlisting><![CDATA[
+<attribute name="Properties">
+ javax.net.ssl.trustStore=../some/path/to/ldap.truststore
+ javax.net.ssl.trustStorePassword=somepw
+</attribute>]]></programlisting>
+ </para>
+ </sect2>
+ <sect2>
+ <title>ExternalContext</title>
+ <para>Instead of configuring your own connection you can use JNDI context federation mechanism in JBoss Application Server. Configuration of
+ ExternalContext is described in <ulink url="http://docs.jboss.com/jbossas/guides/j2eeguide/r2/en/html_single/#d0e6877">JBoss Application Server documentation</ulink></para>
+ <para>When you have ExternalContext configured you can use it in JBoss Portal by providing proper JNDI name in the configuration:
+ <programlisting><![CDATA[
+<datasource>
+ <name>LDAP</name>
+ <config>
+ <option>
+ <name>externalContextJndiName</name>
+ <value>external/ldap/jboss</value>
+ </option>
+ </config>
+</datasource>]]></programlisting>
+ <note>When using "externalContextJndiName" you don't need to specify any other option for this datasource</note>
+ </para>
+ </sect2>
+ </sect1>
+ <sect1>
+ <title>Place holder 2</title>
+ <para>TODO:</para>
+ </sect1>
+ <sect1>
+ <title>Place holder 3</title>
+ <para>TODO:</para>
+ </sect1>
+
+</chapter>
17 years, 8 months
JBoss Portal SVN: r6499 - in docs/trunk/referenceGuide/en: modules and 1 other directory.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-03-03 11:37:49 -0500 (Sat, 03 Mar 2007)
New Revision: 6499
Modified:
docs/trunk/referenceGuide/en/master.xml
docs/trunk/referenceGuide/en/modules/identity.xml
Log:
identity docs update
Modified: docs/trunk/referenceGuide/en/master.xml
===================================================================
--- docs/trunk/referenceGuide/en/master.xml 2007-03-03 14:44:29 UTC (rev 6498)
+++ docs/trunk/referenceGuide/en/master.xml 2007-03-03 16:37:49 UTC (rev 6499)
@@ -18,6 +18,7 @@
<!ENTITY themeandlayouts SYSTEM "modules/themeandlayouts.xml">
<!ENTITY identity SYSTEM "modules/identity.xml">
<!ENTITY authentication SYSTEM "modules/authentication.xml">
+ <!ENTITY ldap SYSTEM "modules/ldap.xml">
<!ENTITY sso SYSTEM "modules/sso.xml">
<!ENTITY clustering SYSTEM "modules/clustering.xml">
<!ENTITY wsrp SYSTEM "modules/wsrp.xml">
@@ -67,7 +68,8 @@
<!-- theme/layout api --> &themeandlayouts;
<!-- Identity --> &identity;
<!-- Authentication --> &authentication;
- <!-- SSO --> &sso;
+ <!-- LDAP --> &ldap;
+ <!-- SSO --> &sso;
<!-- troubleshooting FAQ--> &troubleshooting;
</book>
Modified: docs/trunk/referenceGuide/en/modules/identity.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/identity.xml 2007-03-03 14:44:29 UTC (rev 6498)
+++ docs/trunk/referenceGuide/en/modules/identity.xml 2007-03-03 16:37:49 UTC (rev 6499)
@@ -370,145 +370,6 @@
</sect2>
</sect1>
<sect1>
- <title>How to enable LDAP usage in JBoss Portal</title>
- <para>We'll describe here the simple steps that you'll need to enable LDAP support in JBoss Portal.
- For additional information you need to study more about configuration of identity and specific implementations of identity modules</para>
- <para>There are two ways to achieve this:</para>
- <itemizedlist>
- <listitem>
- <para>In
- <emphasis role="bold">jboss-porta.sar/META-INF/jboss-service.xml</emphasis>
- in section:
- </para>
- <programlisting><![CDATA[
-<mbean
- code="org.jboss.portal.identity.IdentityServiceControllerImpl"
- name="portal:service=Module,type=IdentityServiceController"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>portal:service=Hibernate</depends>
- <!--<depends>jboss.jca:service=DataSourceBinding,name=@portal.datasource.name@</depends>-->
- <attribute name="JndiName">java:/portal/IdentityServiceController</attribute>
- <attribute name="RegisterMBeans">true</attribute>
- <attribute name="ConfigFile">conf/identity/identity-config.xml</attribute>
- <attribute name="DefaultConfigFile">conf/identity/standardidentity-config.xml</attribute>
-</mbean>]]></programlisting>
- <para>
- change
- <emphasis role="bold">identity-config.xml</emphasis>
- to
- <emphasis role="bold">ldap_identity-config.xml</emphasis>
- </para>
- </listitem>
- <listitem>
- <para>Swap the names or content of files in
- <emphasis role="bold">jboss-porta.sar/conf/identity/identity-config.xml</emphasis>
- and
- <emphasis role="bold">jboss-porta.sar/conf/identity/ldap_identity-config.xml</emphasis>
-
- </para>
- </listitem>
- </itemizedlist>
- <para>
- After doing on of above changes you need to edit configuration file that you choose to
- use (identity-config.xml or ldap_identity-config.xml) and configure LDAP connection options in section:
- </para>
- <programlisting><![CDATA[
-<datasource>
- <name>LDAP</name>
- <config>
- <option>
- <name>host</name>
- <value>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>]]></programlisting>
- <para>
- You also need to specify options for your LDAP tree (described in configuration documentation) like those:
- </para>
- <programlisting><![CDATA[
-<option-group>
- <group-name>common</group-name>
- <option>
- <name>userCtxDN</name>
- <value>ou=People,dc=portal26,dc=jboss,dc=com</value>
- </option>
- <option>
- <name>roleCtxDN</name>
- <value>ou=Roles,dc=portal26,dc=jboss,dc=com</value>
- </option>
-</option-group>]]></programlisting>
-
- <note>
- Under <emphasis role="bold">PORTAL_SOURCES/identity/src/resources/example/</emphasis> you can find a sample ldif that
- you can use to populate LDAP server and quickly start playing with it.
- </note>
-
- </sect1>
- <sect1>
- <title>Configuration of LDAP connection</title>
- <sect2>
- <title>SSL</title>
- <para>The setup is very similar to the one described in LdapLoginModule <ulink url="http://www.jboss.org/wiki/Wiki.jsp?page=LdapLoginModule">wiki page</ulink></para>
- <para>You need to modify your identity configuration file and add "protocol"</para>
- <programlisting><![CDATA[
-<datasource>
- <name>LDAP</name>
- <config>
- ...
- <option>
- <name>protocol</name>
- <value>ssl</value>
- </option>
- ...
- </config>
-</datasource>]]></programlisting>
- <para>
- Then you need to have LDAP server certificate imported into your keystore. You can use following command:
- <programlisting>keytool -import -file ldapcert.der -keystore ldap.truststore</programlisting>
- </para>
- <para>
- Now you need to change the settings to use the alternative truststore. That can be done in the properties-service.xml in deploy directory:
- <programlisting><![CDATA[
-<attribute name="Properties">
- javax.net.ssl.trustStore=../some/path/to/ldap.truststore
- javax.net.ssl.trustStorePassword=somepw
-</attribute>]]></programlisting>
- </para>
- </sect2>
- <sect2>
- <title>ExternalContext</title>
- <para>Instead of configuring your own connection you can use JNDI context federation mechanism in JBoss Application Server. Configuration of
- ExternalContext is described in <ulink url="http://docs.jboss.com/jbossas/guides/j2eeguide/r2/en/html_single/#d0e6877">JBoss Application Server documentation</ulink></para>
- <para>When you have ExternalContext configured you can use it in JBoss Portal by providing proper JNDI name in the configuration:
- <programlisting><![CDATA[
-<datasource>
- <name>LDAP</name>
- <config>
- <option>
- <name>externalContextJndiName</name>
- <value>external/ldap/jboss</value>
- </option>
- </config>
-</datasource>]]></programlisting>
- <note>When using "externalContextJndiName" you don't need to specify any other option for this datasource</note>
- </para>
- </sect2>
- </sect1>
- <sect1>
<title>Identity configuration</title>
<para>At the beginning to understand identity configuration you need to understand how it is designed to work in portal.
Different identity services like UserModule, RoleModule and etc are just plain java classes that are instantiated and exposed
@@ -535,7 +396,7 @@
<emphasis role="bold">IdentityServiceController</emphasis>. It brings to life and registers all other components
like UserModule, RoleModule, MembershipModule and UserProfileModule.
<emphasis role="bold">IdentityServiceController</emphasis> is defined in
- <emphasis>jboss-portal.sar/META-INF/jboss-service.xml</emphasis>
+ <emphasis>jboss-portal.sar/META-INF/jboss-service.xml</emphasis>
</para>
<programlisting><![CDATA[
@@ -604,6 +465,7 @@
...
</options>
</identity-configuration>]]></programlisting>
+ <para>By default you can find it in <emphasis>jboss-portal.sar/conf/identity/identity-config.xml</emphasis></para>
<sect3>
<title>Datasources</title>
<para>This section defines datasource components. They will be processed and instantiated before components in
@@ -656,7 +518,7 @@
<service-name>portal:service=Module,type=User</service-name>
<class>org.jboss.portal.identity.db.HibernateUserModuleImpl</class>
- <!--set of options that are passed to a class constructor-->
+ <!--set of options that are in the instantiated object-->
<config>
<option>
<name>sessionFactoryJNDIName</name>
@@ -788,7 +650,130 @@
</sect1>
<sect1>
<title>User profile configuration</title>
- <para>TODO:</para>
+ <para>UserProfileModule has additional configuration file that defines user properties. It is specified in configuration in:</para>
+ <programlisting>
+ <![CDATA[
+ <module>
+ <type>UserProfile</type>
+ <implementation>DELEGATING</implementation>
+
+ (...)
+
+ <config>
+
+ (...)
+
+ <option>
+ <name>profileConfigFile</name>
+ <value>conf/identity/profile-config.xml</value>
+ </option>
+ </config>
+ </module>
+ ]]>
+ </programlisting>
+ <para>This means that you can configure user profile in <emphasis>jboss-portal.sar/conf/identity/profile-config.xml</emphasis></para>
+ <para>
+ <programlisting>
+ <![CDATA[
+<profile>
+
+ <property>
+ <name>user.name.nickName</name>
+ <type>java.lang.String</type>
+ <access-mode>read-only</access-mode>
+ <usage>mandatory</usage>
+ <display-name xml:lang="en">Name</display-name>
+ <description xml:lang="en">The user name</description>
+ <mapping>
+ <database>
+ <type>column</type>
+ <value>jbp_uname</value>
+ </database>
+ </mapping>
+ </property>
+
+ <property>
+ <name>user.business-info.online.email</name>
+ <type>java.lang.String</type>
+ <access-mode>read-write</access-mode>
+ <usage>mandatory</usage>
+ <display-name xml:lang="en">Email</display-name>
+ <description xml:lang="en">The user real email</description>
+ <mapping>
+ <database>
+ <type>column</type>
+ <value>jbp_realemail</value>
+ </database>
+ <ldap>
+ <value>mail</value>
+ </ldap>
+ </mapping>
+ </property>
+
+ <property>
+ <name>portal.user.location</name>
+ <type>java.lang.String</type>
+ <access-mode>read-write</access-mode>
+ <usage>optional</usage>
+ <display-name xml:lang="en">Location</display-name>
+ <description xml:lang="en">The user location</description>
+ <mapping>
+ <database>
+ <type>dynamic</type>
+ <value>portal.user.location</value>
+ </database>
+ </mapping>
+ </property>
+
+ (...)
+
+</properties>
+ ]]>
+ </programlisting>
+ Configuration file contains properties definition that can be retreived using <emphasis role="bold">PropertyInfo</emphasis> interface.
+ Every property that will be used in portal need to be registered here.
+ <note>Some informations provided for property have big influence on the behaviour of UserProfileModule. For example
+ <emphasis>access-mode</emphasis> can made property read-only, and value provided in <emphasis>type</emphasis> will be checked
+ during <emphasis>setProperty()/getProperty()</emphasis> operations. On the other hand tags like <emphasis>usage</emphasis>,
+ <emphasis>description</emphasis> or <emphasis>display-name</emphasis> have mostly informational meaning at the moment</note>
+ <itemizedlist>
+ <listitem>
+ <emphasis role="bold">name</emphasis> - property name. This value will be used to refer to the property in <emphasis>UserProfileModule</emphasis>
+ </listitem>
+ <listitem>
+ <emphasis role="bold">type</emphasis> - java type of property. This type will be checked when in <emphasis>UserProfileModule</emphasis>
+ methods invocation.
+ </listitem>
+ <listitem>
+ <emphasis role="bold">access-mode</emphasis> - possible values are <emphasis>read-write</emphasis> and <emphasis>read-only</emphasis>
+ </listitem>
+
+ <listitem>
+ <emphasis role="bold">usage</emphasis> - property usage can be <emphasis>mandatory</emphasis> or <emphasis>optional</emphasis>.
+ </listitem>
+
+ <listitem>
+ <emphasis role="bold">display-name</emphasis> - property display name.
+ </listitem>
+
+ <listitem>
+ <emphasis role="bold">description</emphasis> - description of property.
+ </listitem>
+
+ <listitem>
+ <emphasis role="bold">mapping</emphasis> - defines how property is mapped in the underlaying storage mechanism. It can be mapped in <emphasis>database</emphasis>
+ either as a <emphasis>column</emphasis> or <emphasis>dynamic</emphasis> value. It can also be mapped as <emphasis>ldap</emphasis> attribute.
+ <note>In current implementation <emphasis>column</emphasis> and <emphasis>dynamic</emphasis> mappings have the same effect, as database mappings are defined
+ in hibernate configuration.</note>
+ <note>Property can have both <emphasis>ldap</emphasis> and <emphasis>database</emphasis> mappings. In such situation when LDAP support is enabled <emphasis>ldap</emphasis> mapping will take precedense.
+ Also even when using ldap some properties will be mapped to ldap and some to database. Its because LDAP schema doesn't support all attributes proper
+ to for portal properties. To solve this we have <emphasis role="bold">DelegatingUserProfileModuleImpl</emphasis> that will delegate method invocation to
+ <emphasis>ldap</emphasis> or <emphasis>database</emphasis> related <emphasis>UserProfile</emphasis> module. When <emphasis>LDAP</emphasis> support is enabled and
+ property need to be stored in database user will be synchronized into database when needed. This behaviour can be configured.</note>
+ </listitem>
+ </itemizedlist>
+
+ </para>
</sect1>
<sect1>
<title>Identity modules implementations</title>
@@ -798,5 +783,5 @@
<title>Possible configuration scenarios with LDAP and RDBMS</title>
<para>TODO:</para>
</sect1>
-
+
</chapter>
17 years, 8 months
JBoss Portal SVN: r6498 - trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-03-03 09:44:29 -0500 (Sat, 03 Mar 2007)
New Revision: 6498
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editTheme.xhtml
Log:
better layout for theme editor
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editTheme.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editTheme.xhtml 2007-03-03 14:34:46 UTC (rev 6497)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editTheme.xhtml 2007-03-03 14:44:29 UTC (rev 6498)
@@ -8,34 +8,49 @@
id="themepg">
<h:form
id="themeform">
- <table border="0" width="100%" cellpadding="2">
- <tr>
- <td class="portlet-form-field-label"><label class="portlet-form-field-label">Layout:</label></td>
- <td>
- <h:selectOneMenu styleClass="portlet-form-field" value="#{themePropertyAction.layoutName}">
- <f:selectItems value="#{portalobjectmgr.themes.layoutNames}"/>
- </h:selectOneMenu>
- </td>
- </tr>
- <tr>
- <td class="portlet-form-field-label"><label class="portlet-form-field-label">Theme:</label></td>
- <td>
- <h:selectOneMenu styleClass="portlet-form-field" value="#{themePropertyAction.themeName}">
- <f:selectItems value="#{portalobjectmgr.themes.themeNames}"/>
- </h:selectOneMenu>
- </td>
- </tr>
- <tr>
- <td class="portlet-form-field-label"><label class="portlet-form-field-label">RenderSet:</label></td>
- <td>
- <h:selectOneMenu styleClass="portlet-form-field" value="#{themePropertyAction.renderSetName}">
- <f:selectItems value="#{portalobjectmgr.themes.renderSetNames}"/>
- </h:selectOneMenu>
- </td>
- </tr>
- </table>
- <h:commandButton styleClass="portlet-form-button" id="the_command" value="Update"
- action="#{themePropertyAction.execute}" />
+ <fieldset style="border: 1px solid;">
+ <legend>Theme properties</legend>
+ <table>
+ <tbody>
+ <tr>
+ <td class="portlet-form-field-label">
+ <h:outputLabel for="layout">Layout:</h:outputLabel>
+ </td>
+ <td>
+ <h:selectOneMenu id="layout" styleClass="portlet-form-field" value="#{themePropertyAction.layoutName}">
+ <f:selectItems value="#{portalobjectmgr.themes.layoutNames}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr>
+ <td class="portlet-form-field-label">
+ <h:outputLabel for="theme">Theme:</h:outputLabel>
+ </td>
+ <td>
+ <h:selectOneMenu id="theme" styleClass="portlet-form-field" value="#{themePropertyAction.themeName}">
+ <f:selectItems value="#{portalobjectmgr.themes.themeNames}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr>
+ <td class="portlet-form-field-label">
+ <h:outputLabel for="renderSet">RenderSet:</h:outputLabel>
+ </td>
+ <td>
+ <h:selectOneMenu id="renderSet" styleClass="portlet-form-field" value="#{themePropertyAction.renderSetName}">
+ <f:selectItems value="#{portalobjectmgr.themes.renderSetNames}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <h:commandButton styleClass="portlet-form-button" id="the_command" value="Update"
+ action="#{themePropertyAction.execute}" />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </fieldset>
</h:form>
</h:panelGroup>
</div>
\ No newline at end of file
17 years, 8 months
JBoss Portal SVN: r6497 - trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-03-03 09:34:46 -0500 (Sat, 03 Mar 2007)
New Revision: 6497
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editSecurity.xhtml
Log:
better layout for security editor
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editSecurity.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editSecurity.xhtml 2007-03-03 14:17:39 UTC (rev 6496)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editSecurity.xhtml 2007-03-03 14:34:46 UTC (rev 6497)
@@ -2,23 +2,37 @@
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jstl/core">
<h:form>
- <h:dataTable
- var="role"
- value="#{auth.roles}">
- <h:column>
- <b><h:outputText value="#{role == '__unchecked__' ? 'Unchecked' : (auth.roleDisplayNameMap[role] != null ? auth.roleDisplayNameMap[role] : role)}"/></b>
- </h:column>
- <h:column>
- <h:selectManyCheckbox id="cars"
- value="#{auth.forRole[role]}">
- <f:selectItems value="#{auth.availableActions}"/>
- </h:selectManyCheckbox>
- </h:column>
- </h:dataTable>
- <h:commandButton action="#{auth.execute}" value="Update" styleClass="portlet-form-button"/>
+ <table>
+ <tbody>
+ <c:forEach items="#{auth.roles}" var="role" varStatus="status">
+ <tr>
+ <td>
+ <h:outputLabel for="cars_#{status.index}">
+ <span class="portlet-form-field-label">Role <span>#{role == '__unchecked__' ? 'Unchecked' : (auth.roleDisplayNameMap[role] != null ? auth.roleDisplayNameMap[role] : role)}</span></span>:
+ </h:outputLabel>
+ </td>
+ <td>
+ <h:selectManyCheckbox
+ id="cars_#{status.index}"
+ style="portlet-form-field"
+ value="#{auth.forRole[role]}"
+ layout="lineDirection">
+ <f:selectItems value="#{auth.availableActions}"/>
+ </h:selectManyCheckbox>
+ </td>
+ </tr>
+ </c:forEach>
+ <tr>
+ <td colspan="2">
+ <h:commandButton action="#{auth.execute}" value="Update" styleClass="portlet-form-button"/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
</h:form>
</div>
\ No newline at end of file
17 years, 8 months
JBoss Portal SVN: r6496 - in trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf: common and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-03-03 09:17:39 -0500 (Sat, 03 Mar 2007)
New Revision: 6496
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editPreferences.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml
Log:
acceptable layout for the preference editor
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editPreferences.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editPreferences.xhtml 2007-03-03 02:43:49 UTC (rev 6495)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editPreferences.xhtml 2007-03-03 14:17:39 UTC (rev 6496)
@@ -48,38 +48,49 @@
</h:form>
<c:if test="#{prefs.selectedEntry != null}">
-
- <h:form>
- <table width="100%">
- <tbody>
- <c:forEach items="#{prefs.selectedEntry.indices}" var="index" varStatus="status">
+ <h:form style="padding: 1em 0 1em 0">
+ <fieldset style="border: 1px solid;">
+ <legend>Edit existing values</legend>
+ <table>
+ <tbody>
+ <c:forEach items="#{prefs.selectedEntry.indices}" var="index" varStatus="status">
+ <tr>
+ <td>
+ <h:outputLabel for="row_#{status.index}">
+ <h:outputText value="Value #{status.index}: " styleClass="portlet-form-field-label"/>
+ </h:outputLabel>
+ </td>
+ <td>
+ <h:inputText value="#{prefs.selectedEntry[index]}" styleClass="portlet-form-input-field"/>
+ </td>
+ <td>
+ <h:commandButton
+ id="row_#{status.index}"
+ actionListener="#{prefs.selectedEntry.deleteLine}"
+ value="Delete"
+ styleClass="portlet-form-button"/>
+ </td>
+ </tr>
+ </c:forEach>
<tr>
- <td>
- <h:outputText value="Value #{status.index}: #{index}" styleClass="portlet-form-field-label"/>
+ <td colspan="3">
+ <h:commandButton value="Update" styleClass="portlet-form-button"/>
</td>
- <td>
- <h:inputText value="#{prefs.selectedEntry[index]}" styleClass="portlet-form-input-field"/>
- </td>
- <td>
- <h:commandButton
- id="row_#{status.index}"
- actionListener="#{prefs.selectedEntry.deleteLine}"
- value="Delete"
- styleClass="portlet-form-button"/>
- </td>
</tr>
- </c:forEach>
- </tbody>
- </table>
- <h:commandButton value="Update" styleClass="portlet-form-button"/>
+ </tbody>
+ </table>
+ </fieldset>
</h:form>
<h:form>
- <h:outputLabel for="new_value">
- <h:outputText value="New value: " styleClass="portlet-form-field-label"/>
- </h:outputLabel>
- <h:inputText id="new_value" value="#{prefs.selectedEntry.line}" styleClass="portlet-form-input-field"/>
- <h:commandButton action="#{prefs.selectedEntry.appendLine}" value="Append" styleClass="portlet-form-button"/>
+ <fieldset style="border: 1px solid;">
+ <legend>Append a value</legend>
+ <h:outputLabel for="new_value">
+ <h:outputText value="New value: " styleClass="portlet-form-field-label"/>
+ </h:outputLabel>
+ <h:inputText id="new_value" value="#{prefs.selectedEntry.line}" styleClass="portlet-form-input-field"/>
+ <h:commandButton action="#{prefs.selectedEntry.appendLine}" value="Append" styleClass="portlet-form-button"/>
+ </fieldset>
</h:form>
</c:if>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml 2007-03-03 02:43:49 UTC (rev 6495)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml 2007-03-03 14:17:39 UTC (rev 6496)
@@ -90,9 +90,9 @@
<ui:include src="common/editPreferences.xhtml">
<ui:param name="prefs" value="#{instancemgr.selectedPrefs}"/>
</ui:include>
- <h:form>
- <h:commandButton value="Save" action="#{instancemgr.updatePrefs}"/>
- <h:commandButton value="Cancel" action="#{instancemgr.cancelPrefs}"/>
+ <h:form style="text-align:center;padding: 1em 0 1em 0">
+ <h:commandButton value="Save" action="#{instancemgr.updatePrefs}" styleClass="portlet-form-button"/>
+ <h:commandButton value="Cancel" action="#{instancemgr.cancelPrefs}" styleClass="portlet-form-button"/>
</h:form>
</c:if>
@@ -105,8 +105,6 @@
</c:if>
-
-
</ui:define>
</ui:composition>
</div>
17 years, 8 months