Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

This commit was manufactured by cvs2svn to create tag

'rel-2-4-2-rc1'.

git-svn-id: https://source.jasig.org/uPortal/tags/rel-2-4-2-rc1@9818 f5dbab47-78f9-eb45-b975-e544023573eb
  • Loading branch information...
commit 214f9268c9b229f76e694bd590a3328bd0e525e4 1 parent 880bb63
infrastructure@lists.ja-sig.org authored
Showing with 3,532 additions and 2,093 deletions.
  1. +30 −0 LICENSE.txt
  2. +140 −0 README.txt
  3. +3 −3 build.properties
  4. +19 −35 build.xml
  5. +7 −0 docs/README
  6. BIN  docs/uPortal_architecture_overview.pdf
  7. +137 −0 docs/uPortal_properties_overview.txt
  8. +102 −0 docs/uPortal_tools_overview.txt
  9. +11 −8 docs/website/implementors/services/compositeGroupService.html
  10. +19 −16 docs/website/implementors/services/compositeGroupService_prt.html
  11. BIN  lib/{pluto-1.0.1.jar → pluto-1.0.1-rc1.jar}
  12. BIN  lib/portlets/proxyportlet.war
  13. BIN  lib/portlets/testsuite.war
  14. +3 −0  properties/Logger.properties
  15. +1 −1  properties/PersonDirs.xml
  16. +1 −1  properties/db/data.xml
  17. +4 −4 properties/db/tables.xml
  18. +15 −3 properties/security.properties
  19. +0 −119 scripts/createTables-hypersonic.script
  20. +0 −15 scripts/dropTables.script
  21. +0 −269 scripts/populateTables.script
  22. +1 −1  source/org/jasig/portal/ChannelDefinition.java
  23. +9 −5 source/org/jasig/portal/ChannelFactory.java
  24. +3 −3 source/org/jasig/portal/ChannelManager.java
  25. +1 −4 source/org/jasig/portal/ChannelRenderer.java
  26. +4 −4 source/org/jasig/portal/EntityTypes.java
  27. +86 −5 source/org/jasig/portal/ExceptionHelper.java
  28. +3 −3 source/org/jasig/portal/IChannelRenderer.java
  29. +12 −6 source/org/jasig/portal/LoginServlet.java
  30. +5 −7 source/org/jasig/portal/LogoutServlet.java
  31. +5 −1 source/org/jasig/portal/PortalEvent.java
  32. +8 −3 source/org/jasig/portal/PortalSessionManager.java
  33. +7 −5 source/org/jasig/portal/RDBMChannelRegistryStore.java
  34. +9 −9 source/org/jasig/portal/RDBMServices.java
  35. +242 −175 source/org/jasig/portal/RDBMUserLayoutStore.java
  36. +2 −1  source/org/jasig/portal/ReferenceSequenceGenerator.java
  37. +3 −7 source/org/jasig/portal/RequestParamWrapper.java
  38. +1 −1  source/org/jasig/portal/StylesheetSet.java
  39. +1 −1  source/org/jasig/portal/UserInstance.java
  40. +6 −3 source/org/jasig/portal/UserPreferencesManager.java
  41. +2 −2 source/org/jasig/portal/Version.java
  42. +1 −1  source/org/jasig/portal/channels/CApplet.java
  43. +29 −4 source/org/jasig/portal/channels/CChannelManager.java
  44. +21 −14 source/org/jasig/portal/channels/CError.java
  45. +2 −2 source/org/jasig/portal/channels/CHeader.java
  46. +1 −1  source/org/jasig/portal/channels/CImage.java
  47. +1 −1  source/org/jasig/portal/channels/CInlineFrame.java
  48. +9 −1 source/org/jasig/portal/channels/CSecureInfo.java
  49. +2 −2 source/org/jasig/portal/channels/UserPreferences/CUserPreferences.java
  50. +2 −2 source/org/jasig/portal/channels/UserPreferences/GPreferencesState.java
  51. +2 −2 source/org/jasig/portal/channels/UserPreferences/ManageProfilesState.java
  52. +6 −6 source/org/jasig/portal/channels/iccdemo/CHistory.java
  53. +4 −4 source/org/jasig/portal/channels/iccdemo/CURLSelector.java
  54. +6 −6 source/org/jasig/portal/channels/iccdemo/CViewer.java
  55. +12 −11 source/org/jasig/portal/channels/permissionsmanager/CPermissionsManager.java
  56. +1 −1  source/org/jasig/portal/channels/permissionsmanager/CPermissionsManagerServant.java
  57. +2 −2 source/org/jasig/portal/channels/permissionsmanager/CPermissionsManagerServantFactory.java
  58. +1 −1  source/org/jasig/portal/channels/permissionsmanager/CommandFactory.java
  59. +1 −1  source/org/jasig/portal/channels/permissionsmanager/PermissiblePublishChannels.java
  60. +1 −1  source/org/jasig/portal/channels/permissionsmanager/PermissibleSubscribeChannels.java
  61. +3 −3 source/org/jasig/portal/channels/permissionsmanager/PermissionsXML.java
  62. +3 −3 source/org/jasig/portal/channels/permissionsmanager/RDBMPermissibleRegistry.java
  63. +1 −1  source/org/jasig/portal/channels/permissionsmanager/commands/AssignPermissions.java
  64. +38 −17 source/org/jasig/portal/channels/portlet/CPortletAdapter.java
  65. +3 −0  source/org/jasig/portal/channels/portlet/ChannelData.java
  66. +1 −1  source/org/jasig/portal/channels/webproxy/CWebProxy.java
  67. +1 −2  source/org/jasig/portal/concurrency/caching/LRUCache.java
  68. +4 −4 source/org/jasig/portal/concurrency/caching/RDBMCachedEntityInvalidationStore.java
  69. +7 −3 source/org/jasig/portal/concurrency/locking/MemoryEntityLockStore.java
  70. +4 −4 source/org/jasig/portal/concurrency/locking/RDBMEntityLockStore.java
  71. +42 −14 source/org/jasig/portal/concurrency/locking/ReferenceEntityLockService.java
  72. +24 −6 source/org/jasig/portal/container/binding/PortletApplicationUnmarshaller.java
  73. +1 −1  source/org/jasig/portal/container/binding/WebApplicationMarshaller.java
  74. +5 −2 source/org/jasig/portal/container/om/common/LanguageImpl.java
  75. +49 −19 source/org/jasig/portal/container/om/common/LanguageSetImpl.java
  76. +3 −3 source/org/jasig/portal/container/om/entity/PortletEntityImpl.java
  77. +4 −2 source/org/jasig/portal/container/om/portlet/PortletDefinitionImpl.java
  78. +29 −17 source/org/jasig/portal/container/services/information/PortletStateManager.java
  79. +86 −0 source/org/jasig/portal/container/servlet/DummyParameterRequestWrapper.java
  80. +0 −82 source/org/jasig/portal/container/servlet/EmptyRequestImpl.java
  81. +103 −0 source/org/jasig/portal/container/servlet/PortletParameterRequestWrapper.java
  82. +1 −1  source/org/jasig/portal/groups/EntityGroupNameFinder.java
  83. +46 −0 source/org/jasig/portal/groups/EntityTestingGroupImpl.java
  84. +5 −6 source/org/jasig/portal/groups/RDBMEntityGroupStore.java
  85. +1 −1  source/org/jasig/portal/groups/ReferenceChannelNameFinder.java
  86. +2 −2 source/org/jasig/portal/groups/ReferencePersonNameFinder.java
  87. +4 −7 source/org/jasig/portal/groups/ldap/LDAPGroupStore.java
  88. +2 −3 source/org/jasig/portal/groups/local/searchers/RDBMChannelDefSearcher.java
  89. +2 −3 source/org/jasig/portal/groups/local/searchers/RDBMPersonSearcher.java
  90. +5 −5 source/org/jasig/portal/groups/pags/PersonAttributesGroupStore.java
  91. +1 −1  source/org/jasig/portal/i18n/LocaleManager.java
  92. +1 −2  source/org/jasig/portal/jndi/JNDIManager.java
  93. +2 −2 source/org/jasig/portal/layout/AggregatedLayoutManager.java
  94. +5 −9 source/org/jasig/portal/layout/AggregatedUserLayoutStore.java
  95. +1 −7 source/org/jasig/portal/layout/channels/CContentSubscriber.java
  96. +2 −0  source/org/jasig/portal/layout/channels/CFragmentManager.java
  97. +3 −4 source/org/jasig/portal/ldap/LdapServices.java
  98. +155 −179 source/org/jasig/portal/security/InitialSecurityContextFactory.java
  99. +1 −1  source/org/jasig/portal/security/provider/CacheSecurityContext.java
  100. +10 −5 source/org/jasig/portal/security/provider/ChainingSecurityContext.java
  101. +12 −11 source/org/jasig/portal/security/provider/RDBMPermissionImpl.java
  102. +1 −1  source/org/jasig/portal/security/provider/RemoteUserPersonManager.java
  103. +18 −13 source/org/jasig/portal/security/provider/RestrictedPerson.java
  104. +61 −56 source/org/jasig/portal/security/provider/SimpleLdapSecurityContext.java
  105. +1 −1  source/org/jasig/portal/security/provider/SimplePersonManager.java
  106. +1 −1  source/org/jasig/portal/security/provider/SimpleSecurityContext.java
  107. +1 −1  source/org/jasig/portal/security/provider/TrustSecurityContext.java
  108. +1 −1  source/org/jasig/portal/serialize/HTMLSerializer.java
  109. +50 −19 source/org/jasig/portal/services/Authentication.java
  110. +4 −5 source/org/jasig/portal/services/AuthorizationService.java
  111. +7 −8 source/org/jasig/portal/services/EntityPropertyRegistry.java
  112. +17 −17 source/org/jasig/portal/services/ExternalServices.java
  113. +3 −1 source/org/jasig/portal/services/GroupService.java
  114. +13 −8 source/org/jasig/portal/services/LogService.java
  115. +171 −116 source/org/jasig/portal/services/PersonDirectory.java
  116. +3 −2 source/org/jasig/portal/services/SequenceGenerator.java
  117. +1 −1  source/org/jasig/portal/services/StatsRecorder.java
  118. +2 −4 source/org/jasig/portal/services/entityproperties/ChannelRegistryPropertyFinder.java
  119. +2 −1  source/org/jasig/portal/services/entityproperties/ContainingGroupsFinder.java
  120. +1 −1  source/org/jasig/portal/services/entityproperties/PersonDirPropertyFinder.java
  121. +4 −8 source/org/jasig/portal/services/entityproperties/RDBMPropertyStore.java
  122. +1 −1  source/org/jasig/portal/services/stats/StatsRecorderSettings.java
  123. +38 −48 source/org/jasig/portal/tools/dbloader/Configuration.java
  124. +50 −53 source/org/jasig/portal/tools/dbloader/DbLoader.java
  125. +22 −47 source/org/jasig/portal/tools/dbloader/DbUtils.java
  126. +4 −4 source/org/jasig/portal/utils/DocumentFactory.java
  127. +27 −11 source/org/jasig/portal/utils/RDBMCounterStore.java
  128. +4 −4 source/org/jasig/portal/utils/SqlTransaction.java
  129. +1 −1  source/org/jasig/portal/utils/URLUtil.java
  130. +171 −0 source/org/jasig/portal/utils/WeakValueMap.java
  131. +2 −2 source/org/jasig/portal/wsrp/bind/WSRP_v1_ServiceDescription_Binding_SOAPImpl.java
  132. +217 −0 tests/org/jasig/portal/ExceptionHelperTest.java
  133. +42 −0 tests/org/jasig/portal/channels/CSecureInfoTest.java
  134. +74 −0 tests/org/jasig/portal/channels/EventRecordingChannel.java
  135. +3 −3 tests/org/jasig/portal/concurrency/locking/EntityLockTester.java
  136. +72 −4 tests/org/jasig/portal/groups/GroupsTester.java
  137. +33 −19 tests/org/jasig/portal/lang/ChainedThrowable_Test.java
  138. +33 −33 tests/org/jasig/portal/lang/Resources_Test.java
  139. +33 −19 tests/org/jasig/portal/lang/StackTrace_Test.java
  140. +33 −19 tests/org/jasig/portal/lang/ThrowableHelper_Test.java
  141. +33 −19 tests/org/jasig/portal/lang/TypeConverter_Test.java
  142. +234 −0 tests/org/jasig/portal/security/provider/RestrictedPersonTest.java
  143. +5 −5 webpages/media/org/jasig/portal/channels/portlet/wsrp-consumer.cpd
  144. +0 −6 webpages/media/org/jasig/portal/layout/AL_TabColumn/integratedModes/cartoon/CVS/Entries
  145. +0 −1  webpages/media/org/jasig/portal/layout/AL_TabColumn/integratedModes/cartoon/CVS/Repository
  146. +0 −1  webpages/media/org/jasig/portal/layout/AL_TabColumn/integratedModes/cartoon/CVS/Root
  147. +10 −2 webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html.xsl
  148. +10 −2 webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html_en_US.xsl
  149. +10 −2 webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html_it_IT.xsl
  150. +310 −302 webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html_ja_JP.xsl
  151. +10 −2 webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html_lv_LV.xsl
  152. +10 −2 webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html_sv_SE.xsl
View
30 LICENSE.txt
@@ -0,0 +1,30 @@
+Copyright 2000-2004 The JA-SIG Collaborative. All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+3. Redistributions of any form whatsoever must retain the following
+ acknowledgment:
+ "This product includes software developed by the JA-SIG Collaborative
+ (http://www.jasig.org/)."
+
+THIS SOFTWARE IS PROVIDED BY THE JA-SIG COLLABORATIVE "AS IS" AND ANY
+EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE JA-SIG COLLABORATIVE OR
+ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
View
140 README.txt
@@ -0,0 +1,140 @@
+$Id$
+
+uPortal 2.4.2 Distribution
+--------------------------
+
+Purpose
+-------
+This distribution is targeted towards
+people who would like to install
+uPortal in a development or production
+environment. It contains uPortal source
+code and properties files, but not a servlet
+container, directory, or relational database,
+which are required. Use of this distribution
+requires knowledge of J2EE environments and the
+Ant tool from the Apache Jakarta project.
+
+
+Contents
+--------
+1) uPortal
+2) uPortal dependencies (Xalan, Pluto, etc).
+3) uPortal Architecture overview and JavaDoc API
+
+
+System requirements
+-------------------
+JDK 1.4 or higher
+JAVA_HOME environment variable must be set
+Installation of Ant from Jakarta:
+ http://ant.apache.org/
+
+
+Instructions
+------------
+Modify build.properties with local settings.
+
+Use the following ant targets:
+
+initportal - installs uPortal into a servlet container,
+ prepares a relational database with uPortal schema and data,
+ publishes channels and layout fragments,
+ deploys portlet applications
+dist - creates JavaDoc, uPortal jar, and uPortal WAR files.
+
+For descriptions of other Ant targets,
+see docs/uPortal_tools_overview.txt.
+
+Make sure the database and servlet container are running and
+access uPortal with http://localhost:8080/uPortal/
+Your URL may be different if you have configured a different port
+and/or context name.
+
+You can login to uPortal with the following user name/password
+combinations:
+
+demo, demo
+student, student
+faculty, faculty
+staff, staff
+developer, developer
+
+Each user may have a slightly different layout.
+
+
+Notes
+-----
+-Several properties files and one database table changed
+ since uPortal 2.3.x. If you are upgrading from this version,
+ you will need to see to it that your properties files and
+ database data are upgraded appropriately. The difficulty
+ of upgrading from 2.3.x to 2.4.x is expected to be much lower
+ than similar upgrades in past versions.
+
+-uPortal does not strictly require the use of connection
+ pooling, but it is highly recommended for production
+ installations. If your servlet container does not provide
+ connection pooling, try something like Yet Another Poolman.
+ For information about Yet Another Poolman,
+ see http://yapoolman.sourceforge.net/.
+
+-Bug fixes from 2.3.x releases have been implemented in 2.4.x
+ whenever they were appropriate
+
+-If you experience XML/XSLT-related errors, there is a good
+ chance that your environment is not using the version of
+ Xalan/Xerces that comes with this release. If you are using
+ Tomcat, try copying the following files into Tomcat's
+ common/endorsed directory: xalan.jar, xercesImpl.jar, xml-apis.jar.
+ Alternatively, you can specify the use of these jar files
+ via a java parameter when starting your servlet container:
+ -Xbootclasspath/p:xalan.jar;xercesImpl.jar;xml-apis.jar
+ For more information, see Version section of
+ http://xml.apache.org/xalan-j/faq.html
+
+-JSR 168 Portlets are supported in this version of uPortal.
+ For information on installing Portlets, see
+ http://www.uportal.org/implementors/portlets/workingWithPortlets.html.
+
+-WSRP functionality was included in uPortal as early as uPortal 2.2.
+ However, beginning with uPortal 2.4, the WSRP consumer has been replaced with
+ one based on WSRP4J. The WSRP producer has been deprecated but may
+ be reintroduced in a future release.
+
+Please report bugs and suggestions:
+
+ http://www.uportal.org/bugzilla/
+
+uPortal website:
+
+ http://www.uportal.org
+
+
+Release Notes - uPortal - Version 2.4.2
+---------------------------------------
+** Bug
+ * [UP-338] - RENDERING_DONE Event never sent
+ * [UP-476] - User's LDAP groups not loaded if username contains uppercase
+ * [UP-744] - PersonDirectory has a memory leak related to caching IPersons in a WeakHashMap
+ * [UP-745] - ChannelManager has a memory leak, when it swaps out a channel for the CError channel, the end session events never progagate to the original channel
+ * [UP-746] - CSecureInfo has a memory leak, when ChannelManager swaps out a channel for the CSecureInfo channel, the to end session events never propagate to the original channel
+ * [UP-747] - Change to portlet parameter encoding breaks download worker URLs
+ * [UP-748] - Infinite recursion in RestrictedPerson
+ * [UP-749] - render parameter does not survive refresh
+ * [UP-753] - ChannelFactory should not expose internal map of static channels, not create more than one instance of a multithreaded channel
+ * [UP-759] - Xalan jar should be deployed to endorsed directory
+ * [UP-760] - Entity locks not expired correctly
+ * [UP-761] - A lock owner is limited to single READ lock on an entity
+ * [UP-772] - Classpath resources not being copied to build
+ * [UP-775] - Duplicate read locks for a single owner not permitted.
+ * [UP-776] - WebApplicationMarshaller.java turns resource-ref into resource-env-ref
+ * [UP-778] - AggregatedLayoutManager.loadUserLayout() fails to log stack trace for exception
+ * [UP-779] - ChannelRenderer declares constants that are already declared in its base class
+ * [UP-780] - Eliminate "unknown additional descriptor warning" when using ChainingSecurityContext
+ * [UP-796] - contains() doesn't always work for PAGS groups
+ * [UP-798] - GroupService.isComposite always returns null
+
+
+** Improvement
+ * [UP-770] - Document hsqldb version included with uPortal
View
6 build.properties
@@ -15,10 +15,10 @@
#==================== File and Directory Names ========================
app.name=uPortal
-app.version=2.4
+app.version=2.4.1+
lib.path=lib
-server.home=/JavaClasses/jakarta-tomcat-5.0.25
+server.home=/JavaClasses/jakarta-tomcat-5.0.28
deploy.home=${server.home}/webapps/uPortal
@@ -49,7 +49,7 @@ wsdl4j.jar=${lib.path}/wsdl4j.jar
commons-discovery.jar=${lib.path}/commons-discovery.jar
commons-logging.jar=${lib.path}/commons-logging.jar
portlet-api.jar=${lib.path}/portlet-api-1.0.jar
-pluto.jar=${lib.path}/pluto-1.0.1.jar
+pluto.jar=${lib.path}/pluto-1.0.1-rc1.jar
wsrp4j-shared.jar=${lib.path}/wsrp4j-shared-0.3.jar
wsrp4j-consumer.jar=${lib.path}/wsrp4j-consumer-0.3.jar
proxyportlet.jar=${lib.path}/proxyportlet.jar
View
54 build.xml
@@ -237,20 +237,20 @@
URL: http://jakarta.apache.org/commons/logging.html
portlet-api.jar Portlet API based on JSR-168.
- Version: (from jakarta-pluto CVS on September 22, 2004)
+ Version: (from jakarta-pluto CVS on November 2, 2004)
URL: http://www.jcp.org/en/jsr/detail?id=168
pluto.jar Reference Implementation of the Java Portlet Specfication.
This Portlet container provides a runtime environment for
portlets implemented according to the Portlet API.
The project is still in the Apache Incubator.
- Version: (from jakarta-pluto CVS on September 22, 2004)
+ Version: (from jakarta-pluto CVS on November 2, 2004)
URL: http://portals.apache.org/pluto/
wsrp4j-shared.jar WSRP4J shared classes mostly derived from OASIS WSRP WSDL.
Comes with WSRP4J.
Use the version that comes with WSRP4J.
- Version: (from ws-wsrp4j CVS on July 9, 2004)
+ Version: (from ws-wsrp4j CVS on November 2, 2004)
URL: http://ws.apache.org/wsrp4j/
wsrp4j-consumer.jar WSRP4J consumer classes.
@@ -264,20 +264,6 @@
The following modifications were made to the
WSRP4J proxy portlet source:
-
- - org.apache.wsrp4j.consumer.portlet.impl.ProxyPortlet:
-
- IS: protected PortletKey getPortletKey(Map preferences)
- WAS: private PortletKey getPortletKey(Map preferences)
-
- IS: protected Producer getProducer(String producerID) throws WSRPException
- WAS: private Producer getProducer(String producerID) throws WSRPException
-
- Added new method
- protected ConsumerEnvironment getConsumerEnvironment()
- {
- return consumerEnv;
- }
- portlet.xml
@@ -286,7 +272,7 @@
IS: <value>org.jasig.portal.wsrp.consumer.portlet.ConsumerEnvironmentImpl</value>
WAS: <value>org.apache.wsrp4j.consumer.portlet.impl.ConsumerEnvironmentImpl</value>
-
+
- wsrp4j-logger.properties
IS: log4j.appender.A1.File=wsrp4j-consumer.log
@@ -469,6 +455,11 @@
<classpath refid="compile.classpath"/>
</javac>
+ <!-- Copy non-java resources -->
+ <copy todir="${build.home}/WEB-INF/classes">
+ <fileset dir="source" excludes="CVS,**/*.java"/>
+ </copy>
+
<!-- Copy associated resource files -->
<copy todir="${build.home}/WEB-INF/classes/properties">
<fileset dir="properties" includes="**/*"/>
@@ -477,11 +468,6 @@
<!-- Copy the Logger.properties file to the well-known location
log4j expects.-->
<copy file="properties/Logger.properties" tofile="${build.home}/WEB-INF/classes/log4j.properties"/>
-
- <!-- Copy serializer resources -->
- <copy todir="${build.home}/WEB-INF/classes/org/jasig/portal/serialize">
- <fileset dir="source/org/jasig/portal/serialize" includes="**/*.res"/>
- </copy>
<!-- Copy all stylesheets, stylesheet descriptions and stylesheet list files -->
<copy todir="${build.home}/WEB-INF/classes">
@@ -528,7 +514,6 @@
<!-- Copy external dependencies as required -->
<mkdir dir="${deploy.home}/WEB-INF/lib"/>
- <copy todir="${deploy.home}/WEB-INF/lib" file="${xalan.jar}"/>
<copy todir="${deploy.home}/WEB-INF/lib" file="${xercesImpl.jar}"/>
<copy todir="${deploy.home}/WEB-INF/lib" file="${xml-apis.jar}"/>
<copy todir="${deploy.home}/WEB-INF/lib" file="${tidy.jar}"/>
@@ -547,11 +532,12 @@
<copy todir="${deploy.home}/WEB-INF/lib" file="${jdbc2_0-stdext.jar}"/>
<copy todir="${deploy.home}/WEB-INF/lib" file="${jdbcDriver.jar}"/>
- <!-- This is Tomcat-specific! We need to think about a new property
+ <!-- There are Tomcat-specific! We need to think about a new property
that lets us specify the appropriate directory for other servers
-->
<copy todir="${server.home}/shared/lib" file="${portlet-api.jar}"/>
<copy todir="${server.home}/shared/lib" file="${pluto.jar}"/>
+ <copy todir="${server.home}/common/endorsed" file="${xalan.jar}"/>
<!-- This is Tomcat-specific and server name-specific!
We need to find out the best way to ensure cross-context
@@ -619,8 +605,7 @@
-->
- <target name="javadoc" depends="compile"
- description="Create Javadoc API documentation">
+ <target name="javadoc" description="Create Javadoc API documentation">
<mkdir dir="${dist.home}/docs/api"/>
<javadoc sourcepath="source"
@@ -908,7 +893,7 @@
The variable fragmentFile points to the XML file of the fragments definition
- ant fragment -DfragmentFile=/properties/al/fragments.xml
+ ant pubfragments -DfragmentFile=/properties/al/fragments.xml
-->
@@ -1280,24 +1265,23 @@
-->
-
+
<target name="pubchan" description="Publishes channels" depends="compile">
<echo message="Invoking Channel Publisher Tool"/>
-
+
<property name="channel" value=" "/>
<java fork="true" dir="${basedir}" classname="org.jasig.portal.tools.chanpub.ChannelPublisher">
- <classpath refid="compile.classpath"/>
<classpath>
- <pathelement path="${build.home}/WEB-INF/classes"/>
+ <pathelement path="${build.home}/WEB-INF/classes"/>
+ <path refid="compile.classpath"/>
</classpath>
<arg value="-n"/>
<arg value="${channel}"/>
</java>
</target>
-
-<!-- ===================== deployPortlet Target ========================= -->
+<!-- ===================== deployPortletApp Target ========================= -->
<!--
@@ -1318,9 +1302,9 @@
<property name="portletApp" value=" "/>
<java fork="true" dir="${basedir}" classname="org.jasig.portal.container.deploy.Deployer">
- <classpath refid="compile.classpath"/>
<classpath>
<pathelement path="${build.home}/WEB-INF/classes"/>
+ <path refid="compile.classpath"/>
</classpath>
<arg value="${deploy.home}/.."/>
<arg value="${portletApp}"/>
View
7 docs/README
@@ -53,6 +53,13 @@ The following ant command will deploy the documentation:
ant deploy
+About HSQLDB
+------------
+
+Using an older version of hsqldb.jar with another version of the HSQLDB server could cause uPortal to hang.
+See hsqldb.jar's entry in build.xml for documentation of exactly what version of hsqldb.jar is included with this release.
+
+
Copyright
---------
View
BIN  docs/uPortal_architecture_overview.pdf
Binary file not shown
View
137 docs/uPortal_properties_overview.txt
@@ -0,0 +1,137 @@
+uPortal Properties
+==================
+
+browser.mappings
+----------------
+Defines a system profile mapping for common browsers. Each properties line assignes a regular expression for the user agent string to a profile id. Note: order in which regexs are listed is important. The code will evaluate each regex from top to bottom, reporting a profile mapping as soon as something matches. That means, that something like Netscape's user agent should be matched last, since the regex for it is more general then that of IE. To optimize the matching process, describe most popular browsers first.
+
+
+EntityPropertyRegistry.xml
+--------------------------
+Defines property finders for portal entities.
+
+
+global_dictionary.properties
+----------------------------
+Translations for portal text.
+
+
+ldap.properties
+---------------
+Configuration for LDAP connection necessary for the use of the SimpleLdapSecuritycontext and CacheLdapSecurityContext security provider.
+
+
+ldap.xml
+--------
+Configuration file for LdapServices that describes multiple LDAP server configurations.
+
+
+Logger.properties
+-----------------
+Configuration file for logging engine. The log level (DEBUG, INFO, WARN, ERROR), log file location, logging syntax, etc. can be controlled.
+
+
+media.properties
+----------------
+Specifies a mapping rule between the value contained in the HTTP request's user-Agent field and a value to be scanned for in XSL stylesheet(s) associated with the XML data. This mapping enables relationships to be defined between client capabilities and stylesheets capable of acting on these capabilities. The rules defined are order-significant. In other words, if the first rule is unsuccessful, the second rule will be tried, etc. The media value "unknown" will be used when no rules are satisfied.
+
+
+mime.properties
+---------------
+Maps browser (media) types to their mime types.
+
+
+PersonDirs.xml
+--------------
+Makes possible a standard way for the uPortal framework and its installed channels to refer to particular person attributes. For example, if a channel wants to display a user's email address, it will look for an attribute called "mail", which appears as an alias in this file. This alias maps to the actual name of the field containing an email address in your data repository. Providing this level of indirection for attribute references makes it possible for organizations to share channels that refer to user's attributes.
+
+
+portal.properties
+-----------------
+This is the main configuration file for uPortal. It contains settings for...
+-caching of content and data structures for optimized performance
+-doctypes settings of markup documents produced by uPortal
+-formatting of markup documnets produced by uPortal
+-default layout templates for new users
+-implementations of uPortal data store interfaces
+-keys for groups service's distinguished groups
+-name finder factory implementations
+-profile management settings
+-method of obtaining database connections
+-default properties for CWebProxy and CGenericXSLT channels
+-object locking and caching settings
+-portal stats recorder implementation and settings
+-thread pool settings
+-permission policy implementation
+
+
+rdbm.properties
+---------------
+Sets the JDBC driver class, URL, user name, and password which is used by the reference implementation of uPortal data storage interfaces.
+
+
+resin.conf
+----------
+Only needed if Resin XSLT transformer is used. uPortal uses Xalan by default.
+
+
+sample-jaas.conf
+----------------
+Used in conjunction with JAASSecurityContext security provider.
+
+
+security.properties
+-------------------
+Defines the security provider or chain of providers that will establish the authentication of a portal user. Also specifies the default authorization implementation.
+
+
+serializer.properties
+---------------------
+Defines a mapping between client browser (media) types and serializer names that should be used with that media.
+So far, the following serializers are supported: XML, HTML, XHTML, WML, and HTML for PalmPilot.
+
+
+services.xml
+------------
+This list of services is processed by org.jasig.portal.services.ExternalServices. When uPortal is started, it will attempt to fire up all the services listed here. Each specification includes a class name, an optional description of initialization method and jndi binding name. External services will initialize each service (by either calling a constructor or an initialization method, if such is provided). If jndi binding name is provided either an instance of the specified class, or an object returned by the intialization method (if such method was specified) will be bound under the portal /services jndi context and distributed to the uPortal channels.
+
+
+worker.properties
+-----------------
+This file configures worker dispatch processors. Workers are used to implement functionality that requires complete control over the output stream, as well as access to the portal internal structures.
+
+
+al/fragments.xml
+-----------------
+Defines layout fragments and their restrictions to be published by the PublishFragment tool. These layout fragments will be incorporated into users' layouts via uPortal's aggregated layout manager.
+
+
+chanpub/*
+---------
+This directory holds the channel definition files which can be published by the ChannelPublisher tool. Each file should be named after the channel definition's fname. For example, if the file defines a channel with an fname equal to "my-channel", then the file should be called "my-channel.xml".
+
+
+db/dbloader.xml
+---------------
+Configuation file for DbLoader tool. Controls whether or not to drop/create/populate tables and whether or not to create a database script based on the SQL statements that are executed. Contains mappings for SQL data types which will override those specified by a jdbc driver.
+
+
+groups/compositeGroupsServices.xml
+----------------------------------
+Defines the sources of information from which the portal should load its groups.
+
+
+groups/LDAPGroupStoreConfig.xml
+-------------------------------
+Specifies the connection info, groups, and queries for the LDAP groups service.
+
+
+groups/PAGSGroupStoreConfig.xml
+-------------------------------
+Specifies the groups and group membership criteria for the Person Attributes Group Service (PAGS)
+
+
+groups/pags.properties
+----------------------
+Specifies the configuration implementation for the PAGS group store.
+
View
102 docs/uPortal_tools_overview.txt
@@ -0,0 +1,102 @@
+uPortal Tools
+=============
+
+Database Loading and Unloading
+------------------------------
+
+The reference implementation of uPortal's data storage interfaces requires a relational database. uPortal provides a tool, DbLoader, to load a relational database with the required uPortal tables and sample data. DbLoader performs the following tasks:
+
+1) Reads in properties/tables.xml file to determine the database schema
+2) Deletes existing tables specified in tables.xml.
+3) Creates the tables specified in tables.xml.
+4) Reads in properties/data.xml file to determine sample data.
+5) Inserts data from data.xml into the newly created tables.
+6) Creates a database script containing all the SQL statements previously executed.
+
+DbLoader can be configured by modifying properties/dbloader.xml. Because DbLoader relies on database metadata supplied by a JDBC driver, it may be necessary (for some combinations of drivers and databases) to supply a datatype mapping inside dbloader.xml. If this is necessary, DbLoader will print an error message with instructions.
+
+Another tool, DbUnload, can read an existing database table and serialize it into an xml file similar to tables.xml. This file can then be used in place of tables.xml to load another database.
+
+The tool DbTest prints out db metadata.
+
+To run DbLoader, type "ant db" from the uPortal base directory.
+To run DbUnload, type "ant dbunload" from the uPortal base directory.
+To run DbTest, type "ant dbtest" from the uPortal base directory.
+
+
+Adding users
+------------
+Data for new users is automatically created provided that the user can authenticate successfully to uPortal. The reference data store includes a table, UP_PERSON_DIR, that simulates a more robust directory store. A new user name and md5-encrypted password can be added to this table with the "md5passwd" tool. To run md5passwd, type "ant md5passwd -Dusername=someUserName" from the uPortal base directory. Then type the password at the prompt. Note that the user's first name, last name, and email address are not handled by md5passwd. These person attributes must be entered into the database with manual SQL statements.
+
+
+Deleting users
+--------------
+Data for portal users is stored in several database tables. User information can be deleted from the portal database using the "DeleteUser" tool. To run DeleteUser, type "ant deluser -Duser=someUserName" from the uPortal base directory.
+
+
+Register Channel Types
+----------------------
+The publishing process makes use of channel publishing documents (.cpd files) to determine what parameters and restrictions on parameters are necessary to collect for the use by a published channel. A set of serveral channel types, each of which references a channel publishing document, is supplied with uPortal. To add additional channel types, it is necessary to use the RegisterChannelTypes tool. To run this tool, type "ant regchantype" followed by a set of parameters. For example:
+
+ ant regchantype
+ -Dclass=org.jasig.portal.channels.CImage
+ -Dname="Image Channel"
+ -Ddescription="Displays image with optional title and subtitle"
+ -Duri=/org/jasig/portal/channels/CImage/CImage.cpd
+
+
+Register Stylesheets
+--------------------
+uPortal comes with a reference structure and theme stylesheet. To change the final rendering of a uPortal layout, it may be necessary to author and install new stylesheets. The RegisterStylesheet tool can be used to install new stylesheets and their accompanying stylesheet description files.
+
+Usage: registerStylesheet -(s|t) [-(u|d)] [stylesheetURI] [stylesheetDescriptionURI] [stylesheetId]
+The stylesheetId must be specified for update and delete operations.
+The URIs must be specified for add and update operations.
+The CLASSPATH environment variable should be set up to include both "uPortal/build" and "uPortal/build/WEB-INF/classes" dirs.
+
+For deployment all stylesheets are moved under the "/stylesheet/" directory, so the URI for a stylesheet will always begin with "/stylesheet/", unless you're specifying a global URL (which is not recommended).
+
+Stylesheet description files (.sdf) are moved to the same location, so their URI should be specified in the same manner. For example to specify a URI for a tab-column.xsl (part of the distribution), use "/stylesheets/org/jasig/portal/layout/tab-column/tab-column.xsl".
+
+Flag specification:
+ -s : process structure stylesheet (either "-t" or "-s" are required on the command line
+ -t : process theme stylesheet (either "-t" or "-s" are required on the command line
+ -u : update stylesheet definition
+ -u : remove stylesheet
+
+
+Publish Channels
+----------------
+As an alternative to using the publishing GUI inside uPortal, one can define, in XML format, a channel definition that represents a published channel. Then the channel publishing tool can publish the channel if it is new, or replace the existing channel if it already exists. The identifier used to determine if a channel has been previously published is the channel "fname" or functional name. To publish all the availabe channel definitions, run "ant pubchan -Dchannel=all". To publish just one channel, supply the channel definition file name: "ant pubchan -Dchannel=myChannel.xml".
+
+
+Layout Fragments Loader
+-----------------------
+With the advent of Aggregated Layouts, a tool is necessary to publish a defined layout fragment into the uPortal database. To run this tool, run "ant pubfragments -DfragmentFile=/properties/al/pushfragments.xml" from the uPortal base directory. The fragment file is an XML file that defines the pushed and pulled fragments and their restrictions.
+
+
+Deploy Portlet Applications
+---------------------------
+uPortal uses the Apache Pluto Portlet Container to manage Portlets. The Portlet Deployer tool deploys one or more Portlet applications, rewriting each application's web.xml file to suit the Pluto environment. To deploy multiple Portlet applications, place the Portlet application WAR files in the lib/portlets directory and run "ant deployPortletApp -DportletApp=all". To deploy just one Portlet application, supply the Portlet application WAR file location: "ant deployPortletApp -DporltetApp=C:/TEMP/myPortlet.war".
+
+
+XSLT Transformation
+-------------------
+Performs an XSLT transformation using uPortal XSLT libraries.
+
+ant RunXSLT -DXmlInput=input.xml -DoutputFile=output.xml -DXslfile=stylesheet.xsl
+
+where XmlInput is the file to be transformed,
+outputFile is where the result should saved and
+Xslfile is the URL of the xsl file to be used in the transform.
+
+
+uPortal 2.2.x and 2.3.x --> 2.4.x Upgrade Tool
+----------------------------------------------
+No upgrade tool is available to migrate a uPortal 2.2.x or 2.3.x installation to a uPortal 2.4 installation. Since the database changes are minimal, it should be relatively easy to perform this upgrade. See the README.txt file for information about database and properties files changes since 2.2.x or 2.3.x.
+
+
+uPortal 2.1.x --> 2.4.x Upgrade Tool
+------------------------------------
+See http://www.uportal.org/implementors/upgrade/upgrade21.html for instructions on using the included upgrade tools.
+
View
19 docs/website/implementors/services/compositeGroupService.html
@@ -298,21 +298,24 @@
is fully assembled.&nbsp; In the reference implementation, the service
name is built up node by node as the composite is composed.&nbsp; <br>
</p>
- <p><span style="font-style: italic;">Group Keys.</span>&nbsp; A
+ <p><span style="font-style: italic;">Group Keys.</span>&nbsp; A
group's composite service key is the concatenation of its
fully-qualified service name and its key in the local service.&nbsp; The
nodes of the service name, and the final node of the name and the local
key, are separated by a <span style="font-style: italic;">node separator</span>.&nbsp;
For example, a group with a local key of "English_Department" in a
-service named "ldap" with a node separator of "%" would have a key of
-"ldap%English_Department".&nbsp; <br>
+service named "ldap" with a node separator of "!" would have a key of
+"ldap!English_Department".&nbsp; <br>
</p>
<p><span style="font-style: italic;">Node Separators.</span>&nbsp;
-The default node separator is the period, or ".", but it can be any <code>String</code>
-not found within the nodes of a group key.&nbsp; For example, if local
-group keys include "Latin.101.Section01" and "chefs@columbia.edu", valid
-separators would include "$", "%", and "@@", but not "." or "@".&nbsp;
-For instructions on changing the node separator see <a
+The default node separator is a String containing a period, or ".", but
+it can be any String not found within the nodes of a group key.&nbsp;
+However, group keys can find their way into portal content and urls
+and are subject to xsl transformations. Therefore, the separator should not
+contain a character like '%' that has a special meaning and must be escaped
+to preserve its literal value. If local group keys include "Latin.101.Section01"
+and "chefs@columbia.edu", valid separators would include "$", and "_x", but not
+"." or "@".&nbsp; For instructions on changing the node separator see <a
href="#Configuring_the_Composite">Configuring the Composite</a>.&nbsp; <br>
</p>
<p><span style="font-style: italic;">Groups and their Service
View
35 docs/website/implementors/services/compositeGroupService_prt.html
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8">
@@ -259,23 +259,26 @@
reference implementation, the service name is built up node by node as
the composite is composed.&nbsp; <br>
</p>
-<p><span style="font-style: italic;">Group Keys.</span>&nbsp; A group's
-composite service key is the concatenation of its fully-qualified
-service name and its key in the local service.&nbsp; The nodes of the
-service name, and the final node of the name and the local key, are
-separated by a <span style="font-style: italic;">node separator</span>.&nbsp;
+ <p><span style="font-style: italic;">Group Keys.</span>&nbsp; A
+group's composite service key is the concatenation of its
+fully-qualified service name and its key in the local service.&nbsp; The
+nodes of the service name, and the final node of the name and the local
+key, are separated by a <span style="font-style: italic;">node separator</span>.&nbsp;
For example, a group with a local key of "English_Department" in a
-service named "ldap" with a node separator of "%" would have a key of
-"ldap%English_Department".&nbsp; <br>
-</p>
-<p><span style="font-style: italic;">Node Separators.</span>&nbsp; The
-default node separator is the period, or ".", but it can be any <code>String</code>
-not found within the nodes of a group key.&nbsp; For example, if local
-group keys include "Latin.101.Section01" and "chefs@columbia.edu", valid
-separators would include "$", "%", and "@@", but not "." or "@".&nbsp;
-For instructions on changing the node separator see <a
+service named "ldap" with a node separator of "!" would have a key of
+"ldap!English_Department".&nbsp; <br>
+ </p>
+ <p><span style="font-style: italic;">Node Separators.</span>&nbsp;
+The default node separator is a String containing a period, or ".", but
+it can be any String not found within the nodes of a group key.&nbsp;
+However, group keys can find their way into portal content and urls
+and are subject to xsl transformations. Therefore, the separator should not
+contain a character like '%' that has a special meaning and must be escaped
+to preserve its literal value. If local group keys include "Latin.101.Section01"
+and "chefs@columbia.edu", valid separators would include "$", and "_x", but not
+"." or "@".&nbsp; For instructions on changing the node separator see <a
href="#Configuring_the_Composite">Configuring the Composite</a>.&nbsp; <br>
-</p>
+ </p>
<p><span style="font-style: italic;">Groups and their Service Names.</span>&nbsp;
The significance of the service name in a group key is that it
directs us to the specific service that can answer the request for the
View
BIN  lib/pluto-1.0.1.jar → lib/pluto-1.0.1-rc1.jar
Binary file not shown
View
BIN  lib/portlets/proxyportlet.war
Binary file not shown
View
BIN  lib/portlets/testsuite.war
Binary file not shown
View
3  properties/Logger.properties
@@ -1,6 +1,9 @@
###########################################################################
# Properties file for the log4j logger system
#
+# Note: During the uPortal build, the file at /properties/Logger.properties is copied
+# to the log4j standard location /WEB-INF/classes/log4j.properties . This means that editing the file
+# at /properties/Logger.properties in a deployed uPortal will have no effect.
#
# Please read the instructions for the Log4J logging system at
# http://jakarta.apache.org/log4j/ if you want to modify this.
View
2  properties/PersonDirs.xml
@@ -211,6 +211,7 @@
<url>ldap://yu.yale.edu:389/dc=itstp, dc=yale, dc=edu</url>
<logonid>cn=bogus,cn=Users,dc=itstp,dc=yale,dc=edu</logonid>
<logonpassword>foobar</logonpassword>
+ <usercontext>cn=Users</usercontext>
2) Specify the name of an LDAP server as set up in uPortal's ldap.xml. For example,
@@ -223,7 +224,6 @@
<ldap-ref-name>Main</ldap-ref-name>
<uidquery>(cn={0})</uidquery>
- <usercontext>cn=Users</usercontext>
<attributes>
View
2  properties/db/data.xml
@@ -10,7 +10,7 @@
<column><name>FNAME</name><value>UP_FRAMEWORK</value></column>
<column><name>MAJOR</name><value>2</value></column>
<column><name>MINOR</name><value>4</value></column>
- <column><name>MICRO</name><value>0</value></column>
+ <column><name>MICRO</name><value>1</value></column>
<column><name>DESCRIPTION</name><value>The uPortal Framework.</value></column>
</row>
</rows>
View
8 properties/db/tables.xml
@@ -60,12 +60,12 @@
<column>
<name>PREF_ID</name>
<type>INTEGER</type>
- <desc>Preference key forieg key for UP_PORTLET_PREF_VALUES</desc>
+ <desc>Preference key foreign key for UP_PORTLET_PREF_VALUES</desc>
</column>
</columns>
<primary-key>CHAN_ID</primary-key>
<primary-key>PREF_ID</primary-key>
- <not-null>PORTLET_PREFERENCES_NAME</not-null>
+ <not-null>PORTLET_PREF_NAME</not-null>
</table>
<table sinceMajor="2" sinceMinor="4">
@@ -103,7 +103,7 @@
<primary-key>LAYOUT_ID</primary-key>
<primary-key>CHAN_DESC_ID</primary-key>
<primary-key>PREF_ID</primary-key>
- <not-null>PORTLET_PREFERENCES_NAME</not-null>
+ <not-null>PORTLET_PREF_NAME</not-null>
</table>
<table sinceMajor="2" sinceMinor="4">
@@ -1273,8 +1273,8 @@
<primary-key>ENTITY_TYPE_ID</primary-key>
<primary-key>ENTITY_KEY</primary-key>
<primary-key>LOCK_OWNER</primary-key>
+ <primary-key>EXPIRATION_TIME</primary-key>
<not-null>LOCK_TYPE</not-null>
- <not-null>EXPIRATION_TIME</not-null>
</table>
<!-- Used by the EntityPropertyRegistry to store aribtrary properties. -->
View
18 properties/security.properties
@@ -40,6 +40,15 @@
# This is the factory that supplies the concrete authentication class
root=org.jasig.portal.security.provider.SimpleSecurityContextFactory
+
+# Sample security context chain that caches the authenticated user's password
+#root=org.jasig.portal.security.provider.UnionSecurityContextFactory
+#root.db=org.jasig.portal.security.provider.SimpleSecurityContextFactory
+#root.db.cache=org.jasig.portal.security.provider.CacheSecurityContextFactory
+#root.ldap=org.jasig.portal.security.provider.SimpleLdapSecurityContextFactory
+#root.ldap.cache=org.jasig.portal.security.provider.CacheSecurityContextFactory
+
+#root.ldap=org.jasig.portal.security.provider.CacheLdapSecurityContextFactory
#root.cas=edu.columbia.ais.portal.security.provider.CasSecurityContextFactory
#Configurable security context example
@@ -49,9 +58,12 @@ root=org.jasig.portal.security.provider.SimpleSecurityContextFactory
#root.ldap_stu=org.jasig.portal.security.provider.SimpleLdapSecurityContextFactory
#root.ldap_fac=org.jasig.portal.security.provider.SimpleLdapSecurityContextFactory
-#securityContextProperty.propName=this would be a root context property
-#securityContextProperty.ldap_stu.connection=Students
-#securityContextProperty.ldap_fac.connection=Faculty
+#!!!!! PLEASE NOTE, THE NAMING CONVENTION HAS CHANGED AS OF 2.4.1 !!!!!
+# A context property for the 'root' context
+#securityContextProperty.root.propName=this would be a context property for the 'root' context
+# A context property for the 'root.ldap_stu' context
+#securityContextProperty.root.ldap_stu.connection=Students
+#securityContextProperty.root.ldap_fac.connection=Faculty
# Answers what tokens are examined in the request for each context during authentication.
View
119 scripts/createTables-hypersonic.script
@@ -1,119 +0,0 @@
-CREATE TABLE UP_USERS
-(
- ID INTEGER,
- USER_NAME VARCHAR(15) NOT NULL,
- FIRST_NAME VARCHAR(15),
- LAST_NAME VARCHAR(15),
- USER_LAYOUT_XML LONGVARCHAR,
- PRIMARY KEY (ID)
-);
-
-CREATE TABLE UP_SHADOW
-(
- USER_NAME VARCHAR (64),
- PASSWORD VARCHAR (64)
-);
-
-CREATE INDEX PORTAL_SHADOW_PK ON
- UP_SHADOW(USER_NAME);
-
-CREATE TABLE UP_CHANNELS
-(
- CHAN_ID INTEGER NOT NULL,
- TITLE VARCHAR(256) NULL,
- PUB_EMAIL VARCHAR(100) NULL,
- APPROVED INTEGER NULL,
- CHANNEL_XML LONGVARCHAR NOT NULL,
- PRIMARY KEY (CHAN_ID)
-);
-
-CREATE TABLE UP_CHAN_TYPES (
- NAME VARCHAR(70) NOT NULL,
- TYPE VARCHAR(50) NOT NULL,
- DESCR LONGVARCHAR NOT NULL,
- DEF_URI LONGVARCHAR NOT NULL,
- PRIMARY KEY (NAME)
-);
-
-CREATE TABLE UP_CLASS
-(
- CLASS_ID INTEGER NOT NULL,
- NAME VARCHAR(100) NOT NULL,
- PRIMARY KEY (CLASS_ID)
-);
-
-CREATE TABLE UP_CHAN_CLASS
-(
- CLASS_ID INTEGER NOT NULL,
- CHAN_ID INTEGER NOT NULL
-);
-
-CREATE TABLE UP_USER_PREFS
-(
- USER_NAME VARCHAR(15) NOT NULL,
- MEDIA VARCHAR(15) NOT NULL,
- STRUCTURE_STYLESHEET_NAME VARCHAR(30) NOT NULL,
- THEME_STYLESHEET_NAME VARCHAR(30) NOT NULL,
- CSS_STYLESHEET_NAME VARCHAR(30) NOT NULL
-);
-
-CREATE TABLE UP_USER_SS_PREFS
-(
- USER_NAME VARCHAR(15) NOT NULL,
- STYLESHEET_NAME VARCHAR(30) NOT NULL,
- USER_PREFERENCES_XML LONGVARCHAR
-);
-
-CREATE TABLE UP_STRUCT_SS
-(
- STYLESHEET_NAME VARCHAR(30) NOT NULL,
- STYLESHEET_URI LONGVARCHAR NOT NULL,
- STYLESHEET_DESCRIPTION_URI LONGVARCHAR NOT NULL,
- STYLESHEET_DESCRIPTION_TEXT LONGVARCHAR,
- PRIMARY KEY (STYLESHEET_NAME)
-);
-
-CREATE TABLE UP_THEME_SS
-(
- STYLESHEET_NAME VARCHAR(30) NOT NULL,
- STYLESHEET_URI LONGVARCHAR NOT NULL,
- STYLESHEET_DESCRIPTION_URI LONGVARCHAR NOT NULL,
- STYLESHEET_DESCRIPTION_TEXT LONGVARCHAR,
- PRIMARY KEY (STYLESHEET_NAME)
-);
-
-CREATE TABLE UP_CSS_SS
-(
- STYLESHEET_NAME VARCHAR(30) NOT NULL,
- STYLESHEET_URI LONGVARCHAR NOT NULL,
- STYLESHEET_DESCRIPTION_URI LONGVARCHAR NOT NULL,
- STYLESHEET_DESCRIPTION_TEXT LONGVARCHAR,
- PRIMARY KEY (STYLESHEET_NAME)
-);
-
-CREATE TABLE UP_STRUCT_SS_MAP
-(
- MEDIA VARCHAR(15) NOT NULL,
- STRUCTURE_STYLESHEET_NAME VARCHAR(30) NOT NULL
-);
-
-CREATE TABLE UP_THEME_SS_MAP
-(
- THEME_STYLESHEET_NAME VARCHAR(30) NOT NULL,
- STRUCTURE_STYLESHEET_NAME VARCHAR(30) NOT NULL
-);
-
-CREATE TABLE UP_CSS_SS_MAP
-(
- CSS_STYLESHEET_NAME VARCHAR(30) NOT NULL,
- THEME_STYLESHEET_NAME VARCHAR(30) NOT NULL
-);
-
-CREATE TABLE UPC_BOOKMARKS
-(
- ID INTEGER,
- PORTAL_USER_ID INTEGER,
- BOOKMARK_XML LONGVARCHAR,
- PRIMARY KEY (ID)
-);
-
View
15 scripts/dropTables.script
@@ -1,15 +0,0 @@
-DROP TABLE UP_USERS;
-DROP TABLE UP_SHADOW;
-DROP TABLE UP_CHANNELS;
-DROP TABLE UP_CHAN_TYPES;
-DROP TABLE UP_CLASS;
-DROP TABLE UP_CHAN_CLASS;
-DROP TABLE UP_USER_PREFS;
-DROP TABLE UP_USER_SS_PREFS;
-DROP TABLE UP_STRUCT_SS;
-DROP TABLE UP_THEME_SS;
-DROP TABLE UP_CSS_SS;
-DROP TABLE UP_STRUCT_SS_MAP;
-DROP TABLE UP_THEME_SS_MAP;
-DROP TABLE UP_CSS_SS_map;
-DROP TABLE UPC_BOOKMARKS;
View
269 scripts/populateTables.script
@@ -1,269 +0,0 @@
-INSERT INTO UP_USERS (ID, USER_NAME, FIRST_NAME, LAST_NAME) values (0, 'guest', 'Guest', 'Guest');
-
-INSERT INTO UP_USERS (ID, USER_NAME, FIRST_NAME, LAST_NAME) VALUES (1, 'demo', 'Demo', 'User');
-INSERT INTO UP_SHADOW (USER_NAME, PASSWORD) VALUES ('demo', '{MD5}IAnYXaWGdqTkifNNwo0bfIIphj2NPvSG');
-
-UPDATE UP_USERS SET USER_LAYOUT_XML=
-'<?xml version="1.0"?>
-<!DOCTYPE layout SYSTEM "file:/userLayout.dtd">
-<layout>
- <folder ID="t01" priority="1" name="Main">
- <folder ID="col01" priority="0" width="40%" name="Column 1">
- <channel ID="chan00" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="true" removable="true" detachable="false" class="org.jasig.portal.channels.CLogin" name="Login">
- </channel>
- <channel ID="chan01" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="true" detachable="true" class="org.jasig.portal.channels.CGenericXSLT" name="MozillaZine">
- <parameter value="webpages/rss/netscape.rss" name="xml"/>
- <parameter value="webpages/stylesheets/org/jasig/portal/channels/CGenericXSLT/RSS.ssl" name="ssl"/>
- </channel>
- <channel ID="chan02" priority="1" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="true" detachable="true" class="org.jasig.portal.channels.CGenericXSLT" name="StockCharts.com">
- <parameter value="webpages/rss/stockcharts.rss" name="xml"/>
- <parameter value="webpages/stylesheets/org/jasig/portal/channels/CGenericXSLT/RSS.ssl" name="ssl"/>
- </channel>
- </folder>
- <folder ID="col02" priority="0" width="60%" name="Column 2">
- <channel ID="chan03" priority="0" timeout="5000" minimized="false" editable="true" hasHelp="true" removable="true" detachable="true" class="org.jasig.portal.channels.CBookmarks" name="Bookmarks">
- </channel>
- <channel ID="chan04" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="true" detachable="true" class="org.jasig.portal.channels.CGenericXSLT" name="XML.com">
- <parameter value="webpages/rss/news.rss" name="xml"/>
- <parameter value="webpages/stylesheets/org/jasig/portal/channels/CGenericXSLT/RSS.ssl" name="ssl"/>
- </channel>
- </folder>
- </folder>
- <folder ID="t02" priority="0" name="uPortal Tools">
- <channel ID="chan90" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="false" detachable="false" class="org.jasig.portal.channels.CSubscriber" name="Subscribe">
- </channel>
- <channel ID="chan92" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="false" detachable="false" class="org.jasig.portal.channels.CPublisher" name="Publish">
- </channel>
- <channel ID="chan91" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="false" detachable="false" class="org.jasig.portal.channels.CUserPreferences" name="User Preferences">
- </channel>
- </folder>
- <folder ID="t03" priority="0" name="More">
- <folder ID="col03" priority="0" width="50%" name="Column 1">
- <channel ID="chan06" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="true" detachable="true" class="org.jasig.portal.channels.CGenericXSLT" name="uPortal-Powered Sites">
- <parameter value="http://interactivebusiness.com/publish/jasigPortalDemos.rss" name="xml"/>
- <parameter value="webpages/stylesheets/org/jasig/portal/channels/CGenericXSLT/RSS.ssl" name="ssl"/>
- </channel>
- <channel ID="chan07" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="true" detachable="true" class="org.jasig.portal.channels.CGenericXSLT" name="IBS News">
- <parameter value="http://interactivebusiness.com/publish/ibs.rss" name="xml"/>
- <parameter value="webpages/stylesheets/org/jasig/portal/channels/CGenericXSLT/RSS.ssl" name="ssl"/>
- </channel>
- </folder>
- <folder ID="col04" priority="0" width="50%" name="Column 2">
- <channel ID="chan08" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="true" detachable="true" class="org.jasig.portal.channels.CGenericXSLT" name="uPortal Developers Reference">
- <parameter value="http://asigdev.princeton.edu:82/portal/rss/jasigdev.rss" name="xml"/>
- <parameter value="webpages/stylesheets/org/jasig/portal/channels/CGenericXSLT/RSS.ssl" name="ssl"/>
- </channel>
- <channel ID="chan09" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="true" detachable="true" class="org.jasig.portal.channels.CGenericXSLT" name="Salon.com">
- <parameter value="http://www.salon.com/feed/RDF/salon_use.rdf" name="xml"/>
- <parameter value="webpages/stylesheets/org/jasig/portal/channels/CGenericXSLT/RSS.ssl" name="ssl"/>
- </channel>
- </folder>
- </folder>
-</layout>' WHERE USER_NAME='guest';
-
-UPDATE UP_USERS SET USER_LAYOUT_XML=
-'<?xml version="1.0"?>
-<!DOCTYPE layout SYSTEM "file:/userLayout.dtd">
-<layout>
- <folder ID="t01" priority="1" name="Main">
- <folder ID="col01" priority="0" width="40%" name="Column 1">
- <channel ID="chan00" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="true" detachable="true" class="org.jasig.portal.channels.CNumberGuess" name="Number Guessing Game">
- <parameter value="1" name="minNum"/>
- <parameter value="100" name="maxNum"/>
- </channel>
- <channel ID="chan01" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="true" detachable="true" class="org.jasig.portal.channels.CGenericXSLT" name="MozillaZine">
- <parameter value="webpages/rss/netscape.rss" name="xml"/>
- <parameter value="webpages/stylesheets/org/jasig/portal/channels/CGenericXSLT/RSS.ssl" name="ssl"/>
- </channel>
- <channel ID="chan02" priority="1" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="true" detachable="true" class="org.jasig.portal.channels.CGenericXSLT" name="StockCharts.com">
- <parameter value="webpages/rss/stockcharts.rss" name="xml"/>
- <parameter value="webpages/stylesheets/org/jasig/portal/channels/CGenericXSLT/RSS.ssl" name="ssl"/>
- </channel>
- </folder>
- </folder>
- <folder ID="t02" priority="0" name="uPortal Tools">
- <channel ID="chan90" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="false" detachable="false" class="org.jasig.portal.channels.CSubscriber" name="Subscribe">
- </channel>
- <channel ID="chan91" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="false" detachable="false" class="org.jasig.portal.channels.CUserPreferences" name="User Preferences">
- </channel>
- </folder>
-</layout>' WHERE USER_NAME='demo';
-
-INSERT INTO UP_CHANNELS (CHAN_ID, TITLE, PUB_EMAIL, APPROVED, CHANNEL_XML) VALUES (1, 'Mozillazine', NULL, 0,
-'<channel ID="chan01" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="true" detachable="true" class="org.jasig.portal.channels.CGenericXSLT" name="MozillaZine">
- <parameter value="webpages/rss/netscape.rss" name="xml"/>
- <parameter value="webpages/stylesheets/org/jasig/portal/channels/CGenericXSLT/RSS.ssl" name="ssl"/>
- </channel>')
-
-INSERT INTO UP_CHANNELS (CHAN_ID, TITLE, PUB_EMAIL, APPROVED, CHANNEL_XML) VALUES (2, 'Stockcharts', NULL, 0,
-'<channel ID="chan02" priority="1" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="true" detachable="true" class="org.jasig.portal.channels.CGenericXSLT" name="StockCharts.com">
- <parameter value="webpages/rss/stockcharts.rss" name="xml"/>
- <parameter value="webpages/stylesheets/org/jasig/portal/channels/CGenericXSLT/RSS.ssl" name="ssl"/>
- </channel>')
-
-INSERT INTO UP_CHANNELS (CHAN_ID, TITLE, PUB_EMAIL, APPROVED, CHANNEL_XML) VALUES (3, 'Bookmarks', NULL, 0,
-'<channel ID="chan03" priority="0" timeout="5000" minimized="false" editable="true" hasHelp="true" removable="true" detachable="true" class="org.jasig.portal.channels.CBookmarks" name="Bookmarks">
- </channel>')
-
-INSERT INTO UP_CHANNELS (CHAN_ID, TITLE, PUB_EMAIL, APPROVED, CHANNEL_XML) VALUES (4, 'XML.com', NULL, 0,
-'<channel ID="chan04" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="true" detachable="true" class="org.jasig.portal.channels.CGenericXSLT" name="XML.com">
- <parameter value="webpages/rss/news.rss" name="xml"/>
- <parameter value="webpages/stylesheets/org/jasig/portal/channels/CGenericXSLT/RSS.ssl" name="ssl"/>
- </channel>')
-
-INSERT INTO UP_CHANNELS (CHAN_ID, TITLE, PUB_EMAIL, APPROVED, CHANNEL_XML) VALUES (5, 'uPortal Demos', NULL, 0,
-'<channel ID="chan05" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="true" detachable="true" class="org.jasig.portal.channels.CGenericXSLT" name="uPortal-Powered Sites">
- <parameter value="http://interactivebusiness.com/publish/jasigPortalDemos.rss" name="xml"/>
- <parameter value="webpages/stylesheets/org/jasig/portal/channels/CGenericXSLT/RSS.ssl" name="ssl"/>
- </channel>')
-
-INSERT INTO UP_CHANNELS (CHAN_ID, TITLE, PUB_EMAIL, APPROVED, CHANNEL_XML) VALUES (6, 'IBS News', NULL, 0,
-'<channel ID="chan06" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="true" detachable="true" class="org.jasig.portal.channels.CGenericXSLT" name="IBS News">
- <parameter value="http://interactivebusiness.com/publish/ibs.rss" name="xml"/>
- <parameter value="webpages/stylesheets/org/jasig/portal/channels/CGenericXSLT/RSS.ssl" name="ssl"/>
- </channel>')
-
-INSERT INTO UP_CHANNELS (CHAN_ID, TITLE, PUB_EMAIL, APPROVED, CHANNEL_XML) VALUES (7, 'uPortal Developers Reference', NULL, 0,
-'<channel ID="chan07" priority="0" timeout="5000" minimized="false" editable="false" hasHelp="false" removable="true" detachable="true" class="org.jasig.portal.channels.CGenericXSLT" name="uPortal Developers Reference">
- <parameter value="http://asigdev.princeton.edu:82/portal/rss/jasigdev.rss" name="xml"/>
- <parameter value="webpages/stylesheets/org/jasig/portal/channels/CGenericXSLT/RSS.ssl" name="ssl"/>
- </channel>')
-
-INSERT INTO UP_CHAN_TYPES (NAME, TYPE, DESCR, DEF_URI)
-VALUES ('RSS Channel', 'org.jasig.portal.channels.CGenericXSLT',
-'RSS or Rich Site Summary, the most common channel format, is a channel which has its content defined through an XML document. Anyone may publish an RSS channel as long as the specification is adhered to and the file is stored on a publicly accessible web server. You will need to provide a URL for the RSS file.',
-'properties/channel_defs/RSS.xml');
-
-INSERT INTO UP_CHAN_TYPES (NAME, TYPE, DESCR, DEF_URI)
-VALUES ('XSL Channel', 'org.jasig.portal.channels.CGenericXSLT',
-'XSL renders XML to a particular style, is a channel which has its content defined through an XML document. Anyone may publish an XSL channel as long as the specification is adhered to and the file is stored on a publicly accessible web server. You will need to provide a URL or Path for the XML and XSL file.',
-'properties/channel_defs/XSL.xml');
-
-INSERT INTO UP_CLASS ( CLASS_ID, NAME ) VALUES (0, 'News');
-INSERT INTO UP_CLASS ( CLASS_ID, NAME ) VALUES (1, 'Development');
-INSERT INTO UP_CLASS ( CLASS_ID, NAME ) VALUES (2, 'Applications');
-
-INSERT INTO UP_CHAN_CLASS ( CLASS_ID, CHAN_ID ) VALUES(0, 1);
-INSERT INTO UP_CHAN_CLASS ( CLASS_ID, CHAN_ID ) VALUES(0, 2);
-INSERT INTO UP_CHAN_CLASS ( CLASS_ID, CHAN_ID ) VALUES(0, 6);
-INSERT INTO UP_CHAN_CLASS ( CLASS_ID, CHAN_ID ) VALUES(1, 4);
-INSERT INTO UP_CHAN_CLASS ( CLASS_ID, CHAN_ID ) VALUES(1, 5);
-INSERT INTO UP_CHAN_CLASS ( CLASS_ID, CHAN_ID ) VALUES(1, 7);
-INSERT INTO UP_CHAN_CLASS ( CLASS_ID, CHAN_ID ) VALUES(2, 3);
-
-INSERT INTO UP_USER_PREFS (USER_NAME, MEDIA, STRUCTURE_STYLESHEET_NAME, THEME_STYLESHEET_NAME, CSS_STYLESHEET_NAME)
-VALUES ('guest', 'netscape', 'Tab and Column layout', 'Nested tables', 'general CSS');
-
-INSERT INTO UP_USER_PREFS (USER_NAME, MEDIA, STRUCTURE_STYLESHEET_NAME, THEME_STYLESHEET_NAME, CSS_STYLESHEET_NAME)
-VALUES ('guest', 'explorer', 'Tab and Column layout', 'Nested tables', 'general CSS');
-
-INSERT INTO UP_USER_PREFS (USER_NAME, MEDIA, STRUCTURE_STYLESHEET_NAME, THEME_STYLESHEET_NAME, CSS_STYLESHEET_NAME)
-VALUES ('demo', 'netscape', 'Tab and Column layout', 'Nested tables', 'general CSS');
-
-INSERT INTO UP_USER_PREFS (USER_NAME, MEDIA, STRUCTURE_STYLESHEET_NAME, THEME_STYLESHEET_NAME, CSS_STYLESHEET_NAME)
-VALUES ('demo', 'explorer', 'Tab and Column layout', 'Nested tables', 'general CSS');
-
-INSERT INTO UP_USER_SS_PREFS (USER_NAME, STYLESHEET_NAME, USER_PREFERENCES_XML) VALUES ('guest', 'Tab and Column layout', '
-<structurestylesheetuserpreferences>
- <parameters>
- </parameters>
- <folderattributes>
- <attribute name="width">
- <folder folderid="col01" value="70%"/>
- <folder folderid="col02" value="30%"/>
- <folder folderid="col03" value="30%"/>
- <folder folderid="col04" value="70%"/>
- </attribute>
- </folderattributes>
- <channelattributes>
- </channelattributes>
-</structurestylesheetuserpreferences>
-');
-
-INSERT INTO UP_USER_SS_PREFS (USER_NAME, STYLESHEET_NAME, USER_PREFERENCES_XML) VALUES ('guest', 'Nested tables', '
-<themestylesheetuserpreferences>
- <parameters>
- <parameter name="activeTab">2</parameter>
- <parameter name="borderWidth">2</parameter>
- </parameters>
- <folderattributes>
- </folderattributes>
- <channelattributes>
- <attribute name="minimizable">
- <channel channelid="chan01" value="false"/>
- <channel channelid="chan02" value="false"/>
- </attribute>
- </channelattributes>
-</themestylesheetuserpreferences>
-');
-
-INSERT INTO UP_USER_SS_PREFS (USER_NAME, STYLESHEET_NAME, USER_PREFERENCES_XML) VALUES ('demo', 'Tab and Column layout', '
-<structurestylesheetuserpreferences>
- <parameters>
- </parameters>
- <folderattributes>
- <attribute name="width">
- <folder folderid="col01" value="70%"/>
- <folder folderid="col02" value="30%"/>
- <folder folderid="col03" value="30%"/>
- <folder folderid="col04" value="70%"/>
- </attribute>
- </folderattributes>
- <channelattributes>
- </channelattributes>
-</structurestylesheetuserpreferences>
-');
-
-INSERT INTO UP_USER_SS_PREFS (USER_NAME, STYLESHEET_NAME, USER_PREFERENCES_XML) VALUES ('demo', 'Nested tables', '
-<themestylesheetuserpreferences>
- <parameters>
- <parameter name="activeTab">1</parameter>
- <parameter name="borderWidth">1</parameter>
- </parameters>
- <folderattributes>
- </folderattributes>
- <channelattributes>
- <attribute name="minimizable">
- <channel channelid="chan01" value="false"/>
- <channel channelid="chan02" value="false"/>
- </attribute>
- </channelattributes>
-</themestylesheetuserpreferences>
-');
-
-INSERT INTO UP_STRUCT_SS (STYLESHEET_NAME, STYLESHEET_URI, STYLESHEET_DESCRIPTION_URI, STYLESHEET_DESCRIPTION_TEXT)
-VALUES ('Tab and Column layout', 'webpages/stylesheets/org/jasig/portal/LayoutBean/uLayout2sLayout.xsl', 'webpages/stylesheets/org/jasig/portal/LayoutBean/uLayout2sLayout.sdf', 'Presents the layout in terms of tabs and columns.');
-
-INSERT INTO UP_THEME_SS (STYLESHEET_NAME, STYLESHEET_URI, STYLESHEET_DESCRIPTION_URI, STYLESHEET_DESCRIPTION_TEXT)
-VALUES ('Nested tables', 'webpages/stylesheets/org/jasig/portal/LayoutBean/sLayout2html_full.xsl', 'webpages/stylesheets/org/jasig/portal/LayoutBean/sLayout2html_full.sdf', 'Renders tabs and columns as nested tables');
-
-INSERT INTO UP_CSS_SS (STYLESHEET_NAME, STYLESHEET_URI, STYLESHEET_DESCRIPTION_URI, STYLESHEET_DESCRIPTION_TEXT)
-VALUES ('general CSS', 'webpages/media/org/jasig/portal/layout/tabColumn/general.css', 'webpages/media/org/jasig/portal/layout/tabColumn/general.sdf', 'Body, channel tabs and link coloring and fonts');
-
-INSERT INTO UP_CSS_SS_MAP (CSS_STYLESHEET_NAME, THEME_STYLESHEET_NAME) VALUES ('general CSS', 'Nested tables');
-
-INSERT INTO UP_THEME_SS_MAP (THEME_STYLESHEET_NAME, STRUCTURE_STYLESHEET_NAME) VALUES ('Nested tables', 'Tab and Column layout');
-
-INSERT INTO UP_STRUCT_SS_MAP (MEDIA, STRUCTURE_STYLESHEET_NAME) VALUES ('netscape', 'Tab and Column layout');
-
-INSERT INTO UP_STRUCT_SS_MAP (MEDIA, STRUCTURE_STYLESHEET_NAME) VALUES ('explorer', 'Tab and Column layout');
-
-INSERT INTO UPC_BOOKMARKS (ID, PORTAL_USER_ID, BOOKMARK_XML) VALUES (0, 0,
-'<?xml version="1.0"?>
-<bookmarks>
- <bookmark url="http://www.jasig.org" name="JA-SIG" comments="Java in Administration Special Interest Group"/>
- <bookmark url="http://www.interactivebusiness.com" name="IBS" comments="provides uPortal Services"/>
- <bookmark url="http://www.paypal.com" name="PayPal" comments="Send and receive money online!"/>
- <bookmark url="http://google.com" name="Google" comments="great search engine"/>
-</bookmarks>
-');
-
-INSERT INTO UPC_BOOKMARKS (ID, PORTAL_USER_ID, BOOKMARK_XML) VALUES (1, 1,
-'<?xml version="1.0"?>
-<bookmarks>
- <bookmark url="http://www.jasig.org" name="JA-SIG" comments="Java in Administration Special Interest Group"/>
- <bookmark url="http://www.interactivebusiness.com" name="IBS" comments="provides uPortal Services"/>
- <bookmark url="http://www.paypal.com" name="PayPal" comments="Send and receive money online!"/>
- <bookmark url="http://google.com" name="Google" comments="great search engine"/>
-</bookmarks>
-');
View
2  source/org/jasig/portal/ChannelDefinition.java
@@ -199,7 +199,7 @@ public EntityIdentifier getEntityIdentifier() {
* @param parameter the channel parameter to add
*/
public void addParameter(ChannelParameter parameter) {
- addParameter(parameter.getName(), parameter.getValue(), String.valueOf(parameter.getOverride()));
+ parameters.put(parameter.getName(), parameter);
}
/**
View
14 source/org/jasig/portal/ChannelFactory.java
@@ -35,18 +35,22 @@
package org.jasig.portal;
+import java.util.Hashtable;
import java.util.Map;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.jasig.portal.car.CarResources;
import org.jasig.portal.layout.IUserLayoutChannelDescription;
import org.jasig.portal.layout.IUserLayoutManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
/**
* A factory class that produces <code>IChannel</code> instances.
+ * This class maintains a lazily-loaded, but permanent
+ * cache of channels that implement one of uPortal's
+ * multithreaded interfaces, IMultithreadedChannel or one of its variants.
*
- * @author <a href="mailto:pkharchenko@interactivebusiness.com">Peter Kharchenko</a>
+ * @author <a href="mailto:pkharchenko@unicon.net">Peter Kharchenko</a>
* @version $Revision$
*/
public class ChannelFactory {
@@ -54,7 +58,7 @@
private static final Log log = LogFactory.getLog(ChannelFactory.class);
// table of multithreaded channels
- public static final java.util.Hashtable staticChannels=new java.util.Hashtable();
+ private static final Hashtable staticChannels = new Hashtable();
// create a CAR class loader object for loading channel classes from CARs
// Note that the current class loader is passed as the parent and is
@@ -114,7 +118,7 @@ private static IChannel instantiateChannel(String channelSubscribeId, String cha
* @param uid a unique ID for use with multithreaded channels
* @return an <code>IChannel</code> object
*/
- public static IChannel instantiateChannel(String className, String uid) throws PortalException {
+ public static synchronized IChannel instantiateChannel(String className, String uid) throws PortalException {
IChannel ch = null;
boolean exists = false;
// Avoid instantiating a multithreaded channel more than once
View
6 source/org/jasig/portal/ChannelManager.java
@@ -268,7 +268,7 @@ public void finishedSession() {
try {
ch.receiveEvent(ev);
} catch (Exception e) {
- log.error(e);
+ log.error("Error sending session done event to channel " + ch, e);
}
}
}
@@ -718,7 +718,7 @@ public void passPortalEvent(String channelSubscribeId, PortalEvent le) {
try {
ch.receiveEvent(le);
} catch (Exception e) {
- log.error(e);
+ log.error("Error sending layout event " + le + " to channel " + ch, e);
}
} else {
log.error("ChannelManager::passPortalEvent() : trying to pass an event to a channel that is not in cache. (cahnel=\"" + channelSubscribeId + "\")");
@@ -862,7 +862,7 @@ private void processRequestChannelParameters(HttpServletRequest req)
chObj.setRuntimeData(rd);
}
catch (Exception e) {
- chObj=replaceWithErrorChannel(channelTarget,CError.SET_RUNTIME_DATA_EXCEPTION,e,null,false);
+ chObj=replaceWithErrorChannel(channelTarget,CError.SET_RUNTIME_DATA_EXCEPTION,e,null,true);
}
}
}
View
5 source/org/jasig/portal/ChannelRenderer.java
@@ -66,9 +66,6 @@
private static final Log log = LogFactory.getLog(ChannelRenderer.class);
public static final boolean CACHE_CHANNELS=PropertiesManager.getPropertyAsBoolean("org.jasig.portal.ChannelRenderer.cache_channels");
- public static final int RENDERING_SUCCESSFUL=0;
- public static final int RENDERING_FAILED=1;
- public static final int RENDERING_TIMED_OUT=2;
public static final String[] renderingStatus={"successful","failed","timed out"};
@@ -230,7 +227,7 @@ public void cancelRendering()
* outputRendering() is a blocking function. It will return only when the channel completes rendering
* or fails to render by exceeding allowed rendering time.
* @param out Document Handler that will receive information rendered by the channel.
- * @return error code. 0 - successful rendering; 1 - rendering failed; 2 - rendering timedOut;
+ * @return a code specified in IChannelRenderer
*/
public int outputRendering (ContentHandler out) throws Throwable {
int renderingStatus=completeRendering();
View
8 source/org/jasig/portal/EntityTypes.java
@@ -232,7 +232,7 @@ private void deleteEntityType(EntityType et) throws SQLException
}
catch (java.sql.SQLException sqle)
{
- log.error( sqle);
+ log.error("Exception deleting entity type [" + et + "]", sqle);
throw sqle;
}
}
@@ -425,7 +425,7 @@ private void initialize()
{ stmnt.close(); }
}
catch (Exception ex)
- { log.error( ex); }
+ { log.error("Exception initializing cache of entity types.", ex); }
finally
{ RDBMServices.releaseConnection(conn); }
}
@@ -483,7 +483,7 @@ private void insertEntityType(EntityType et) throws SQLException
}
catch (java.sql.SQLException sqle)
{
- log.error( sqle);
+ log.error("Error inserting entity type " + et, sqle);
throw sqle;
}
}
@@ -605,7 +605,7 @@ private void updateEntityType(EntityType et) throws SQLException
}
catch (java.sql.SQLException sqle)
{
- log.error( sqle);
+ log.error("Exception updating entity type [" + et + "]", sqle);
throw sqle;
}
}
View
91 source/org/jasig/portal/ExceptionHelper.java
@@ -36,6 +36,9 @@
package org.jasig.portal;
import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
@@ -66,13 +69,91 @@ public static String shortStackTrace(Throwable ex) {
ex.printStackTrace(new java.io.PrintWriter(sw));
sw.flush();
String stktr = sw.toString();
- for (int i=0;i<boundaries.length;i++) {
- int cut = stktr.indexOf(boundaries[i]);
- if (cut > 0)
- return stktr.substring(0, cut).trim();
+ return trimStackTrace(stktr);
+ }
+
+ /**
+ * Trims a String representation of a Stack Trace to remove
+ * the portion of the trace that is in the servlet container layer.
+ * @param stackTrace - String result of printStackTrace
+ * @return the stack trace with portions of the trace that dive into the container
+ * layer removed.
+ */
+ static String trimStackTrace(String stackTrace) {
+
+ StringBuffer trimmedTrace = new StringBuffer();
+
+ // a List of Strings to be trimmed and appended to the buffer
+ // these represent elements in the causal chain
+ List fragments = new ArrayList();
+
+ int causeCut = (stackTrace.indexOf("Caused by"));
+
+ if (causeCut > 0) {
+ // there are one or more Caused by fragments to consider
+ // we traverse stackTrace, parsing out fragments for later processing
+ // and updating stackTrace to contain the remaining unparsed portion
+ // as we go
+
+ while (stackTrace.length() > 0) {
+
+ if (stackTrace.startsWith("Caused by")){
+ // don't count the "Caused by" leading the stackTrace
+ causeCut = stackTrace.substring(9).indexOf("Caused by");
+ if (causeCut > 0)
+ causeCut += 9;
+ } else {
+ causeCut = stackTrace.indexOf("Caused by");
+ }
+
+ if (causeCut > -1) {
+ // stackTrace currently includes multiple fragments
+ // parse out the first and leave the rest for next iteration
+
+ fragments.add(stackTrace.substring(0, causeCut));
+ stackTrace = stackTrace.substring(causeCut);
+ } else {
+ // stackTrace currently is a bare fragment
+ // grab it
+ fragments.add(stackTrace);
+ stackTrace = "";
+ }
+ }
+ } else {
+ // there's ony a single Throwable in the chain
+ fragments.add(stackTrace);
+ }
+
+ // now that we have fragments to consider
+
+ for (Iterator iter = fragments.iterator(); iter.hasNext();){
+ String consideredFragment = (String) iter.next();
+
+ // flag to indicate that a trimmed form of this fragment has been appended
+ // to the trimmed stack trace buffer
+ boolean appended = false;
+ for (int i=0; i < boundaries.length; i++) {
+ int cut = consideredFragment.indexOf(boundaries[i]);
+ if (cut > 0) {
+ // stack trace includes a trace through our container
+ // in which we are not interested: trim it.
+ // grab the desired portion up to the boundary
+ trimmedTrace.append(consideredFragment.substring(0, cut).trim());
+ trimmedTrace.append("\n");
+ appended = true;
+ break;
+ }
+ }
+
+ if (! appended) {
+ // a trimmed version of this fragment was not appended
+ // because it doesn't need to be trimmed -- append the whole thing.
+ trimmedTrace.append(consideredFragment.trim());
+ trimmedTrace.append("\n");
+ }
}
- return stktr;
+ return trimmedTrace.toString();
}
/**
View
6 source/org/jasig/portal/IChannelRenderer.java
@@ -66,13 +66,13 @@
public final static String RCS_ID = "@(#) $Header$";
/** <p>Channel rendering was successful.</p> */
- int RENDERING_SUCCESSFUL = 0;
+ public static int RENDERING_SUCCESSFUL = 0;
/** <p>Channel rendering failed.</p> */
- int RENDERING_FAILED = 1;
+ public static int RENDERING_FAILED = 1;
/** <p>Channel rendering timed-out.</p> */
- int RENDERING_TIMED_OUT = 2;
+ public static int RENDERING_TIMED_OUT = 2;
/**
* <p>Starts the channel rendering process.</p>
View
18 source/org/jasig/portal/LoginServlet.java
@@ -47,6 +47,7 @@
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
import org.jasig.portal.security.IPerson;
import org.jasig.portal.security.PersonManagerFactory;
@@ -97,9 +98,9 @@
}
}
} catch(PortalException pe) {
- log.error("LoginServlet::static "+pe);
+ log.error("LoginServlet::static ", pe);
} catch(IOException ioe) {
- log.error("LoginServlet::static "+ioe);
+ log.error("LoginServlet::static ", ioe);
}
redirectString=upFile;
credentialTokens=cHash;
@@ -139,9 +140,14 @@ public void service (HttpServletRequest request, HttpServletResponse response) t
*/
String targetFname = request.getParameter("uP_fname");
String targetArgs = request.getParameter("uP_args");
- // Clear out the existing session for the user
- request.getSession().invalidate();
- // Retrieve the user's session
+
+ // Clear out the existing session for the user if they have one
+ final HttpSession s = request.getSession(false);
+ if (s != null) {
+ s.invalidate();
+ }
+
+ // Create the user's session
request.getSession(true);
IPerson person = null;
try {
@@ -156,7 +162,7 @@ public void service (HttpServletRequest request, HttpServletResponse response) t
m_authenticationService.authenticate(principals, credentials, person);
} catch (Exception e) {
// Log the exception
- log.error( e);
+ log.error("Exception authenticating the request", e);
// Reset everything
request.getSession(false).invalidate();
// Add the authentication failure
View
12 source/org/jasig/portal/LogoutServlet.java
@@ -103,11 +103,9 @@ public void init () throws ServletException {
}
}
} catch (PortalException pe) {
- log.error( "LogoutServlet::static " + pe);
- log.error( pe);
+ log.error( "LogoutServlet::static ", pe);
} catch (IOException ioe) {
- log.error( "LogoutServlet::static " + ioe);
- log.error( ioe);
+ log.error( "LogoutServlet::static", ioe);
}
REDIRECT_MAP = rdHash;
DEFAULT_REDIRECT = upFile;
@@ -136,7 +134,8 @@ public void doGet (HttpServletRequest request, HttpServletResponse response)
StatsRecorder.recordLogout(person);
}
} catch (Exception e) {
- log.error( e);
+ log.error("Exception recording logout " +
+ "associated with request " + request, e);
}
// Clear out the existing session for the user
@@ -211,8 +210,7 @@ private String getRedirectionUrl (HttpServletRequest request) {
}
} catch (Exception e) {
// Log the exception
- log.error( "LogoutServlet::getRedirectionUrl() Error: " + e);
- log.error( e);
+ log.error( "LogoutServlet::getRedirectionUrl() Error:", e);
}
if (redirect == null) {
redirect = defaultRedirect;
View
6 source/org/jasig/portal/PortalEvent.java
@@ -43,7 +43,6 @@
* <li> helpButtonEvent - occurs when a help button on the channel frame has been hit </li>
* <li> aboutButtonEvent - occurs when an about button on the channel frame has been hit </li>
* <li> detachButtonEvent - occurs when a detach button on the channel frame has been hit </li>
- * <li> renderingDone - occurs at the end of each rendering cycle </li>
* <li> sessionDone - signlas channel that current session is beign terminated </li>
* <li> unsubscribe - signlas channel that the user has unsubscribed the channel </li>
* </ul>
@@ -53,6 +52,11 @@
public class PortalEvent
{
// framework-generated events
+
+ /**
+ * Warning: the framework never sends this event. Listening for it is pointless.
+ * @deprecated this event will be removed in uPortal 2.5
+ */
public static final int RENDERING_DONE = 0;
public static final int SESSION_DONE = 1;
public static final int UNSUBSCRIBE = 2;
View
11 source/org/jasig/portal/PortalSessionManager.java
@@ -42,6 +42,7 @@
import java.net.URLConnection;
import java.util.Collections;
import java.util.HashSet;
+import java.util.Hashtable;
import java.util.Random;
import java.util.Set;
@@ -248,7 +249,7 @@ public void doGet(HttpServletRequest req, HttpServletResponse res) {
// fire away
if(ALLOW_REPEATED_REQUESTS) {
- userInstance.writeContent(new RequestParamWrapper(req,true),res);
+ userInstance.writeContent(new RequestParamWrapper(req,true,false),res);
} else {
// generate and register a new tag
String newTag=Long.toHexString(randomGenerator.nextLong());
@@ -258,8 +259,12 @@ public void doGet(HttpServletRequest req, HttpServletResponse res) {
log.error("PortalSessionManager::doGet() : a duplicate tag has been generated ! Time's up !");
}
- RequestParamWrapper wrappedRequest = new RequestParamWrapper(req,request_verified);
- wrappedRequest.getParameterMap().putAll(PortletStateManager.getURLDecodedParameters(wrappedRequest));
+ // need to decode before calling RequestParamWrapper due to potential portlet upload
+ Hashtable params = PortletStateManager.getURLDecodedParameters(req);
+ // do we have the uP_portlet_action parameter?
+ boolean isPortletAction = params.containsKey(PortletStateManager.ACTION);
+ RequestParamWrapper wrappedRequest = new RequestParamWrapper(req, request_verified, isPortletAction);
+ wrappedRequest.getParameterMap().putAll(params);
userInstance.writeContent(wrappedRequest, new ResponseSubstitutionWrapper(res,INTERNAL_TAG_VALUE,newTag));
}
View
12 source/org/jasig/portal/RDBMChannelRegistryStore.java
@@ -361,7 +361,8 @@ public ChannelDefinition getChannelDefinition(int channelPublishId) throws SQLEx
try {
channelDef = (ChannelDefinition)EntityCachingService.instance().get(ChannelDefinition.class, String.valueOf(channelPublishId));
} catch (Exception e) {
- log.error( e);
+ log.error("Error checking cache for definition of channel with publish id "
+ + channelPublishId, e);
}
// If not found in cache, get it from the store and cache it, otherwise return it
@@ -508,7 +509,7 @@ public ChannelDefinition getChannelDefinition(int channelPublishId) throws SQLEx
try {
EntityCachingService.instance().add(channelDef);
} catch (Exception e) {
- log.error( e);
+ log.error("Error caching channel definition " + channelDef, e);
}
} finally {
@@ -707,11 +708,11 @@ public void saveChannelDefinition (ChannelDefinition channelDef) throws Exceptio
try {
EntityCachingService.instance().update(channelDef);
} catch (Exception e) {
- log.error( e);
+ log.error("Error updating cache for channel definition " + channelDef, e);
}
} catch (SQLException sqle) {
- log.error( sqle);
+ log.error("Exception saving channel definition " + channelDef, sqle);
RDBMServices.rollback(con);
throw sqle;
} finally {
@@ -770,7 +771,8 @@ public void deleteChannelDefinition(ChannelDefinition channelDef) throws SQLExce
try {
EntityCachingService.instance().remove(channelDef);
} catch (Exception e) {
- log.error( e);
+ log.error("Error removing channel definition "
+ + channelDef + " from cache.", e);
}
} finally {
View
18 source/org/jasig/portal/RDBMServices.java
@@ -236,7 +236,7 @@
releaseConnection(con);
}
} catch (Exception e) {
- log.error( e);
+ log.error("Exception in static initialization of RDBMServices", e);
}
}
@@ -296,9 +296,9 @@ public static Connection getConnection(String dbName) {
log.error( "The database '" + dbName + "' could not be found.");
}
} catch (javax.naming.NamingException ne) {
- log.error( ne);
+ log.error("Exception looking up database [" + dbName + "] in JDNI", ne);
} catch (SQLException sqle) {
- log.error( sqle);
+ log.error("Exception getting and configuring connection to [" + dbName + "]", sqle);
}
return conn;
}
@@ -337,7 +337,7 @@ public static Connection getConnection () {
String errMsg = SQLe.getMessage();
if (!errMsg.equals(prevErrorMsg)) { // Only need to see one instance of this error
log.warn("Driver " + sJdbcDriver + " produced error: " + SQLe.getMessage() + ". Trying to get connection again.");
- log.info( SQLe);
+ log.info("Exception getting and configuring connection.", SQLe);
prevErrorMsg = errMsg;
}
}
@@ -354,7 +354,7 @@ public static void releaseConnection (Connection con) {
if (con != null)
con.close();
} catch (Exception e) {
- log.error( e);
+ log.error("Exception releasing connection", e);
}
}
@@ -367,7 +367,7 @@ public static void closePreparedStatement (java.sql.PreparedStatement ps) {
if (ps != null)
ps.close();
} catch (Exception e) {
- log.error( e);
+ log.error("Exception closing prepared statement [" + ps +"]", e);
}
}
@@ -380,7 +380,7 @@ public static void closePreparedStatement (PreparedStatement ps) {
if (ps != null)
ps.close();
} catch (Exception e) {
- log.error( e);
+ log.error("Exception closing PreparedStatement [" + ps + "]", e);
}
}
@@ -393,7 +393,7 @@ public static void closeResultSet (ResultSet rs) {
if (rs != null)
rs.close();
} catch (Exception e) {
- log.error( e);
+ log.error("Exception closing result set [" + rs + "]", e);
}
}
@@ -406,7 +406,7 @@ public static void closeStatement (Statement st) {
if (st != null)
st.close();
} catch (Exception e) {
- log.error( e);
+ log.error("Exception closing statement [" + st + "]", e);
}
}
View
417 source/org/jasig/portal/RDBMUserLayoutStore.java
@@ -1,5 +1,5 @@
/**
- * Copyright ? 2001, 2002 The JA-SIG Collaborative. All rights reserved.
+ * Copyright © 2001, 2002 The JA-SIG Collaborative. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -417,7 +417,9 @@ public boolean updateThemeStylesheetDescription (String stylesheetDescriptionURI
this.populateChannelAttributeTable(stylesheetDescriptionXML, sssd);
updateThemeStylesheetDescription(sssd);
} catch (Exception e) {
- log.debug(e);
+ log.debug("Exception updating theme stylesheet description=" +
+ "[" + stylesheetDescriptionURI + "] stylesheetUri=["+ stylesheetURI +
+ "] stylesheetId=["+ stylesheetId + "]", e);
return false;
}
return true;
@@ -451,7 +453,10 @@ public boolean updateStructureStylesheetDescription (String stylesheetDescriptio
updateStructureStylesheetDescription(fssd);
} catch (Exception e) {
- log.debug(e);
+ log.debug("Exception updating structure stylesheet description " +
+ "stylesheetDescriptionUri=[" + stylesheetDescriptionURI + "]" +
+ " stylesheetUri=[" + stylesheetURI +
+ "] stylesheetId=" + stylesheetId , e);
return false;
}
return true;
@@ -487,7 +492,9 @@ public Integer addStructureStylesheetDescription (String stylesheetDescriptionUR
return addStructureStylesheetDescription(fssd);
} catch (Exception e) {
- log.debug(e);
+ log.debug("Error adding stylesheet: " +
+ "description Uri=[" + stylesheetDescriptionURI + "] " +
+ "stylesheetUri=[" + stylesheetURI + "]", e);
}
return null;
}
@@ -540,7 +547,9 @@ public Integer addThemeStylesheetDescription (String stylesheetDescriptionURI, S
return addThemeStylesheetDescription(sssd);
} catch (Exception e) {
- log.debug(e);
+ log.debug("Exception adding theme stylesheet description " +
+ "description uri=[" + stylesheetDescriptionURI + "] " +
+ "stylesheet uri=[" + stylesheetURI + "]", e);
}
return null;
}
@@ -1948,8 +1957,9 @@ public UserProfile getUserProfileById (IPerson person, int profileId) throws Exc
if (rs.wasNull()) {
themeSsId = 0;
}
- return new UserProfile(profileId, temp3,temp4, layoutId,
- structSsId, themeSsId);
+ UserProfile userProfile = new UserProfile(profileId, temp3,temp4, layoutId, structSsId, themeSsId);
+ userProfile.setLocaleManager(new LocaleManager(person));
+ return userProfile;
}
else {
throw new Exception("Unable to find User Profile for user " + userId + " and profile " + profileId);
@@ -2598,192 +2608,249 @@ public void setUserBrowserMapping (IPerson person, String userAgent, int profile
}
/**
- * Save the user layout
+ * Save the user layout.
* @param person
* @param profile
* @param layoutXML
* @throws Exception
*/
- public void setUserLayout (IPerson person, UserProfile profile, Document layoutXML, boolean channelsAdded) throws Exception {
- int userId = person.getID();
- int profileId=profile.getProfileId();
- int layoutId=0;
- ResultSet rs;
- Connection con = RDBMServices.getConnection();
- try {
- RDBMServices.setAutoCommit(con, false); // Need an atomic update here
- Statement stmt = con.createStatement();
+ public void setUserLayout(IPerson person, UserProfile profile, Document layoutXML, boolean channelsAdded) throws Exception {
+ long startTime = System.currentTimeMillis();
+ int userId = person.getID();
+ int profileId = profile.getProfileId();
+ int layoutId = 0;
+ ResultSet rs;
+ Connection con = RDBMServices.getConnection();
try {
- long startTime = System.currentTimeMillis();
-
- // eventually we want to be able to just get layoutId from the profile, but because of the
- // template user layouts we have to do this for now ...
- layoutId = this.getLayoutID(userId, profileId);
-
- boolean firstLayout = false;
- if (layoutId == 0) { // First personal layout for this user/profile
- layoutId = 1;
- firstLayout = true;
- }
-
- String selectString = "USER_ID=" + userId + " AND LAYOUT_ID=" + layoutId;
- String sSql = "DELETE FROM UP_LAYOUT_PARAM WHERE " + selectString;
- log.debug("RDBMUserLayoutStore::setUserLayout(): " + sSql);
- stmt.executeUpdate(sSql);
- sSql = "DELETE FROM UP_LAYOUT_STRUCT WHERE " + selectString;
- log.debug("RDBMUserLayoutStore::setUserLayout(): " + sSql);
- stmt.executeUpdate(sSql);
- if (DEBUG > 1) {
- System.err.println("--> saving document");
- dumpDoc(layoutXML.getFirstChild().getFirstChild(), "");
- System.err.println("<--");
- }
-
- RDBMServices.PreparedStatement structStmt = new RDBMServices.PreparedStatement(con,
- "INSERT INTO UP_LAYOUT_STRUCT " +
- "(USER_ID, LAYOUT_ID, STRUCT_ID, NEXT_STRUCT_ID, CHLD_STRUCT_ID,EXTERNAL_ID,CHAN_ID,NAME,TYPE,HIDDEN,IMMUTABLE,UNREMOVABLE) " +
- "VALUES ("+ userId + "," + layoutId + ",?,?,?,?,?,?,?,?,?,?)");
- try {
- RDBMServices.PreparedStatement parmStmt = new RDBMServices.PreparedStatement(con,
- "INSERT INTO UP_LAYOUT_PARAM " +
- "(USER_ID, LAYOUT_ID, STRUCT_ID, STRUCT_PARM_NM, STRUCT_PARM_VAL) " +
- "VALUES ("+ userId + "," + layoutId + ",?,?,?)");
+ RDBMServices.setAutoCommit(con, false); // Need an atomic update here
+
+ // Eventually we want to be able to just get layoutId from the
+ // profile, but because of the template user layouts we have to do this for now ...
+ layoutId = this.getLayoutID(userId, profileId);
+
+ boolean firstLayout = false;
+ if (layoutId == 0) {
+ // First personal layout for this user/profile
+ layoutId = 1;
+ firstLayout = true;
+ }