From 590a23afccacd1191d3ac2a46f8a43c099fdb287 Mon Sep 17 00:00:00 2001 From: "infrastructure@lists.ja-sig.org" Date: Fri, 5 Nov 2004 00:44:02 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create tag 'rel-2-4-1'. git-svn-id: https://source.jasig.org/uPortal/tags/rel-2-4-1@9546 f5dbab47-78f9-eb45-b975-e544023573eb --- build.properties | 6 +- build.xml | 37 +- .../services/compositeGroupService.html | 19 +- .../services/compositeGroupService_prt.html | 35 +- lib/{pluto-1.0.1.jar => pluto-1.0.1-rc1.jar} | Bin 133060 -> 133543 bytes lib/portlets/proxyportlet.war | Bin 3190122 -> 3190722 bytes lib/portlets/testsuite.war | Bin 2297436 -> 2624315 bytes properties/PersonDirs.xml | 2 +- properties/db/data.xml | 2 +- properties/db/tables.xml | 6 +- properties/security.properties | 18 +- scripts/createTables-hypersonic.script | 119 ---- scripts/dropTables.script | 15 - scripts/populateTables.script | 269 -------- .../org/jasig/portal/ChannelDefinition.java | 2 +- source/org/jasig/portal/ChannelManager.java | 6 +- source/org/jasig/portal/EntityTypes.java | 8 +- source/org/jasig/portal/ExceptionHelper.java | 91 ++- source/org/jasig/portal/LoginServlet.java | 6 +- source/org/jasig/portal/LogoutServlet.java | 12 +- .../jasig/portal/PortalSessionManager.java | 11 +- .../portal/RDBMChannelRegistryStore.java | 12 +- source/org/jasig/portal/RDBMServices.java | 18 +- .../org/jasig/portal/RDBMUserLayoutStore.java | 417 +++++++----- .../portal/ReferenceSequenceGenerator.java | 3 +- .../org/jasig/portal/RequestParamWrapper.java | 10 +- source/org/jasig/portal/StylesheetSet.java | 2 +- source/org/jasig/portal/UserInstance.java | 2 +- .../jasig/portal/UserPreferencesManager.java | 9 +- source/org/jasig/portal/Version.java | 2 +- source/org/jasig/portal/channels/CApplet.java | 2 +- .../portal/channels/CChannelManager.java | 33 +- source/org/jasig/portal/channels/CError.java | 25 +- source/org/jasig/portal/channels/CHeader.java | 4 +- source/org/jasig/portal/channels/CImage.java | 2 +- .../jasig/portal/channels/CInlineFrame.java | 2 +- .../jasig/portal/channels/CSecureInfo.java | 2 +- .../UserPreferences/CUserPreferences.java | 4 +- .../UserPreferences/GPreferencesState.java | 4 +- .../UserPreferences/ManageProfilesState.java | 4 +- .../portal/channels/iccdemo/CHistory.java | 12 +- .../portal/channels/iccdemo/CURLSelector.java | 8 +- .../portal/channels/iccdemo/CViewer.java | 12 +- .../CPermissionsManager.java | 23 +- .../CPermissionsManagerServant.java | 2 +- .../CPermissionsManagerServantFactory.java | 4 +- .../permissionsmanager/CommandFactory.java | 2 +- .../PermissiblePublishChannels.java | 2 +- .../PermissibleSubscribeChannels.java | 2 +- .../permissionsmanager/PermissionsXML.java | 6 +- .../RDBMPermissibleRegistry.java | 6 +- .../commands/AssignPermissions.java | 2 +- .../channels/portlet/CPortletAdapter.java | 35 +- .../portal/channels/webproxy/CWebProxy.java | 2 +- .../portal/concurrency/caching/LRUCache.java | 3 +- .../RDBMCachedEntityInvalidationStore.java | 8 +- .../locking/RDBMEntityLockStore.java | 8 +- .../PortletApplicationUnmarshaller.java | 30 +- .../container/om/common/LanguageImpl.java | 7 +- .../container/om/common/LanguageSetImpl.java | 68 +- .../om/entity/PortletEntityImpl.java | 6 +- .../om/portlet/PortletDefinitionImpl.java | 6 +- .../portal/groups/EntityGroupNameFinder.java | 2 +- .../portal/groups/RDBMEntityGroupStore.java | 11 +- .../groups/ReferenceChannelNameFinder.java | 2 +- .../groups/ReferencePersonNameFinder.java | 4 +- .../portal/groups/ldap/LDAPGroupStore.java | 9 +- .../searchers/RDBMChannelDefSearcher.java | 5 +- .../local/searchers/RDBMPersonSearcher.java | 5 +- .../pags/PersonAttributesGroupStore.java | 2 +- .../org/jasig/portal/i18n/LocaleManager.java | 2 +- source/org/jasig/portal/jndi/JNDIManager.java | 3 +- .../layout/AggregatedUserLayoutStore.java | 14 +- .../layout/channels/CContentSubscriber.java | 8 +- .../layout/channels/CFragmentManager.java | 2 + .../org/jasig/portal/ldap/LdapServices.java | 7 +- .../InitialSecurityContextFactory.java | 334 +++++----- .../provider/CacheSecurityContext.java | 2 +- .../provider/ChainingSecurityContext.java | 6 +- .../security/provider/RDBMPermissionImpl.java | 23 +- .../provider/RemoteUserPersonManager.java | 2 +- .../provider/SimpleLdapSecurityContext.java | 117 ++-- .../provider/SimplePersonManager.java | 2 +- .../provider/SimpleSecurityContext.java | 2 +- .../provider/TrustSecurityContext.java | 2 +- .../portal/serialize/HTMLSerializer.java | 2 +- .../jasig/portal/services/Authentication.java | 58 +- .../portal/services/AuthorizationService.java | 9 +- .../services/EntityPropertyRegistry.java | 15 +- .../portal/services/ExternalServices.java | 34 +- .../jasig/portal/services/GroupService.java | 2 +- .../org/jasig/portal/services/LogService.java | 21 +- .../portal/services/PersonDirectory.java | 230 ++++--- .../portal/services/SequenceGenerator.java | 5 +- .../jasig/portal/services/StatsRecorder.java | 2 +- .../ChannelRegistryPropertyFinder.java | 6 +- .../ContainingGroupsFinder.java | 3 +- .../PersonDirPropertyFinder.java | 2 +- .../entityproperties/RDBMPropertyStore.java | 12 +- .../services/stats/StatsRecorderSettings.java | 2 +- .../portal/tools/dbloader/Configuration.java | 86 ++- .../jasig/portal/tools/dbloader/DbLoader.java | 103 ++- .../jasig/portal/tools/dbloader/DbUtils.java | 69 +- .../jasig/portal/utils/DocumentFactory.java | 8 +- .../jasig/portal/utils/RDBMCounterStore.java | 38 +- .../jasig/portal/utils/SqlTransaction.java | 8 +- source/org/jasig/portal/utils/URLUtil.java | 2 +- ...1_ServiceDescription_Binding_SOAPImpl.java | 4 +- .../org/jasig/portal/ExceptionHelperTest.java | 217 +++++++ .../portal/lang/ChainedThrowable_Test.java | 52 +- .../org/jasig/portal/lang/Resources_Test.java | 66 +- .../jasig/portal/lang/StackTrace_Test.java | 52 +- .../portal/lang/ThrowableHelper_Test.java | 52 +- .../jasig/portal/lang/TypeConverter_Test.java | 52 +- .../portal/channels/portlet/wsrp-consumer.cpd | 10 +- .../integratedModes/cartoon/CVS/Entries | 6 - .../integratedModes/cartoon/CVS/Repository | 1 - .../integratedModes/cartoon/CVS/Root | 1 - .../portal/channels/CChannelManager/html.xsl | 12 +- .../channels/CChannelManager/html_en_US.xsl | 12 +- .../channels/CChannelManager/html_it_IT.xsl | 12 +- .../channels/CChannelManager/html_ja_JP.xsl | 612 +++++++++--------- .../channels/CChannelManager/html_lv_LV.xsl | 12 +- .../channels/CChannelManager/html_sv_SE.xsl | 12 +- 124 files changed, 2045 insertions(+), 1898 deletions(-) rename lib/{pluto-1.0.1.jar => pluto-1.0.1-rc1.jar} (85%) delete mode 100644 scripts/createTables-hypersonic.script delete mode 100644 scripts/dropTables.script delete mode 100644 scripts/populateTables.script create mode 100644 tests/org/jasig/portal/ExceptionHelperTest.java delete mode 100644 webpages/media/org/jasig/portal/layout/AL_TabColumn/integratedModes/cartoon/CVS/Entries delete mode 100644 webpages/media/org/jasig/portal/layout/AL_TabColumn/integratedModes/cartoon/CVS/Repository delete mode 100644 webpages/media/org/jasig/portal/layout/AL_TabColumn/integratedModes/cartoon/CVS/Root diff --git a/build.properties b/build.properties index 535e7c95897..d5c4cee870d 100644 --- a/build.properties +++ b/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 diff --git a/build.xml b/build.xml index 75ff5bda5c5..ffd2d874cae 100644 --- a/build.xml +++ b/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: org.jasig.portal.wsrp.consumer.portlet.ConsumerEnvironmentImpl WAS: org.apache.wsrp4j.consumer.portlet.impl.ConsumerEnvironmentImpl - + - wsrp4j-logger.properties IS: log4j.appender.A1.File=wsrp4j-consumer.log @@ -908,7 +894,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 +1266,23 @@ --> - + - + - - + + - - + UUin@_QnN5q}zr1%AE z>QAb+`OIy)C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$Q9$N505T}>&2Jt+oi_j_s0}I*+AV+>^d5;G zhUCBVim?Ahgn|(ydkYYS8e;v68yPyX|35e2x88p~zqw)H2BF^pxS*7{LGSJWZ=k}n zK*4taravS8XNwU6Li&Fifv<(Zl{tTP!jy^z5}%koDRDD)n{4~13@s#c)GOZ^Ez0d3p^IG`-# zL0As}F=$C;D3I|xC@_PNV3GY642T~*4?yt`05m9jRnX@L027G(Cx8q(Q5^~-_7gx! zDGpZ3e`2=~5NiJ#O|2$W(q)PusQo8E0(C;UsM*t)AbqT>As%zZD7$Ev503%9mIl&*&mKL@i ze<*|8o&ZG9ft3WH_$PooG<_WbXzd9g3@zM903v+`C_^8%5`dha0Yrasxdr|P9n($# zdU*yg{ZYQ(0)u8NAqUC*0{5>A{u1^J@D}>0ocvGMFoIMJAm$hFVB9OoLAoyhA?Vm@ za*%^C6)~vccQL~?IcW0*AOLNAOAaD=1yE4_*42MP3lI?U|KfMeoB~Xk2LyDc278>Z z;64>?C_p*)R0N>2S1`T$6^ayMdb&SU{_$NQAm06p%Fm6zsbHj(&@-YkZd3d%bFM#< zNx7mYf@a#I0HH(D^Fv!5{B9r!+VG(!1Z6|gGeYm5QGkXa>1qFK{{Nnc&}f&xYf^z6 zKT@NBTA=9Zp|$@hK>~Gsq{an}!-G|p3mV*k+wI@Akw5{^^or2G?*8ftJom^zG%)m3 zpfnhIGHAS~zXt#Z`Uyi%PWk)&{Ery{0b%ej4rgH~{|xvWEIk*91rFSmIm%xpU>4v( z3b1t8pd2{xFs@+1&oD?RLFjPwWT5KbH3Mn>stF5EF9;2!r3Af&rx$@1ru(b31D^g3 zbSMKQ=n0%Gt z{vTz=TcY}{%o@;?D^!0*4_+MKL7#0>fvk|gKf?1q6(|pho)5b9hzhg<$0` diff --git a/properties/PersonDirs.xml b/properties/PersonDirs.xml index b1f4815abaf..d827bef3366 100644 --- a/properties/PersonDirs.xml +++ b/properties/PersonDirs.xml @@ -211,6 +211,7 @@ ldap://yu.yale.edu:389/dc=itstp, dc=yale, dc=edu cn=bogus,cn=Users,dc=itstp,dc=yale,dc=edu foobar + cn=Users 2) Specify the name of an LDAP server as set up in uPortal's ldap.xml. For example, @@ -223,7 +224,6 @@ Main (cn={0}) - cn=Users diff --git a/properties/db/data.xml b/properties/db/data.xml index ccfe79734f7..20d0f9fd6a0 100644 --- a/properties/db/data.xml +++ b/properties/db/data.xml @@ -10,7 +10,7 @@ FNAMEUP_FRAMEWORK MAJOR2 MINOR4 - MICRO0 + MICRO1 DESCRIPTIONThe uPortal Framework. diff --git a/properties/db/tables.xml b/properties/db/tables.xml index 5cba54b3c7a..2af2230e1ba 100644 --- a/properties/db/tables.xml +++ b/properties/db/tables.xml @@ -60,12 +60,12 @@ PREF_ID INTEGER - Preference key forieg key for UP_PORTLET_PREF_VALUES + Preference key foreign key for UP_PORTLET_PREF_VALUES CHAN_ID PREF_ID - PORTLET_PREFERENCES_NAME + PORTLET_PREF_NAME @@ -103,7 +103,7 @@ LAYOUT_IDCHAN_DESC_IDPREF_ID - PORTLET_PREFERENCES_NAME + PORTLET_PREF_NAME
diff --git a/properties/security.properties b/properties/security.properties index 0f03206bbee..84237eb1e53 100644 --- a/properties/security.properties +++ b/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. diff --git a/scripts/createTables-hypersonic.script b/scripts/createTables-hypersonic.script deleted file mode 100644 index 969f7157c5b..00000000000 --- a/scripts/createTables-hypersonic.script +++ /dev/null @@ -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) -); - diff --git a/scripts/dropTables.script b/scripts/dropTables.script deleted file mode 100644 index 80cd32c3a47..00000000000 --- a/scripts/dropTables.script +++ /dev/null @@ -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; diff --git a/scripts/populateTables.script b/scripts/populateTables.script deleted file mode 100644 index 7327cb3d710..00000000000 --- a/scripts/populateTables.script +++ /dev/null @@ -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= -' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -' WHERE USER_NAME='guest'; - -UPDATE UP_USERS SET USER_LAYOUT_XML= -' - - - - - - - - - - - - - - - - - - - - - - - - -' WHERE USER_NAME='demo'; - -INSERT INTO UP_CHANNELS (CHAN_ID, TITLE, PUB_EMAIL, APPROVED, CHANNEL_XML) VALUES (1, 'Mozillazine', NULL, 0, -' - - - ') - -INSERT INTO UP_CHANNELS (CHAN_ID, TITLE, PUB_EMAIL, APPROVED, CHANNEL_XML) VALUES (2, 'Stockcharts', NULL, 0, -' - - - ') - -INSERT INTO UP_CHANNELS (CHAN_ID, TITLE, PUB_EMAIL, APPROVED, CHANNEL_XML) VALUES (3, 'Bookmarks', NULL, 0, -' - ') - -INSERT INTO UP_CHANNELS (CHAN_ID, TITLE, PUB_EMAIL, APPROVED, CHANNEL_XML) VALUES (4, 'XML.com', NULL, 0, -' - - - ') - -INSERT INTO UP_CHANNELS (CHAN_ID, TITLE, PUB_EMAIL, APPROVED, CHANNEL_XML) VALUES (5, 'uPortal Demos', NULL, 0, -' - - - ') - -INSERT INTO UP_CHANNELS (CHAN_ID, TITLE, PUB_EMAIL, APPROVED, CHANNEL_XML) VALUES (6, 'IBS News', NULL, 0, -' - - - ') - -INSERT INTO UP_CHANNELS (CHAN_ID, TITLE, PUB_EMAIL, APPROVED, CHANNEL_XML) VALUES (7, 'uPortal Developers Reference', NULL, 0, -' - - - ') - -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', ' - - - - - - - - - - - - - - -'); - -INSERT INTO UP_USER_SS_PREFS (USER_NAME, STYLESHEET_NAME, USER_PREFERENCES_XML) VALUES ('guest', 'Nested tables', ' - - - 2 - 2 - - - - - - - - - - -'); - -INSERT INTO UP_USER_SS_PREFS (USER_NAME, STYLESHEET_NAME, USER_PREFERENCES_XML) VALUES ('demo', 'Tab and Column layout', ' - - - - - - - - - - - - - - -'); - -INSERT INTO UP_USER_SS_PREFS (USER_NAME, STYLESHEET_NAME, USER_PREFERENCES_XML) VALUES ('demo', 'Nested tables', ' - - - 1 - 1 - - - - - - - - - - -'); - -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, -' - - - - - - -'); - -INSERT INTO UPC_BOOKMARKS (ID, PORTAL_USER_ID, BOOKMARK_XML) VALUES (1, 1, -' - - - - - - -'); diff --git a/source/org/jasig/portal/ChannelDefinition.java b/source/org/jasig/portal/ChannelDefinition.java index e5cacd3d7cb..413e7df11ef 100644 --- a/source/org/jasig/portal/ChannelDefinition.java +++ b/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); } /** diff --git a/source/org/jasig/portal/ChannelManager.java b/source/org/jasig/portal/ChannelManager.java index ae85d4214ed..fa0f2dbdd2a 100644 --- a/source/org/jasig/portal/ChannelManager.java +++ b/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); } } } diff --git a/source/org/jasig/portal/EntityTypes.java b/source/org/jasig/portal/EntityTypes.java index daad6e4f05c..2bb30bcc210 100644 --- a/source/org/jasig/portal/EntityTypes.java +++ b/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; } } diff --git a/source/org/jasig/portal/ExceptionHelper.java b/source/org/jasig/portal/ExceptionHelper.java index 389992aae1b..82ff0b34a5e 100644 --- a/source/org/jasig/portal/ExceptionHelper.java +++ b/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 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(); } /** diff --git a/source/org/jasig/portal/LoginServlet.java b/source/org/jasig/portal/LoginServlet.java index e136280e8d9..27e0431f448 100644 --- a/source/org/jasig/portal/LoginServlet.java +++ b/source/org/jasig/portal/LoginServlet.java @@ -97,9 +97,9 @@ public class LoginServlet extends HttpServlet { } } } 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; @@ -156,7 +156,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 diff --git a/source/org/jasig/portal/LogoutServlet.java b/source/org/jasig/portal/LogoutServlet.java index a302d0f1ae4..781ccb02cee 100644 --- a/source/org/jasig/portal/LogoutServlet.java +++ b/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; diff --git a/source/org/jasig/portal/PortalSessionManager.java b/source/org/jasig/portal/PortalSessionManager.java index 29625f73904..803d826eb50 100644 --- a/source/org/jasig/portal/PortalSessionManager.java +++ b/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)); } diff --git a/source/org/jasig/portal/RDBMChannelRegistryStore.java b/source/org/jasig/portal/RDBMChannelRegistryStore.java index 10055eb561f..d947f8d86b1 100644 --- a/source/org/jasig/portal/RDBMChannelRegistryStore.java +++ b/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 { diff --git a/source/org/jasig/portal/RDBMServices.java b/source/org/jasig/portal/RDBMServices.java index 436d5b049aa..d1332a9462f 100644 --- a/source/org/jasig/portal/RDBMServices.java +++ b/source/org/jasig/portal/RDBMServices.java @@ -236,7 +236,7 @@ public class RDBMServices { 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); } } diff --git a/source/org/jasig/portal/RDBMUserLayoutStore.java b/source/org/jasig/portal/RDBMUserLayoutStore.java index a1a06d1e19d..a03058968ae 100644 --- a/source/org/jasig/portal/RDBMUserLayoutStore.java +++ b/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; + } + + String sql = "DELETE FROM UP_LAYOUT_PARAM WHERE USER_ID=? AND LAYOUT_ID=?"; + RDBMServices.PreparedStatement pstmt = new RDBMServices.PreparedStatement(con, sql); try { - int firstStructId = saveStructure(layoutXML.getFirstChild().getFirstChild(), structStmt, parmStmt); - - //Check to see if the user has a matching layout - sSql = "SELECT * FROM UP_USER_LAYOUT WHERE " + selectString; - log.debug("RDBMUserLayoutStore::setUserLayout(): " + sSql); - rs = stmt.executeQuery(sSql); - - try { - //If not the default user is found and the layout rows from the - //default user are copied for the current user. - if (!rs.next()) { - int defaultUserId; - - String sQuery = "SELECT USER_DFLT_USR_ID FROM UP_USER WHERE USER_ID=" + userId; - log.debug("RDBMUserLayoutStore::setUserLayout(): " + sQuery); - - ResultSet rs2 = stmt.executeQuery(sQuery); - try { - rs2.next(); - defaultUserId = rs2.getInt(1); - } - finally { - rs2.close(); - } - - // Add to UP_USER_LAYOUT - sQuery = "SELECT USER_ID,LAYOUT_ID,LAYOUT_TITLE,INIT_STRUCT_ID FROM UP_USER_LAYOUT WHERE USER_ID=" + defaultUserId; - log.debug("RDBMUserLayoutStore::setUserLayout(): " + sQuery); - - rs2 = stmt.executeQuery(sQuery); - - try { - while (rs2.next()) { - sQuery = - "INSERT INTO UP_USER_LAYOUT " + - "(USER_ID,LAYOUT_ID,LAYOUT_TITLE,INIT_STRUCT_ID) " + - "VALUES(" + - userId + "," + - rs2.getInt("LAYOUT_ID") + "," + - "'" + rs2.getString("LAYOUT_TITLE") + "'," + - rs2.getInt("INIT_STRUCT_ID") + ")"; - - log.debug("RDBMUserLayoutStore::setUserLayout(): " + sQuery); - stmt.executeUpdate(sQuery); - } - } - finally { - rs2.close(); - } - } - } - finally { - rs.close(); - } - - //Update the users layout with the correct inital structure ID - sSql = "UPDATE UP_USER_LAYOUT SET INIT_STRUCT_ID=" + firstStructId + " WHERE " + selectString; - log.debug("RDBMUserLayoutStore::setUserLayout(): " + sSql); - stmt.executeUpdate(sSql); - - // Update the last time the user saw the list of available channels - if (channelsAdded) { - sSql = "UPDATE UP_USER SET LST_CHAN_UPDT_DT=" + RDBMServices.sqlTimeStamp() + - " WHERE USER_ID=" + userId; - log.debug("RDBMUserLayoutStore::setUserLayout(): " + sSql); - stmt.executeUpdate(sSql); - } - - if (firstLayout) { - + pstmt.clearParameters(); + pstmt.setInt(1, userId); + pstmt.setInt(2, layoutId); + log.debug(sql); + pstmt.executeUpdate(); + } finally { + pstmt.close(); + } + + sql = "DELETE FROM UP_LAYOUT_STRUCT WHERE USER_ID=? AND LAYOUT_ID=?"; + pstmt = new RDBMServices.PreparedStatement(con, sql); + try { + pstmt.clearParameters(); + pstmt.setInt(1, userId); + pstmt.setInt(2, layoutId); + log.debug(sql); + pstmt.executeUpdate(); + } finally { + pstmt.close(); + } + + 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 + ",?,?,?,?,?,?,?,?,?,?)"); + + 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 + ",?,?,?)"); + + int firstStructId; + try { + firstStructId = saveStructure(layoutXML.getFirstChild().getFirstChild(), structStmt, parmStmt); + } finally { + structStmt.close(); + parmStmt.close(); + } + + //Check to see if the user has a matching layout + sql = "SELECT * FROM UP_USER_LAYOUT WHERE USER_ID=? AND LAYOUT_ID=?"; + pstmt = new RDBMServices.PreparedStatement(con, sql); + try { + pstmt.clearParameters(); + pstmt.setInt(1, userId); + pstmt.setInt(2, layoutId); + log.debug(sql); + rs = pstmt.executeQuery(); + + try { + if (!rs.next()) { + // If not, the default user is found and the layout rows from the default user are copied for the current user. + int defaultUserId; + + sql = "SELECT USER_DFLT_USR_ID FROM UP_USER WHERE USER_ID=?"; + RDBMServices.PreparedStatement pstmt2 = new RDBMServices.PreparedStatement(con, sql); + try { + pstmt2.clearParameters(); + pstmt2.setInt(1, userId); + log.debug(sql); + ResultSet rs2 = null; + try { + rs2 = pstmt2.executeQuery(); + rs2.next(); + defaultUserId = rs2.getInt(1); + } finally { + rs2.close(); + } + } finally { + pstmt2.close(); + } + + // Add to UP_USER_LAYOUT + sql = "SELECT USER_ID,LAYOUT_ID,LAYOUT_TITLE,INIT_STRUCT_ID FROM UP_USER_LAYOUT WHERE USER_ID=?"; + pstmt2 = new RDBMServices.PreparedStatement(con, sql); + try { + pstmt2.clearParameters(); + pstmt2.setInt(1, defaultUserId); + log.debug(sql); + ResultSet rs2 = pstmt2.executeQuery(); + try { + while (rs2.next()) { + sql = "INSERT INTO UP_USER_LAYOUT (USER_ID, LAYOUT_ID, LAYOUT_TITLE, INIT_STRUCT_ID) VALUES (?,?,?,?)"; + RDBMServices.PreparedStatement pstmt3 = new RDBMServices.PreparedStatement(con, sql); + try { + pstmt3.clearParameters(); + pstmt3.setInt(1, userId); + pstmt3.setInt(2, rs2.getInt("LAYOUT_ID")); + pstmt3.setString(3, rs2.getString("LAYOUT_TITLE")); + pstmt3.setInt(4, rs2.getInt("INIT_STRUCT_ID")); + log.debug(sql); + pstmt3.executeUpdate(); + } finally { + pstmt3.close(); + } + } + } finally { + rs2.close(); + } + } finally { + pstmt2.close(); + } + + } + } finally { + rs.close(); + } + } finally { + pstmt.close(); + } + + //Update the users layout with the correct inital structure ID + sql = "UPDATE UP_USER_LAYOUT SET INIT_STRUCT_ID=? WHERE USER_ID=? AND LAYOUT_ID=?"; + pstmt = new RDBMServices.PreparedStatement(con, sql); + try { + pstmt.clearParameters(); + pstmt.setInt(1, firstStructId); + pstmt.setInt(2, userId); + pstmt.setInt(3, layoutId); + log.debug(sql); + pstmt.executeUpdate(); + } finally { + pstmt.close(); + } + + // Update the last time the user saw the list of available channels + if (channelsAdded) { + sql = "UPDATE UP_USER SET LST_CHAN_UPDT_DT=? WHERE USER_ID=?"; + pstmt = new RDBMServices.PreparedStatement(con, sql); + try { + pstmt.clearParameters(); + pstmt.setDate(1, new java.sql.Date(System.currentTimeMillis())); + pstmt.setInt(2, userId); + log.debug(sql); + pstmt.executeUpdate(); + } finally { + pstmt.close(); + } + } + + if (firstLayout) { int defaultUserId; int defaultLayoutId; - // Have to copy some of data over from the default user - String sQuery = "SELECT USER_DFLT_USR_ID,USER_DFLT_LAY_ID FROM UP_USER WHERE USER_ID=" + userId; - log.debug("RDBMUserLayoutStore::setUserLayout(): " + sQuery); - rs = stmt.executeQuery(sQuery); + // Have to copy some of data over from the default user + sql = "SELECT USER_DFLT_USR_ID,USER_DFLT_LAY_ID FROM UP_USER WHERE USER_ID=?"; + pstmt = new RDBMServices.PreparedStatement(con, sql); try { - rs.next(); - defaultUserId = rs.getInt(1); - defaultLayoutId = rs.getInt(2); + pstmt.clearParameters(); + pstmt.setInt(1, userId); + log.debug(sql); + rs = pstmt.executeQuery(); + try { + rs.next(); + defaultUserId = rs.getInt(1); + defaultLayoutId = rs.getInt(2); + } finally { + rs.close(); + } } finally { - rs.close(); + pstmt.close(); } - - sQuery = "UPDATE UP_USER_PROFILE SET LAYOUT_ID=1 WHERE USER_ID=" + userId + " AND PROFILE_ID=" + profileId; - log.debug("RDBMUserLayoutStore::setUserLayout(): " + sQuery); - stmt.executeUpdate(sQuery); - /* insert row(s) into up_ss_user_parm */ - sQuery = "SELECT USER_ID, PROFILE_ID, SS_ID, SS_TYPE, PARAM_NAME, PARAM_VAL "+ - " FROM UP_SS_USER_PARM WHERE USER_ID="+defaultUserId; - log.debug("RDBMUserIdentityStore::getPortalUID(): " + sQuery); - if (DEBUG>0) System.err.println(sQuery); - rs.close(); - rs = stmt.executeQuery(sQuery); - Statement insertStmt = con.createStatement(); + sql = "UPDATE UP_USER_PROFILE SET LAYOUT_ID=1 WHERE USER_ID=? AND PROFILE_ID=?"; + pstmt = new RDBMServices.PreparedStatement(con, sql); try { - while (rs.next()) { - String insert = "INSERT INTO UP_SS_USER_PARM (USER_ID, PROFILE_ID, SS_ID, SS_TYPE, PARAM_NAME, PARAM_VAL) "+ - "VALUES("+ - userId+","+ - rs.getInt("PROFILE_ID")+","+ - rs.getInt("SS_ID")+","+ - rs.getInt("SS_TYPE")+","+ - "'"+rs.getString("PARAM_NAME")+"',"+ - "'"+rs.getString("PARAM_VAL")+"')"; - - log.debug("RDBMUserLayoutStore::setUserLayout(): " + insert); - if (DEBUG>0) System.err.println(insert); - insertStmt.executeUpdate(insert); - } + pstmt.clearParameters(); + pstmt.setInt(1, userId); + pstmt.setInt(2, profileId); + log.debug(sql); + pstmt.executeUpdate(); + } finally { + pstmt.close(); } - finally { - insertStmt.close(); + + // Insert row(s) into up_ss_user_parm + sql = "SELECT USER_ID, PROFILE_ID, SS_ID, SS_TYPE, PARAM_NAME, PARAM_VAL FROM UP_SS_USER_PARM WHERE USER_ID=?"; + pstmt = new RDBMServices.PreparedStatement(con, sql); + try { + pstmt.clearParameters(); + pstmt.setInt(1, defaultUserId); + log.debug(sql); + rs = pstmt.executeQuery(); + try { + while (rs.next()) { + sql = "INSERT INTO UP_SS_USER_PARM (USER_ID, PROFILE_ID, SS_ID, SS_TYPE, PARAM_NAME, PARAM_VAL) VALUES(?,?,?,?,?,?)"; + RDBMServices.PreparedStatement pstmt2 = new RDBMServices.PreparedStatement(con, sql); + try { + pstmt2.clearParameters(); + pstmt2.setInt(1, userId); + pstmt2.setInt(2, rs.getInt("PROFILE_ID")); + pstmt2.setInt(3, rs.getInt("SS_ID")); + pstmt2.setInt(4, rs.getInt("SS_TYPE")); + pstmt2.setString(5, rs.getString("PARAM_NAME")); + pstmt2.setString(6, rs.getString("PARAM_VAL")); + log.debug(sql); + pstmt2.executeUpdate(); + } finally { + pstmt2.close(); + } + } + } finally { + rs.close(); + } + } finally { + pstmt.close(); } - } - long stopTime = System.currentTimeMillis(); - log.debug("RDBMUserLayoutStore::setUserLayout(): Layout document for user " + userId + " took " + - (stopTime - startTime) + " milliseconds to save"); - } finally { - parmStmt.close(); } - } finally { - structStmt.close(); - } - } finally { - stmt.close(); + RDBMServices.commit(con); + } catch (Exception e) { + RDBMServices.rollback(con); + throw e; + } finally { + RDBMServices.releaseConnection(con); } - RDBMServices.commit(con); - } catch (Exception e) { - RDBMServices.rollback(con); - throw e; - } finally { - RDBMServices.releaseConnection(con); - } + long stopTime = System.currentTimeMillis(); + log.debug("RDBMUserLayoutStore::setUserLayout(): Layout document for user " + userId + " took " + (stopTime - startTime) + " milliseconds to save"); } /** diff --git a/source/org/jasig/portal/ReferenceSequenceGenerator.java b/source/org/jasig/portal/ReferenceSequenceGenerator.java index a04306a81bd..d2bbba5b6cc 100644 --- a/source/org/jasig/portal/ReferenceSequenceGenerator.java +++ b/source/org/jasig/portal/ReferenceSequenceGenerator.java @@ -405,7 +405,8 @@ private void setCounter(String tableName, int newCounterValue, Connection conn) } catch (SQLException sqle) { - log.error( sqle); + log.error("Error setting counter for table [" + tableName + "] " + + "to " + newCounterValue, sqle); throw sqle; } } diff --git a/source/org/jasig/portal/RequestParamWrapper.java b/source/org/jasig/portal/RequestParamWrapper.java index 149003e906a..67650b8af98 100644 --- a/source/org/jasig/portal/RequestParamWrapper.java +++ b/source/org/jasig/portal/RequestParamWrapper.java @@ -44,7 +44,6 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.jasig.portal.container.services.information.PortletStateManager; import org.jasig.portal.properties.PropertiesManager; import com.oreilly.servlet.multipart.FilePart; @@ -70,8 +69,9 @@ public class RequestParamWrapper extends HttpServletRequestWrapper { * * @param source an HttpServletRequest value that's being wrapped. * @param request_verified a boolean flag that determines if the request params should be accessable. + * @param isPortletAction a boolean flag indicating if a portlet is currently being interacted with (in the case for a probable upload attempt). */ - public RequestParamWrapper(HttpServletRequest source, boolean request_verified) { + public RequestParamWrapper(HttpServletRequest source, boolean request_verified, boolean isPortletAction) { super(source); setFileUploadMaxSize(); @@ -84,8 +84,7 @@ public RequestParamWrapper(HttpServletRequest source, boolean request_verified) if (request_verified) { // parse request body String contentType = source.getContentType(); - String portletAction = source.getParameter(PortletStateManager.ACTION); - if (contentType != null && contentType.startsWith("multipart/form-data") && portletAction == null) { + if (contentType != null && contentType.startsWith("multipart/form-data") && !isPortletAction) { com.oreilly.servlet.multipart.Part attachmentPart; try { MultipartParser multi = new MultipartParser(source, source.getContentLength(), true, true, "UTF-8"); @@ -120,9 +119,6 @@ public RequestParamWrapper(HttpServletRequest source, boolean request_verified) // check if this file has exceeded the maximum allowed upload size if (noAttachments){ fileUpload = new MultipartDataSource(filename, "Exceeded file size allowed"); - MultipartDataSource[] valueArray = new MultipartDataSource[1]; - valueArray[0] = fileUpload; - parameters.put(partName, valueArray); } else if (filename != null) { fileUpload = new MultipartDataSource(filePart); } diff --git a/source/org/jasig/portal/StylesheetSet.java b/source/org/jasig/portal/StylesheetSet.java index fdbb0f246e2..466fccb949d 100644 --- a/source/org/jasig/portal/StylesheetSet.java +++ b/source/org/jasig/portal/StylesheetSet.java @@ -114,7 +114,7 @@ public StylesheetSet(String uri) throws PortalException { } } catch (SAXException se) { // Log the exception - log.error( se); + log.error("Error constructing StylesheetSet from uri[" + uri + "]", se); throw new GeneralRenderingException("StylesheetSet(uri) : Unable to instantiate SAX Reader. Please check your library installation."); } } diff --git a/source/org/jasig/portal/UserInstance.java b/source/org/jasig/portal/UserInstance.java index 245a5385be5..0a966d7b264 100644 --- a/source/org/jasig/portal/UserInstance.java +++ b/source/org/jasig/portal/UserInstance.java @@ -736,7 +736,7 @@ private synchronized void processUserLayoutParameters (HttpServletRequest req, C themePrefs.putParameterValue("authorizedChannelPublisher", "true"); } } catch (Exception e) { - log.error(e); + log.error("Exception determining publish rights for " + this.person, e); } String[] values; diff --git a/source/org/jasig/portal/UserPreferencesManager.java b/source/org/jasig/portal/UserPreferencesManager.java index def675d81fc..14ec1e1a0c9 100644 --- a/source/org/jasig/portal/UserPreferencesManager.java +++ b/source/org/jasig/portal/UserPreferencesManager.java @@ -167,7 +167,8 @@ public UserPreferencesManager (HttpServletRequest req, IPerson person) throws Po } catch (PortalException pe) { throw pe; } catch (Exception e) { - log.error( e); + log.error("Exception constructing UserPreferencesManager on request " + + req + " for user " + person, e); } } @@ -253,7 +254,8 @@ public UserPreferencesManager (HttpServletRequest req, IPerson person, LocaleMan } catch (PortalException pe) { throw pe; } catch (Exception e) { - log.error( e); + log.error("Exception constructing UserPreferencesManager on request " + + req + " for user " + person, e); } } @@ -459,7 +461,8 @@ public void setNewUserLayoutAndUserPreferences(IUserLayoutManager newUlm, UserPr } } catch (Exception e) { - log.error( e); + log.error("Exception setting new user layout manager " + newUlm + + " and/or new prefererences " + newPreferences, e); throw new GeneralRenderingException(e.getMessage()); } } diff --git a/source/org/jasig/portal/Version.java b/source/org/jasig/portal/Version.java index 437909b0055..ba3fd12fea2 100644 --- a/source/org/jasig/portal/Version.java +++ b/source/org/jasig/portal/Version.java @@ -47,7 +47,7 @@ public class Version { private static String product = "uPortal"; private static String major = "2"; private static String minor = "4"; - private static String patch = ""; + private static String patch = "1"; private static String extra = ""; private static String releaseTag; diff --git a/source/org/jasig/portal/channels/CApplet.java b/source/org/jasig/portal/channels/CApplet.java index cb208c43012..63fe22d291a 100644 --- a/source/org/jasig/portal/channels/CApplet.java +++ b/source/org/jasig/portal/channels/CApplet.java @@ -82,7 +82,7 @@ public void renderXML (ContentHandler out, String uid) throws PortalException { try { doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); } catch (ParserConfigurationException pce) { - log.error( pce); + log.error("Error obtaining a Document", pce); throw new GeneralRenderingException(pce.getMessage()); } diff --git a/source/org/jasig/portal/channels/CChannelManager.java b/source/org/jasig/portal/channels/CChannelManager.java index 9b0347d608e..78cef2296dd 100644 --- a/source/org/jasig/portal/channels/CChannelManager.java +++ b/source/org/jasig/portal/channels/CChannelManager.java @@ -616,7 +616,7 @@ protected Element getGroupsXML () { selectedGroupsE.appendChild(selectedGroupE); } } catch (Exception e) { - log.error( e); + log.error(e, e); } el.appendChild(selectedGroupsE); } @@ -640,7 +640,7 @@ protected Element getCategoriesXML () { selectedCategoriesE.appendChild(selectedCategoryE); } } catch (Exception e) { - log.error( e); + log.error(e, e); } userSettingsE.appendChild(selectedCategoriesE); } @@ -928,12 +928,14 @@ protected Element toXML (Document doc) { } protected class ChannelDefinition { + private static final String DEFAULT_TIMEOUT = "5000"; + protected String ID; protected String typeID; protected String name; protected String description; protected String title; - protected String timeout; + protected String timeout = DEFAULT_TIMEOUT; protected String fname; protected String javaClass; protected String editable; @@ -1022,8 +1024,31 @@ protected void setTitle (String title) { this.title = title; } + /** + * Set the channel timeout, which is a String representation of a number + * of milliseconds the channel should be allowed to try to render before being + * replaced with the Error channel. + * This setter checks its argument and does nothing but log the irregularity + * in the case where the argument does not represent a positive number of + * milliseconds. + * @param timeout a String representing a positive number of milliseconds + */ protected void setTimeout (String timeout) { - this.timeout = timeout; + if (timeout != null && !"".equals(timeout)) { + try { + int timeoutInt = Integer.parseInt(timeout); + if (timeoutInt > 0) { + this.timeout = timeout; + } else { + log.warn("There was an attempt to set a channel timeout to [" + + timeout + "] but we blocked it because you can't have a negative timeout."); + } + + } catch (Throwable t) { + log.warn("There was an attempt to set a channel timeout to [" + + timeout + "] but we blocked it because it was invalid."); + } + } } protected void setJavaClass (String javaClass) { diff --git a/source/org/jasig/portal/channels/CError.java b/source/org/jasig/portal/channels/CError.java index 68a61b02fef..cc4098fd790 100644 --- a/source/org/jasig/portal/channels/CError.java +++ b/source/org/jasig/portal/channels/CError.java @@ -36,8 +36,9 @@ package org.jasig.portal.channels; import java.io.PrintWriter; -import java.io.StringWriter; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.jasig.portal.AuthorizationException; import org.jasig.portal.ChannelCacheKey; import org.jasig.portal.ChannelManager; @@ -46,22 +47,20 @@ import org.jasig.portal.EntityIdentifier; import org.jasig.portal.ICacheable; import org.jasig.portal.IChannel; -import org.jasig.portal.MediaManager; -import org.jasig.portal.serialize.OutputFormat; -import org.jasig.portal.serialize.XMLSerializer; -import org.jasig.portal.serialize.BaseMarkupSerializer; -import org.jasig.portal.ThemeStylesheetDescription; import org.jasig.portal.ICharacterChannel; import org.jasig.portal.IPrivilegedChannel; import org.jasig.portal.InternalTimeoutException; +import org.jasig.portal.MediaManager; import org.jasig.portal.PortalControlStructures; import org.jasig.portal.PortalException; import org.jasig.portal.ResourceMissingException; +import org.jasig.portal.ThemeStylesheetDescription; import org.jasig.portal.i18n.LocaleManager; import org.jasig.portal.security.IAuthorizationPrincipal; +import org.jasig.portal.serialize.BaseMarkupSerializer; +import org.jasig.portal.serialize.OutputFormat; +import org.jasig.portal.serialize.XMLSerializer; import org.jasig.portal.services.AuthorizationService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.jasig.portal.utils.DocumentFactory; import org.jasig.portal.utils.XSLT; import org.w3c.dom.Document; @@ -81,7 +80,7 @@ * In this case a general message is constructed by the portal. * * - * @author Peter Kharchenko, pkharchenko@interactivebusiness.com + * @author Peter Kharchenko, pkharchenko@unicon.net * @version $Revision$ */ public class CError extends BaseChannel implements IPrivilegedChannel, ICacheable, ICharacterChannel @@ -353,6 +352,7 @@ private void localRenderXML(ContentHandler out) { if(v!=null) { Element timeoutEl=doc.createElement("timeout"); timeoutEl.setAttribute("value",v.toString()); + excEl.appendChild(timeoutEl); } } else if(pe instanceof AuthorizationException) { excEl.setAttribute("code",Integer.toString(AUTHORIZATION_EXCEPTION)); @@ -406,7 +406,7 @@ private void localRenderXML(ContentHandler out) { xsl.serialize (doc); log.debug(outString.toString()); } catch (Exception e) { - log.debug(e); + log.debug(e, e); } // end of debug block @@ -421,10 +421,7 @@ private void localRenderXML(ContentHandler out) { xslt.setStylesheetParameter("allowReinstantiation", allowRel); xslt.transform(); } catch (Exception e) { - StringWriter sw=new StringWriter(); - e.printStackTrace(new PrintWriter(sw)); - sw.flush(); - log.error( "CError::renderXML() : Things are bad. Error channel threw: " + sw.toString()); + log.error( "CError::renderXML() : Things are bad. Error channel threw Exception.", e); } } diff --git a/source/org/jasig/portal/channels/CHeader.java b/source/org/jasig/portal/channels/CHeader.java index 0737f07cd12..4e276e545f0 100644 --- a/source/org/jasig/portal/channels/CHeader.java +++ b/source/org/jasig/portal/channels/CHeader.java @@ -72,7 +72,7 @@ private boolean canUserPublish() { // Let the authorization service decide: canPublish = staticData.getAuthorizationPrincipal().canPublish(); } catch (Exception e) { - log.error( e); + log.error("Exception determining whether user can publish, defaulting to false.", e); // Deny the user publish access if anything went wrong } return canPublish; @@ -91,7 +91,7 @@ public static String getDate(String format) { return formatter.format(currentTime); } catch (Exception e) { - log.error( e); + log.error("Exception getting current date.", e); } return " "; diff --git a/source/org/jasig/portal/channels/CImage.java b/source/org/jasig/portal/channels/CImage.java index 77bc889a248..49aff74c76d 100644 --- a/source/org/jasig/portal/channels/CImage.java +++ b/source/org/jasig/portal/channels/CImage.java @@ -99,7 +99,7 @@ public void renderXML (ContentHandler out, String uid) throws PortalException try { doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); } catch (ParserConfigurationException pce) { - log.error( pce); + log.error("Error getting a Document", pce); throw new GeneralRenderingException(pce.getMessage()); } diff --git a/source/org/jasig/portal/channels/CInlineFrame.java b/source/org/jasig/portal/channels/CInlineFrame.java index 0d7b76ea3ca..82f8405a003 100644 --- a/source/org/jasig/portal/channels/CInlineFrame.java +++ b/source/org/jasig/portal/channels/CInlineFrame.java @@ -92,7 +92,7 @@ public void renderXML (ContentHandler out, String uid) throws PortalException { try { doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); } catch (ParserConfigurationException pce) { - log.error( pce); + log.error("Error getting Document", pce); throw new GeneralRenderingException(pce.getMessage()); } diff --git a/source/org/jasig/portal/channels/CSecureInfo.java b/source/org/jasig/portal/channels/CSecureInfo.java index cf9dc9793b7..bfa439cd47e 100644 --- a/source/org/jasig/portal/channels/CSecureInfo.java +++ b/source/org/jasig/portal/channels/CSecureInfo.java @@ -136,7 +136,7 @@ public void renderXML(ContentHandler out) { xsl.serialize (doc); log.debug(outString.toString()); } catch (Exception e) { - log.debug(e); + log.debug(e, e); } // end of debug block diff --git a/source/org/jasig/portal/channels/UserPreferences/CUserPreferences.java b/source/org/jasig/portal/channels/UserPreferences/CUserPreferences.java index 20aa46af2c4..5eaea4c9271 100644 --- a/source/org/jasig/portal/channels/UserPreferences/CUserPreferences.java +++ b/source/org/jasig/portal/channels/UserPreferences/CUserPreferences.java @@ -65,7 +65,7 @@ * @version $Revision$ */ public class CUserPreferences implements IPrivilegedChannel { - private static final Log log = LogFactory.getLog(CUserPreferences.class); + private static final Log log = LogFactory.getLog(CUserPreferences.class); IUserPreferencesManager upm; ChannelRuntimeData runtimeData = null; ChannelStaticData staticData = null; @@ -155,7 +155,7 @@ private void instantiateManagePreferencesState(UserProfile profile) { managePreferences = new GPreferencesState(this); } } catch (Exception e) { - log.error( e); + log.error("Error instantiating user profile [" + profile + "]", e); managePreferences = new GPreferencesState(this); } } diff --git a/source/org/jasig/portal/channels/UserPreferences/GPreferencesState.java b/source/org/jasig/portal/channels/UserPreferences/GPreferencesState.java index af98facfbb0..6eaa4193118 100644 --- a/source/org/jasig/portal/channels/UserPreferences/GPreferencesState.java +++ b/source/org/jasig/portal/channels/UserPreferences/GPreferencesState.java @@ -466,7 +466,7 @@ public void renderXML(ContentHandler out) throws PortalException { xsl.serialize(doc); log.debug(outString.toString()); } catch (Exception e) { - log.debug(e); + log.debug(e, e); } StylesheetSet set = context.getStylesheetSet(); if (set == null) { @@ -574,7 +574,7 @@ public void renderXML(ContentHandler out) throws PortalException { xsl.serialize(doc); log.debug(outString.toString()); } catch (Exception e) { - log.debug(e); + log.debug(e, e); } StylesheetSet set = context.getStylesheetSet(); if (set == null) { diff --git a/source/org/jasig/portal/channels/UserPreferences/ManageProfilesState.java b/source/org/jasig/portal/channels/UserPreferences/ManageProfilesState.java index 32221658c29..59f8767603b 100644 --- a/source/org/jasig/portal/channels/UserPreferences/ManageProfilesState.java +++ b/source/org/jasig/portal/channels/UserPreferences/ManageProfilesState.java @@ -68,7 +68,7 @@ * @version $Revision$ */ class ManageProfilesState extends BaseState { - private static final Log log = LogFactory.getLog(ManageProfilesState.class); + private static final Log log = LogFactory.getLog(ManageProfilesState.class); protected Hashtable userProfileList; protected Hashtable systemProfileList; protected Hashtable userExpandStates; @@ -662,7 +662,7 @@ public void renderXML(ContentHandler out) throws PortalException { xsl.serialize(doc); log.debug(outString.toString()); } catch (Exception e) { - log.debug(e); + log.debug(e, e); } StylesheetSet set = context.getStylesheetSet(); if (set == null) diff --git a/source/org/jasig/portal/channels/iccdemo/CHistory.java b/source/org/jasig/portal/channels/iccdemo/CHistory.java index f881adc38c1..891f4d3cd1d 100644 --- a/source/org/jasig/portal/channels/iccdemo/CHistory.java +++ b/source/org/jasig/portal/channels/iccdemo/CHistory.java @@ -85,7 +85,7 @@ public void setStaticData(ChannelStaticData sd) throws PortalException { } catch (NotContextException nce) { log.error("CHistory.getUserXML(): Could not find subcontext /channel-obj in JNDI"); } catch (NamingException e) { - log.error(e); + log.error("Naming exception when looking up /channel-obj in JNDI", e); } try { @@ -93,7 +93,7 @@ public void setStaticData(ChannelStaticData sd) throws PortalException { } catch (NotContextException nce) { log.error("CHistory.getUserXML(): Could not bind channel object for channel id="+staticData.getChannelSubscribeId()); } catch (NamingException e) { - log.error(e); + log.error("Exception binding in CHistory.", e); } } @@ -178,14 +178,14 @@ private String getChannelId(String fname) { } catch (NotContextException nce) { log.error("CURLSelector.getUserXML(): Could not find subcontext /channel-ids in JNDI"); } catch (NamingException e) { - log.error(e); + log.error("Could not lookip /channel-ids.", e); } try { id=(String)globalIDContext.lookup(fname); } catch (NotContextException nce) { log.error("CURLSelector.getUserXML(): Could not find channel ID for fname="+fname); } catch (NamingException e) { - log.error(e); + log.error("Could not lookup channel " + fname, e); } return id; } @@ -205,7 +205,7 @@ private Object getBoundObject(String channelSubscribeId) { } catch (NotContextException nce) { log.error("CURLSelector.getUserXML(): Could not find subcontext /channel-obj in JNDI"); } catch (NamingException e) { - log.error(e); + log.error("Could not lookup /channel-obj", e); } try { @@ -213,7 +213,7 @@ private Object getBoundObject(String channelSubscribeId) { } catch (NotContextException nce) { log.error("CURLSelector.getUserXML(): Could not find channel bound object for channel id="+channelSubscribeId); } catch (NamingException e) { - log.error(e); + log.error("Could not lookup " + channelSubscribeId, e); } return o; } diff --git a/source/org/jasig/portal/channels/iccdemo/CURLSelector.java b/source/org/jasig/portal/channels/iccdemo/CURLSelector.java index 7798d551765..d332b7ced17 100644 --- a/source/org/jasig/portal/channels/iccdemo/CURLSelector.java +++ b/source/org/jasig/portal/channels/iccdemo/CURLSelector.java @@ -223,14 +223,14 @@ private String getChannelId(String fname) { } catch (NotContextException nce) { log.error( "CURLSelector.getUserXML(): Could not find subcontext /channel-ids in JNDI"); } catch (NamingException e) { - log.error( e); + log.error("Lookup /channel-ids failed", e); } try { id=(String)globalIDContext.lookup(fname); } catch (NotContextException nce) { log.error( "CURLSelector.getUserXML(): Could not find channel ID for fname="+fname); } catch (NamingException e) { - log.error( e); + log.error("Lookup " + fname + " failed", e); } return id; } @@ -250,7 +250,7 @@ private Object getBoundObject(String channelSubscribeId) { } catch (NotContextException nce) { log.error( "CURLSelector.getUserXML(): Could not find subcontext /channel-obj in JNDI"); } catch (NamingException e) { - log.error( e); + log.error("Lookup /channel-obj failed", e); } try { @@ -258,7 +258,7 @@ private Object getBoundObject(String channelSubscribeId) { } catch (NotContextException nce) { log.error( "CURLSelector.getUserXML(): Could not find channel bound object for channel id="+channelSubscribeId); } catch (NamingException e) { - log.error( e); + log.error("Lookup " + channelSubscribeId + " failed", e); } return o; } diff --git a/source/org/jasig/portal/channels/iccdemo/CViewer.java b/source/org/jasig/portal/channels/iccdemo/CViewer.java index 5790795fbba..628431a7600 100644 --- a/source/org/jasig/portal/channels/iccdemo/CViewer.java +++ b/source/org/jasig/portal/channels/iccdemo/CViewer.java @@ -78,7 +78,7 @@ public void setStaticData(ChannelStaticData sd) throws PortalException { } catch (NotContextException nce) { log.error( "CHistory.getUserXML(): Could not find subcontext /channel-obj in JNDI"); } catch (NamingException e) { - log.error( e); + log.error("Failed lookup of /channel-obj", e); } // bind new ViewerURL object @@ -87,7 +87,7 @@ public void setStaticData(ChannelStaticData sd) throws PortalException { } catch (NotContextException nce) { log.error( "CHistory.getUserXML(): Could not bind channel object for channel id="+staticData.getChannelSubscribeId()); } catch (NamingException e) { - log.error( e); + log.error("Failed bind", e); } // regsiter history channel @@ -207,14 +207,14 @@ private String getChannelId(String fname) { } catch (NotContextException nce) { log.error( "CURLSelector.getUserXML(): Could not find subcontext /channel-ids in JNDI"); } catch (NamingException e) { - log.error( e); + log.error("Failed lookup /channel-ids", e); } try { id=(String)globalIDContext.lookup(fname); } catch (NotContextException nce) { log.error( "CURLSelector.getUserXML(): Could not find channel ID for fname="+fname); } catch (NamingException e) { - log.error( e); + log.error("Failed lookup " + fname, e); } return id; } @@ -234,7 +234,7 @@ private Object getBoundObject(String channelSubscribeId) { } catch (NotContextException nce) { log.error( "CURLSelector.getUserXML(): Could not find subcontext /channel-obj in JNDI"); } catch (NamingException e) { - log.error( e); + log.error("Failed lookup /channel-obj", e); } try { @@ -242,7 +242,7 @@ private Object getBoundObject(String channelSubscribeId) { } catch (NotContextException nce) { log.error( "CURLSelector.getUserXML(): Could not find channel bound object for channel id="+channelSubscribeId); } catch (NamingException e) { - log.error( e); + log.error("Failed lookup " + channelSubscribeId, e); } return o; } diff --git a/source/org/jasig/portal/channels/permissionsmanager/CPermissionsManager.java b/source/org/jasig/portal/channels/permissionsmanager/CPermissionsManager.java index cbdef9230f4..ada01fdfdd2 100644 --- a/source/org/jasig/portal/channels/permissionsmanager/CPermissionsManager.java +++ b/source/org/jasig/portal/channels/permissionsmanager/CPermissionsManager.java @@ -97,19 +97,20 @@ public void setRuntimeData (org.jasig.portal.ChannelRuntimeData rD) { } } catch (Exception e){ - log.error(e); + log.error(e, e); } } - if (session.runtimeData.getParameter("prmCommand") != null) { - IPermissionCommand pc = CommandFactory.get(session.runtimeData.getParameter("prmCommand")); + String prmCommand = session.runtimeData.getParameter("prmCommand"); + if (prmCommand != null) { + IPermissionCommand pc = CommandFactory.get(prmCommand); if (pc != null) { try{ pc.execute(session); } catch(Exception e){ - log.error(e); - session.runtimeData.setParameter("commandResponse","Error executing command "+session.runtimeData.getParameter("prmCommand")+": "+e.getMessage()); + log.error("Error executing command [" + prmCommand + "]", e); + session.runtimeData.setParameter("commandResponse","Error executing command "+ prmCommand +": "+e.getMessage()); } } } @@ -220,7 +221,7 @@ protected void prepServant(PermissionsSessionData session){ } catch (Exception e) { - log.error( e); + log.error(e, e); } } @@ -235,7 +236,7 @@ protected void populateMembers(ArrayList gmembers, IAuthorizationPrincipal[] aps } } catch(Exception e){ - log.error(e); + log.error(e, e); } } } @@ -264,7 +265,7 @@ protected void getGroupServantResults(PermissionsSessionData session){ } } catch (Exception e) { - log.error( e); + log.error(e, e); } } @@ -321,7 +322,7 @@ public void renderXML (org.xml.sax.ContentHandler out) { + String.valueOf((time3 - session.startRD)) + " since start RD"); } } catch (Exception e) { - log.error( e); + log.error(e, e); } } @@ -336,7 +337,7 @@ protected void transform (XSLT xslt) { } xslt.transform(); } catch (Exception e) { - log.error( e); + log.error(e, e); } } @@ -354,7 +355,7 @@ public void setStaticData (org.jasig.portal.ChannelStaticData sD) { session.isAuthorized = true; } } catch (Exception e) { - log.error( e); + log.error(e, e); } session.isFinished=false; diff --git a/source/org/jasig/portal/channels/permissionsmanager/CPermissionsManagerServant.java b/source/org/jasig/portal/channels/permissionsmanager/CPermissionsManagerServant.java index 8283123a727..1fd0ddb0108 100644 --- a/source/org/jasig/portal/channels/permissionsmanager/CPermissionsManagerServant.java +++ b/source/org/jasig/portal/channels/permissionsmanager/CPermissionsManagerServant.java @@ -86,7 +86,7 @@ protected void transform (XSLT xslt) { xslt.setStylesheetParameter("isAdminUser", "true"); xslt.transform(); } catch (Exception e) { - log.debug(e); + log.debug(e, e); } } } diff --git a/source/org/jasig/portal/channels/permissionsmanager/CPermissionsManagerServantFactory.java b/source/org/jasig/portal/channels/permissionsmanager/CPermissionsManagerServantFactory.java index 62a4ff393e2..052e0a7ef36 100644 --- a/source/org/jasig/portal/channels/permissionsmanager/CPermissionsManagerServantFactory.java +++ b/source/org/jasig/portal/channels/permissionsmanager/CPermissionsManagerServantFactory.java @@ -159,14 +159,14 @@ protected IServant getServant (String name) { + name); servantClasses.put(name, cserv); } catch (Exception e) { - log.error( e); + log.error(e, e); } } if (servantClasses.get(name) != null) { try { rs = (IServant)((Class)servantClasses.get(name)).newInstance(); } catch (Exception e) { - log.error( e); + log.error(e, e); } } return rs; diff --git a/source/org/jasig/portal/channels/permissionsmanager/CommandFactory.java b/source/org/jasig/portal/channels/permissionsmanager/CommandFactory.java index 83e79d1accf..4c5ba6319e9 100644 --- a/source/org/jasig/portal/channels/permissionsmanager/CommandFactory.java +++ b/source/org/jasig/portal/channels/permissionsmanager/CommandFactory.java @@ -65,7 +65,7 @@ protected CommandFactory () { commands.put("SelectTargets", Class.forName(commandBase + "SelectTargets").newInstance()); commands.put("Cancel", Class.forName(commandBase + "Cancel").newInstance()); } catch (Exception e) { - log.error( e); + log.error(e, e); } } diff --git a/source/org/jasig/portal/channels/permissionsmanager/PermissiblePublishChannels.java b/source/org/jasig/portal/channels/permissionsmanager/PermissiblePublishChannels.java index 692e5494dcd..ba5d2a49b69 100644 --- a/source/org/jasig/portal/channels/permissionsmanager/PermissiblePublishChannels.java +++ b/source/org/jasig/portal/channels/permissionsmanager/PermissiblePublishChannels.java @@ -66,7 +66,7 @@ public PermissiblePublishChannels () { activities.put("PUBLISH", "Publish a Channel"); targets.put("CHAN_ID.*", "This uPortal installation"); } catch (Exception e) { - log.error( e); + log.error(e, e); } } diff --git a/source/org/jasig/portal/channels/permissionsmanager/PermissibleSubscribeChannels.java b/source/org/jasig/portal/channels/permissionsmanager/PermissibleSubscribeChannels.java index 7c0528a8f02..da4a8da4a53 100644 --- a/source/org/jasig/portal/channels/permissionsmanager/PermissibleSubscribeChannels.java +++ b/source/org/jasig/portal/channels/permissionsmanager/PermissibleSubscribeChannels.java @@ -82,7 +82,7 @@ public PermissibleSubscribeChannels () { targets.put("CHAN_ID." + chanID, chanf.getName(chanID)); } } catch (Exception e) { - log.error( e); + log.error(e, e); } } diff --git a/source/org/jasig/portal/channels/permissionsmanager/PermissionsXML.java b/source/org/jasig/portal/channels/permissionsmanager/PermissionsXML.java index 927f0694caf..6e65dffd48e 100644 --- a/source/org/jasig/portal/channels/permissionsmanager/PermissionsXML.java +++ b/source/org/jasig/portal/channels/permissionsmanager/PermissionsXML.java @@ -117,7 +117,7 @@ public static Document getViewDoc (PermissionsSessionData session, boolean force } } catch (Exception e) { - log.error( e); + log.error("Error getting the view doc for session " + session, e); } } } @@ -202,7 +202,7 @@ public static void populatePrincipals(PermissionsSessionData session){ try { name = EntityNameFinderService.instance().getNameFinder(aps[m].getType()).getName(name); } catch (Exception e) { - log.error( e); + log.error(e, e); } ppl.setAttribute("name", name); IPermission[] pms = aps[m].getAllPermissions(); @@ -226,7 +226,7 @@ public static void populatePrincipals(PermissionsSessionData session){ root.appendChild(ppl); } catch(Exception e){ - log.error(e); + log.error(e, e); } } } diff --git a/source/org/jasig/portal/channels/permissionsmanager/RDBMPermissibleRegistry.java b/source/org/jasig/portal/channels/permissionsmanager/RDBMPermissibleRegistry.java index 3d3e8fa79ff..8027519ad3f 100644 --- a/source/org/jasig/portal/channels/permissionsmanager/RDBMPermissibleRegistry.java +++ b/source/org/jasig/portal/channels/permissionsmanager/RDBMPermissibleRegistry.java @@ -94,7 +94,7 @@ private void init () { } } } catch (Exception e) { - log.error( e); + log.error(e, e); } finally { RDBMServices.closeResultSet(rs); RDBMServices.closeStatement(st); @@ -179,7 +179,7 @@ protected void iregisterPermissible (String classname) { + "')"); owners.put(classname, Class.forName(classname)); } catch (Exception e) { - log.error( e); + log.error(e, e); } finally { RDBMServices.closeStatement(st); releaseConnection(conn); @@ -205,7 +205,7 @@ private void unregister (String permissibleClass) { + permissibleClass + "'"); owners.remove(permissibleClass); } catch (Exception e) { - log.debug(e); + log.debug(e, e); } finally { RDBMServices.closeStatement(st); releaseConnection(conn); diff --git a/source/org/jasig/portal/channels/permissionsmanager/commands/AssignPermissions.java b/source/org/jasig/portal/channels/permissionsmanager/commands/AssignPermissions.java index ff3677dec92..789cc179485 100644 --- a/source/org/jasig/portal/channels/permissionsmanager/commands/AssignPermissions.java +++ b/source/org/jasig/portal/channels/permissionsmanager/commands/AssignPermissions.java @@ -141,7 +141,7 @@ private IPermission[] pHolder2DeleteArray (IUpdatingPermissionManager upm, p.setTarget(ph.target); rlist.add(p); } catch (Exception e) { - log.error(e); + log.error(e, e); } } return (IPermission[])rlist.toArray(new IPermission[0]); diff --git a/source/org/jasig/portal/channels/portlet/CPortletAdapter.java b/source/org/jasig/portal/channels/portlet/CPortletAdapter.java index 4a4644be102..d56dabf30fa 100644 --- a/source/org/jasig/portal/channels/portlet/CPortletAdapter.java +++ b/source/org/jasig/portal/channels/portlet/CPortletAdapter.java @@ -172,6 +172,9 @@ protected void initPortletContainer(String uid) throws PortalException { environment.addContainerService(factorManagerService); environment.addContainerService(informationProviderService); + //Call added in case the context has been re-loaded + PortletContainerServices.destroyReference(uniqueContainerName); + portletContainer = new PortletContainerImpl(); portletContainer.init(uniqueContainerName, servletConfig, environment, new Properties()); @@ -238,7 +241,7 @@ protected void initPortletWindow(String uid) throws PortalException { String attValue = (String)person.getAttribute(attName); final String PASSWORD_ATTR = "password"; if ((attValue == null || attValue.equals("")) && attName.equals(PASSWORD_ATTR)) { - attValue = getPassword(person); + attValue = getPassword(person.getSecurityContext()); } userInfo.put(attName, attValue); } @@ -550,8 +553,12 @@ protected synchronized String getMarkup(String uid) throws PortalException { ((PortletWindowImpl)cd.getPortletWindow()).setInternalActionResponse(null); } catch (Throwable t) { - t.printStackTrace(); - log.error( t); + // TODO: review this + // t.printStackTrace(); + // since the stack trace will be logged, this printStackTrace() + // was overkill? -andrew.petro@yale.edu + + log.error(t, t); throw new PortalException(t.getMessage()); } finally { PortletContainerServices.release(); @@ -711,13 +718,13 @@ private void transferActionResultsToRequest(ChannelState channelState, HttpServl * Retrieves the users password by iterating over * the user's security contexts and returning the first * available cached password. - * @param person the person whose password is being sought + * + * @param baseContext The security context to start looking for a password from. * @return the users password */ - private String getPassword(IPerson person) { + private String getPassword(ISecurityContext baseContext) { String password = null; - ISecurityContext ic = (ISecurityContext) person.getSecurityContext(); - IOpaqueCredentials oc = ic.getOpaqueCredentials(); + IOpaqueCredentials oc = baseContext.getOpaqueCredentials(); if (oc instanceof NotSoOpaqueCredentials) { NotSoOpaqueCredentials nsoc = (NotSoOpaqueCredentials)oc; @@ -725,16 +732,22 @@ private String getPassword(IPerson person) { } // If still no password, loop through subcontexts to find cached credentials - Enumeration en = ic.getSubContexts(); + Enumeration en = baseContext.getSubContexts(); while (password == null && en.hasMoreElements()) { - ISecurityContext sctx = (ISecurityContext)en.nextElement(); - IOpaqueCredentials soc = sctx.getOpaqueCredentials(); + ISecurityContext subContext = (ISecurityContext)en.nextElement(); + IOpaqueCredentials soc = subContext.getOpaqueCredentials(); + if (soc instanceof NotSoOpaqueCredentials) { NotSoOpaqueCredentials nsoc = (NotSoOpaqueCredentials)soc; password = nsoc.getCredentials(); } + + if (password == null) { + password = this.getPassword(subContext); + } } return password; - } + } } + diff --git a/source/org/jasig/portal/channels/webproxy/CWebProxy.java b/source/org/jasig/portal/channels/webproxy/CWebProxy.java index 1d92ed16c8d..d0b4089e54c 100644 --- a/source/org/jasig/portal/channels/webproxy/CWebProxy.java +++ b/source/org/jasig/portal/channels/webproxy/CWebProxy.java @@ -1042,7 +1042,7 @@ public Map getHeaders(String uid) { state.connHolder= getConnection(state.fullxmlUri, state); } catch (Exception e){ - log.error(e); + log.error(e, e); } Map rhdrs = new HashMap(); int i = 0; diff --git a/source/org/jasig/portal/concurrency/caching/LRUCache.java b/source/org/jasig/portal/concurrency/caching/LRUCache.java index 7c052f53401..90d63a6b660 100644 --- a/source/org/jasig/portal/concurrency/caching/LRUCache.java +++ b/source/org/jasig/portal/concurrency/caching/LRUCache.java @@ -161,11 +161,10 @@ public synchronized Object remove(Object key) { * Sweep the cache until it gets back under maxSize. */ public void sweepCache() { - long now = System.currentTimeMillis(); long maxAge = maxUnusedTimeMillis; while ( size() > maxSize ) { - long cutOff = now - maxAge; + long cutOff = System.currentTimeMillis() - maxAge; Object[] keys = getKeySetArray(); for (int i=0; i 0) { + Element resourceBundleE = (Element)resourceBundleNL.item(0); // there should only be one + String resourceBundle = XML.getElementText(resourceBundleE); + if (resourceBundle.trim().length() > 0) { + resources = resourceBundle; + } + } + + // The portlet-info element is optional if the resource-bundle element is specified + String title = null; + String shortTitle = null; + String keywords = null; NodeList portletInfoNL = portletE.getElementsByTagName("portlet-info"); - Element portletInfoE = (Element)portletInfoNL.item(0); // there should only be one - String title = XML.getChildElementText(portletInfoE, "title"); - String shortTitle = XML.getChildElementText(portletInfoE, "short-title"); - String keywords = XML.getChildElementText(portletInfoE, "keywords"); - LanguageSetImpl languages = new LanguageSetImpl(title, shortTitle, keywords, contextName); + if (portletInfoNL.getLength() > 0) { + Element portletInfoE = (Element)portletInfoNL.item(0); // there should only be one + title = XML.getChildElementText(portletInfoE, "title"); + shortTitle = XML.getChildElementText(portletInfoE, "short-title"); + keywords = XML.getChildElementText(portletInfoE, "keywords"); + } + + LanguageSetImpl languages = new LanguageSetImpl(title, shortTitle, keywords, resources); languages.setClassLoader(Thread.currentThread().getContextClassLoader()); NodeList supportedLocaleNL = portletE.getElementsByTagName("supported-locale"); for (int i = 0; i < supportedLocaleNL.getLength(); i += 1) { Element supportedLocaleE = (Element)supportedLocaleNL.item(i); - languages.addLanguage(LocaleManager.parseLocale(XML.getElementText(supportedLocaleE))); + languages.addLocale(LocaleManager.parseLocale(XML.getElementText(supportedLocaleE))); } return languages; } diff --git a/source/org/jasig/portal/container/om/common/LanguageImpl.java b/source/org/jasig/portal/container/om/common/LanguageImpl.java index 19d2f906f63..50b37e6d472 100644 --- a/source/org/jasig/portal/container/om/common/LanguageImpl.java +++ b/source/org/jasig/portal/container/om/common/LanguageImpl.java @@ -177,8 +177,11 @@ private static class ResourceBundleImpl extends ResourceBundle { public ResourceBundleImpl(ResourceBundle bundle, ResourceBundle defaults) { data = new HashMap(); - importData(defaults); - importData(bundle); + if (bundle != null) { + importData(bundle); + } else { + importData(defaults); + } } private void importData(ResourceBundle bundle) { diff --git a/source/org/jasig/portal/container/om/common/LanguageSetImpl.java b/source/org/jasig/portal/container/om/common/LanguageSetImpl.java index 43abcfcea85..8313de943cd 100644 --- a/source/org/jasig/portal/container/om/common/LanguageSetImpl.java +++ b/source/org/jasig/portal/container/om/common/LanguageSetImpl.java @@ -43,6 +43,8 @@ import java.util.MissingResourceException; import java.util.ResourceBundle; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.pluto.om.common.Language; import org.apache.pluto.om.common.LanguageSet; @@ -56,21 +58,30 @@ public class LanguageSetImpl implements LanguageSet, Serializable { private String title = null; private String shortTitle = null; private String keywords = null; - private String resourceBundleBase = null; + private String resources = null; private ClassLoader classLoader = null; private Map languages = null; // Locale --> Language + private boolean resourceBundleInitialized = false; + private boolean hasResourceBundle = false; + private static final Log log = LogFactory.getLog(LanguageSetImpl.class); - public LanguageSetImpl(String title, String shortTitle, String keywords, String resourceBundleBase) { + public LanguageSetImpl(String title, String shortTitle, String keywords, String resources) { languages = new HashMap(); this.title = title; this.shortTitle = shortTitle; this.keywords = keywords; - this.resourceBundleBase = resourceBundleBase; + this.resources = resources; + + hasResourceBundle = resources != null; } // LanguageSet methods public Iterator iterator() { + if (!resourceBundleInitialized) { + initResourceBundle(); + resourceBundleInitialized = true; + } return languages.values().iterator(); } @@ -79,55 +90,74 @@ public Iterator getLocales() { } public Language get(Locale locale) { + if (!resourceBundleInitialized) { + initResourceBundle(); + resourceBundleInitialized = true; + } return (Language)languages.get(locale); } public Locale getDefaultLocale() { - // Pluto portalImpl gets the first locale in the list - // The languages/locales implementation in Pluto is messed up - // so we'll need to revisit how LanguageSetImpl and LanguageImpl work. Locale defaultLocale = Locale.getDefault(); - ResourceBundle resourceBundle = loadResourceBundle(defaultLocale); - Language defaultLanguage = createLanguage(defaultLocale, resourceBundle); - languages.put(defaultLocale, defaultLanguage); return defaultLocale; } // Additional methods - public void setResourceBundleBase(String resourceBundleBase) { - this.resourceBundleBase = resourceBundleBase; + public void setResources(String resourceBundleBase) { + this.resources = resourceBundleBase; } public void setClassLoader(ClassLoader classLoader) { this.classLoader = classLoader; } - public void addLanguage(Locale locale) { - ResourceBundle resourceBundle = loadResourceBundle(locale); + public void addLocale(Locale locale) { + // The null Language values will be replaced + // during the initResourceBundle() method + // since we don't have the right class loader at the + // time this method is called + languages.put(locale, null); + } + + private void addLanguage(Locale locale) { + ResourceBundle resourceBundle = null; + if (hasResourceBundle) { + resourceBundle = loadResourceBundle(locale); + } Language language = createLanguage(locale, resourceBundle); languages.put(language.getLocale(), language); } - // create Language object with data from this class (title, short-title, description, keywords) + // Create Language object with data from this class (title, short-title, description, keywords) private Language createLanguage(Locale locale, ResourceBundle bundle) { LanguageImpl lang = new LanguageImpl(locale, bundle, title, shortTitle, keywords); return (Language)lang; } - // loads resource bundle files from WEB-INF/classes directory + // Loads resource bundle files from WEB-INF/classes directory private ResourceBundle loadResourceBundle(Locale locale) { ResourceBundle resourceBundle = null; try { if (classLoader != null) { - resourceBundle = ResourceBundle.getBundle(resourceBundleBase, locale, classLoader); + resourceBundle = ResourceBundle.getBundle(resources, locale, classLoader); } else { - resourceBundle = ResourceBundle.getBundle(resourceBundleBase, locale, Thread.currentThread().getContextClassLoader()); + resourceBundle = ResourceBundle.getBundle(resources, locale, Thread.currentThread().getContextClassLoader()); + } + } catch (MissingResourceException mre) { + if (log.isErrorEnabled()) { + log.error("Cannot obtain portlet resource bundle '" + resources + "'", mre); } - } catch (MissingResourceException x) { } return resourceBundle; } - + private void initResourceBundle() { + // Assume that by now, we have a proper webapp class loader + addLocale(Locale.getDefault()); + for (Iterator iter = languages.keySet().iterator(); iter.hasNext();) { + Locale locale = (Locale)iter.next(); + addLanguage(locale); + } + } } diff --git a/source/org/jasig/portal/container/om/entity/PortletEntityImpl.java b/source/org/jasig/portal/container/om/entity/PortletEntityImpl.java index 5b97afd8f53..8770cf1e94a 100644 --- a/source/org/jasig/portal/container/om/entity/PortletEntityImpl.java +++ b/source/org/jasig/portal/container/om/entity/PortletEntityImpl.java @@ -131,7 +131,7 @@ public void store() throws IOException { ((PreferenceSetImpl)originalPreferences).addAll(preferences); } catch (Exception e) { - log.error( e); + log.error("Could not store portlet entity preferences", e); throw new IOException("Could not store portlet entity preferences: " + e.getMessage()); } } @@ -174,7 +174,7 @@ public void loadPreferences() throws Exception { originalPreferences = new PreferenceSetImpl(); ((PreferenceSetImpl)originalPreferences).addAll(preferences); } catch (Exception e) { - log.error( e); + log.error("Could not load portlet entity preferences.", e); throw new IOException("Could not load portlet entity preferences: " + e.getMessage()); } } @@ -189,7 +189,7 @@ public void removePreferences() throws Exception { portletPrefsStore.deletePortletPreferencesByInstance(userId, layoutId, channelDescId); } catch (Exception e) { - log.error( e); + log.error("Could not delete portlet entity preferences", e); throw new IOException("Could not delete portlet entity preferences: " + e.getMessage()); } } diff --git a/source/org/jasig/portal/container/om/portlet/PortletDefinitionImpl.java b/source/org/jasig/portal/container/om/portlet/PortletDefinitionImpl.java index 4151e2ebd4a..956317e4172 100644 --- a/source/org/jasig/portal/container/om/portlet/PortletDefinitionImpl.java +++ b/source/org/jasig/portal/container/om/portlet/PortletDefinitionImpl.java @@ -55,6 +55,7 @@ import org.jasig.portal.ChannelDefinition; import org.jasig.portal.IPortletPreferencesStore; import org.jasig.portal.PortletPreferencesStoreFactory; +import org.jasig.portal.container.om.common.LanguageSetImpl; import org.jasig.portal.container.om.common.ObjectIDImpl; import org.jasig.portal.container.om.common.PreferenceSetImpl; import org.jasig.portal.container.om.common.SecurityRoleRefSetImpl; @@ -107,6 +108,7 @@ public Description getDescription(Locale locale) { } public LanguageSet getLanguageSet() { + ((LanguageSetImpl)languages).setClassLoader(getPortletClassLoader()); return languages; } @@ -178,7 +180,7 @@ public void store() throws IOException { IPortletPreferencesStore portletPrefsStore = PortletPreferencesStoreFactory.getPortletPreferencesStoreImpl(); portletPrefsStore.setDefinitionPreferences(channelDefinition.getId(), preferences); } catch (Exception e) { - log.error( e); + log.error("Could not store portlet definition preferences.", e); throw new IOException("Could not store portlet definition preferences: " + e.getMessage()); } } @@ -212,7 +214,7 @@ public void loadPreferences() throws Exception { ((PreferenceSetImpl)preferences).addAll(publishPreferences); } catch (Exception e) { - log.error( e); + log.error("Could not load portlet definition preferences", e); throw new IOException("Could not load portlet definition preferences: " + e.getMessage()); } } diff --git a/source/org/jasig/portal/groups/EntityGroupNameFinder.java b/source/org/jasig/portal/groups/EntityGroupNameFinder.java index 466f1b01a66..f324b796f73 100644 --- a/source/org/jasig/portal/groups/EntityGroupNameFinder.java +++ b/source/org/jasig/portal/groups/EntityGroupNameFinder.java @@ -61,7 +61,7 @@ protected EntityGroupNameFinder () { try { type = Class.forName("org.jasig.portal.groups.IEntityGroup"); } catch (Exception e) { - log.error( e); + log.error(e, e); } } diff --git a/source/org/jasig/portal/groups/RDBMEntityGroupStore.java b/source/org/jasig/portal/groups/RDBMEntityGroupStore.java index 690218f8d4d..66bb321021a 100644 --- a/source/org/jasig/portal/groups/RDBMEntityGroupStore.java +++ b/source/org/jasig/portal/groups/RDBMEntityGroupStore.java @@ -508,7 +508,7 @@ public Iterator findEntitiesForGroup(IEntityGroup group) throws GroupsException } catch (SQLException sqle) { - log.error( sqle); + log.error("Problem retrieving Entities for Group: " + group, sqle); throw new GroupsException("Problem retrieving Entities for Group: " + sqle.getMessage()); } finally @@ -1254,7 +1254,7 @@ private void primAdd(IEntityGroup group, Connection conn) throws SQLException, G } catch (java.sql.SQLException sqle) { - log.error( sqle); + log.error("Error inserting an entity into the database. Group:" + group, sqle); throw sqle; } } @@ -1393,7 +1393,7 @@ private void primUpdate(IEntityGroup group, Connection conn) throws SQLException } catch (java.sql.SQLException sqle) { - log.error( sqle); + log.error("Error updating entity in database. Group: " + group, sqle); throw sqle; } } @@ -1527,7 +1527,7 @@ private void primUpdateMembers(EntityGroupImpl egi, Connection conn) throws java } catch (SQLException sqle) { - log.error( sqle); + log.error("Error inserting/deleting membership rows.", sqle); throw sqle; } } @@ -1581,8 +1581,7 @@ public EntityIdentifier[] searchForGroups(String query, int method, Class leafty } ps.close(); } catch (Exception e) { - log.error("RDBMChannelDefSearcher.searchForEntities(): " + ps); - log.error( e); + log.error("RDBMChannelDefSearcher.searchForEntities(): " + ps, e); } finally { RDBMServices.releaseConnection(conn); } diff --git a/source/org/jasig/portal/groups/ReferenceChannelNameFinder.java b/source/org/jasig/portal/groups/ReferenceChannelNameFinder.java index c249d70f803..c594c129254 100644 --- a/source/org/jasig/portal/groups/ReferenceChannelNameFinder.java +++ b/source/org/jasig/portal/groups/ReferenceChannelNameFinder.java @@ -64,7 +64,7 @@ protected ReferenceChannelNameFinder () { try { type = Class.forName("org.jasig.portal.ChannelDefinition"); } catch (Exception e) { - log.error( e); + log.error("Exception instantiating ReferenceChannelNameFinder.", e); } } diff --git a/source/org/jasig/portal/groups/ReferencePersonNameFinder.java b/source/org/jasig/portal/groups/ReferencePersonNameFinder.java index 9e5fb2365cf..c1a22b87cd8 100644 --- a/source/org/jasig/portal/groups/ReferencePersonNameFinder.java +++ b/source/org/jasig/portal/groups/ReferencePersonNameFinder.java @@ -114,7 +114,7 @@ private Map getDirectoryNames() throws java.sql.SQLException } catch (SQLException sqle) { - log.error( sqle); + log.error("Error getting names by userid from UP_PERSON_DIR", sqle); throw sqle; } @@ -200,7 +200,7 @@ private Map getUserNames() throws java.sql.SQLException } catch (SQLException sqle) { - log.error( sqle); + log.error("Error getting names by user ID from UP_USER", sqle); throw sqle; } diff --git a/source/org/jasig/portal/groups/ldap/LDAPGroupStore.java b/source/org/jasig/portal/groups/ldap/LDAPGroupStore.java index b5022a42cb4..3552c68d845 100644 --- a/source/org/jasig/portal/groups/ldap/LDAPGroupStore.java +++ b/source/org/jasig/portal/groups/ldap/LDAPGroupStore.java @@ -450,8 +450,7 @@ protected void processLdapResults(NamingEnumeration results, ArrayList keys){ } } catch(NamingException nex){ - log.error("LDAPGroupStore: error processing results"); - log.error(nex); + log.error("LDAPGroupStore: error processing results", nex); } finally{ try{results.close();}catch(Exception e){} @@ -484,8 +483,7 @@ protected DirContext getConnection(){ try { context = new InitialDirContext(jndienv); } catch (NamingException nex) { - log.error("LDAPGroupStore: unable to get context"); - log.error(nex); + log.error("LDAPGroupStore: unable to get context", nex); } contexts.put("context",context); } @@ -658,8 +656,7 @@ public EntityIdentifier[] searchForEntities(String query, int method, Class type try { userlist = context.search(usercontext,query,sc); } catch (NamingException nex) { - log.error("LDAPGroupStore: Unable to perform filter "+query); - log.error(nex); + log.error("LDAPGroupStore: Unable to perform filter "+query, nex); } ArrayList keys = new ArrayList(); processLdapResults(userlist,keys); diff --git a/source/org/jasig/portal/groups/local/searchers/RDBMChannelDefSearcher.java b/source/org/jasig/portal/groups/local/searchers/RDBMChannelDefSearcher.java index 2b0bd95dbfb..541ff7a8e87 100644 --- a/source/org/jasig/portal/groups/local/searchers/RDBMChannelDefSearcher.java +++ b/source/org/jasig/portal/groups/local/searchers/RDBMChannelDefSearcher.java @@ -65,7 +65,7 @@ public RDBMChannelDefSearcher() { chanDef = Class.forName("org.jasig.portal.ChannelDefinition"); } catch(Exception e){ - log.error(e); + log.error(e, e); } } public EntityIdentifier[] searchForEntities(String query, int method) throws GroupsException { @@ -107,8 +107,7 @@ public EntityIdentifier[] searchForEntities(String query, int method) throws Gro } ps.close(); } catch (Exception e) { - log.error("RDBMChannelDefSearcher.searchForEntities(): " + ps); - log.error( e); + log.error("RDBMChannelDefSearcher.searchForEntities(): " + ps, e); } finally { RDBMServices.releaseConnection(conn); } diff --git a/source/org/jasig/portal/groups/local/searchers/RDBMPersonSearcher.java b/source/org/jasig/portal/groups/local/searchers/RDBMPersonSearcher.java index f328c20f705..bdebc546b9f 100644 --- a/source/org/jasig/portal/groups/local/searchers/RDBMPersonSearcher.java +++ b/source/org/jasig/portal/groups/local/searchers/RDBMPersonSearcher.java @@ -67,7 +67,7 @@ public RDBMPersonSearcher() { personDef = Class.forName("org.jasig.portal.security.IPerson"); } catch(Exception e){ - log.error(e); + log.error(e, e); } } public EntityIdentifier[] searchForEntities(String query, int method) throws GroupsException { @@ -130,8 +130,7 @@ public EntityIdentifier[] searchForEntities(String query, int method) throws Gro ar.add(new EntityIdentifier(uprs.getString(1),personDef)); } } catch (Exception e) { - log.error("RDBMChannelDefSearcher.searchForEntities(): " + ps); - log.error( e); + log.error("RDBMChannelDefSearcher.searchForEntities(): " + ps, e); } finally { RDBMServices.closeResultSet(rs); RDBMServices.closeResultSet(urs); diff --git a/source/org/jasig/portal/groups/pags/PersonAttributesGroupStore.java b/source/org/jasig/portal/groups/pags/PersonAttributesGroupStore.java index ddcf871466b..c955931c108 100644 --- a/source/org/jasig/portal/groups/pags/PersonAttributesGroupStore.java +++ b/source/org/jasig/portal/groups/pags/PersonAttributesGroupStore.java @@ -91,7 +91,7 @@ public PersonAttributesGroupStore() { initGroups(); } catch ( Exception e ) { String errorMsg = "PersonAttributeGroupStore.init(): " + "Problem initializing groups: " + e.getMessage(); - log.error( e); + log.error("Problem initializing groups.", e); throw new RuntimeException(errorMsg); } } diff --git a/source/org/jasig/portal/i18n/LocaleManager.java b/source/org/jasig/portal/i18n/LocaleManager.java index fd2124970e3..f4bc2c5150a 100644 --- a/source/org/jasig/portal/i18n/LocaleManager.java +++ b/source/org/jasig/portal/i18n/LocaleManager.java @@ -92,7 +92,7 @@ public LocaleManager(IPerson person) { try { userLocales = LocaleStoreFactory.getLocaleStoreImpl().getUserLocales(person); } catch (Exception e) { - log.error( e); + log.error("Error populating userLocals", e); } } } diff --git a/source/org/jasig/portal/jndi/JNDIManager.java b/source/org/jasig/portal/jndi/JNDIManager.java index 1521eb08ebc..c9059576753 100644 --- a/source/org/jasig/portal/jndi/JNDIManager.java +++ b/source/org/jasig/portal/jndi/JNDIManager.java @@ -134,8 +134,7 @@ public static void initializePortalContext () throws PortalException { log.debug("JNDIManager::initializePortalContext() : initialized portal JNDI context"); } catch (Exception e) { - // Log the exception - log.error( e); + log.error("Error initializing Portal context", e); } } diff --git a/source/org/jasig/portal/layout/AggregatedUserLayoutStore.java b/source/org/jasig/portal/layout/AggregatedUserLayoutStore.java index 72e0a714731..be934e97468 100644 --- a/source/org/jasig/portal/layout/AggregatedUserLayoutStore.java +++ b/source/org/jasig/portal/layout/AggregatedUserLayoutStore.java @@ -2376,8 +2376,7 @@ else if ( range[1] < priority ) if ( stmt != null ) stmt.close(); } } catch ( Exception e ) { - e.printStackTrace(); - log.error(e); + log.error("Error getting aggregated layout for user " + person, e); throw new PortalException(e); } finally { RDBMServices.releaseConnection(con); @@ -2789,8 +2788,7 @@ else if ( range[1] < priority ) } catch ( Exception e ) { - e.printStackTrace(); - log.error(e); + log.error("Error concerning fragement " + fragmentIdStr, e); throw new PortalException(e); } finally { RDBMServices.releaseConnection(con); @@ -3023,13 +3021,11 @@ public StructureStylesheetUserPreferences getStructureStylesheetUserPreferences String subSelectString = "SELECT LAYOUT_ID FROM UP_USER_PROFILE WHERE USER_ID=" + userId + " AND PROFILE_ID=" + profileId; log.debug("RDBMUserLayoutStore::getStructureStylesheetUserPreferences(): " + subSelectString); - int layoutId; + int layoutId = 0; ResultSet rs = stmt.executeQuery(subSelectString); try { - rs.next(); - layoutId = rs.getInt(1); - if (rs.wasNull()) { - layoutId = 0; + if (rs.next()) { + layoutId = rs.getInt(1); } } finally { rs.close(); diff --git a/source/org/jasig/portal/layout/channels/CContentSubscriber.java b/source/org/jasig/portal/layout/channels/CContentSubscriber.java index fd2230fbc5b..e1ea709af73 100644 --- a/source/org/jasig/portal/layout/channels/CContentSubscriber.java +++ b/source/org/jasig/portal/layout/channels/CContentSubscriber.java @@ -36,7 +36,6 @@ package org.jasig.portal.layout.channels; import org.jasig.portal.ChannelRegistryManager; -import org.jasig.portal.ChannelStaticData; import org.jasig.portal.PortalException; import org.jasig.portal.PortalControlStructures; import org.jasig.portal.utils.CommonUtils; @@ -317,6 +316,7 @@ protected Collection getFragments() throws PortalException { } public void initRegistry() throws PortalException { + channelRegistry = ChannelRegistryManager.getChannelRegistry(staticData.getPerson()); registry = DocumentFactory.getNewDocument(); registry.appendChild(registry.importNode(channelRegistry.getDocumentElement(),true)); getFragmentList(registry,registry.getDocumentElement()); @@ -332,12 +332,6 @@ public void setPortalControlStructures(PortalControlStructures pcs) throws Porta throw new PortalException ("The layout manager must have type IAgreggatedUserLayoutManager!"); } - public void setStaticData (ChannelStaticData sd) throws PortalException { - super.setStaticData(sd); - if ( channelRegistry == null ) - channelRegistry = ChannelRegistryManager.getChannelRegistry(staticData.getPerson()); - } - public void renderXML (ContentHandler out) throws PortalException { diff --git a/source/org/jasig/portal/layout/channels/CFragmentManager.java b/source/org/jasig/portal/layout/channels/CFragmentManager.java index 4555dc7a61a..02934c23cda 100644 --- a/source/org/jasig/portal/layout/channels/CFragmentManager.java +++ b/source/org/jasig/portal/layout/channels/CFragmentManager.java @@ -175,6 +175,8 @@ protected void analyzeParameters( XSLT xslt ) throws PortalException { newFragment.setPulledFragment(); // Saving the changes in the database alm.saveFragment(newFragment); + // Saving user's layout to database + alm.saveUserLayout(); // Updating the fragments map fragments.put(fragmentId,newFragment); // Check if we need to create an additional folder on the fragment root diff --git a/source/org/jasig/portal/ldap/LdapServices.java b/source/org/jasig/portal/ldap/LdapServices.java index 944ad78bf17..ddc1abe2ff2 100644 --- a/source/org/jasig/portal/ldap/LdapServices.java +++ b/source/org/jasig/portal/ldap/LdapServices.java @@ -265,11 +265,10 @@ else if (tagName.equals("factory")) { ILdapServer newConn = new LdapConnectionImpl(name, host, port, baseDN, uidAttribute, managerDN, managerPW, protocol, factory); ldapConnections.put(name, newConn); - if (isDefaultConn && defaultConn == null) { + if (isDefaultConn) { defaultConn = newConn; - } - else if (isDefaultConn && defaultConn != null) { - log.error( "LdapServices::initConnections(): Error, multiple default connections specified. Ignoring " + name + " for default."); + if (log.isInfoEnabled()) + log.info("Replaced '" + LDAP_PROPERTIES_FILE + "' connection with default connection '" + name + "' from '" + LDAP_XML_FILE + "'"); } } catch (IllegalArgumentException iae) { diff --git a/source/org/jasig/portal/security/InitialSecurityContextFactory.java b/source/org/jasig/portal/security/InitialSecurityContextFactory.java index 8b97254d7c3..96738246b7f 100644 --- a/source/org/jasig/portal/security/InitialSecurityContextFactory.java +++ b/source/org/jasig/portal/security/InitialSecurityContextFactory.java @@ -37,11 +37,12 @@ import java.io.IOException; import java.io.InputStream; +import java.util.Collection; import java.util.Enumeration; import java.util.Hashtable; import java.util.Map; import java.util.Properties; -import java.util.StringTokenizer; +import java.util.Vector; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -81,30 +82,30 @@ public class InitialSecurityContextFactory { * a the ISecurityContext chain to be created more quickly since the * properties file doesn't need to be parsed at each getInitialContext call. */ - private static final Map contextConfigs = new Hashtable(); + private static final Map contextConfigCache = new Hashtable(); - public static ISecurityContext getInitialContext(String ctx) throws PortalSecurityException { - BaseContextConfiguration contextConfig; + public static ISecurityContext getInitialContext(final String rootContext) throws PortalSecurityException { + BaseContextConfiguration contextConfigBase; /* - * Synchronize on the contextConfigs Map, this ensures two threads don't + * Synchronize on the contextConfigCache Map, this ensures two threads don't * end up creating the same BaseContextConfiguration. */ - synchronized (contextConfigs) { - contextConfig = (BaseContextConfiguration)contextConfigs.get(ctx); + synchronized (contextConfigCache) { + contextConfigBase = (BaseContextConfiguration)contextConfigCache.get(rootContext); //The desired base context configuraton doesn't exist - if (contextConfig == null) { + if (contextConfigBase == null) { //Initial contexts must have names that are not compound - if (ctx.indexOf('.') != -1) { + if (rootContext.indexOf('.') != -1) { PortalSecurityException ep = new PortalSecurityException("Initial Context can't be compound"); - log.error(ep); + log.error(ep.getMessage(), ep); throw(ep); } - contextConfig = new BaseContextConfiguration(); - contextConfigs.put(ctx, contextConfig); + contextConfigBase = new BaseContextConfiguration(); + contextConfigCache.put(rootContext, contextConfigBase); } } @@ -122,203 +123,178 @@ public static ISecurityContext getInitialContext(String ctx) throws PortalSecuri * exit the block. The waiting thread(s) will have a reference to a * now initialized config and skip the initalization code. */ - synchronized (contextConfig) { - if (!contextConfig.initialized) { + synchronized (contextConfigBase) { + if (!contextConfigBase.initialized) { //Try to load the properties - InputStream secprops = InitialSecurityContextFactory.class.getResourceAsStream("/properties/security.properties"); - Properties pr = new Properties(); - try { - pr.load(secprops); + final Properties securityProperties = new Properties(); + InputStream securityPropertiesStream = null; + + try { + securityPropertiesStream = InitialSecurityContextFactory.class.getResourceAsStream("/properties/security.properties"); + securityProperties.load(securityPropertiesStream); } catch (IOException e) { - PortalSecurityException ep = new PortalSecurityException(e.getMessage()); - log.error(ep); - throw(ep); + final PortalSecurityException ep = new PortalSecurityException(e.getMessage()); + log.error(ep.getMessage(), ep); + throw(ep); } finally { try { - if (secprops != null) - { - secprops.close(); + if (securityPropertiesStream != null) { + securityPropertiesStream.close(); } } catch (IOException ioe) { - log.error( "InitialSecurityContextFactory:getInitialContext::unable to close InputStream ", ioe); + log.error("getInitialContext() unable to close InputStream", ioe); } } - //Load the root context factory name - String factoryName = pr.getProperty(ctx); - if (factoryName == null) { - PortalSecurityException ep = new PortalSecurityException("No such security context " + ctx); - log.error(ep); - throw(ep); - } - - //Create the root context factory - try { - ISecurityContextFactory factory = (ISecurityContextFactory)Class.forName(factoryName).newInstance(); - contextConfig.rootConfig.contextFactory = factory; - contextConfig.rootConfig.contextName = ctx; - } - catch (Exception e) { - PortalSecurityException ep = new PortalSecurityException("Failed to instantiate " + factoryName); - log.error( "Failed to instantiate " + factoryName, e); - throw(ep); - } - - //Context configuration properties as securityContextProperty. entries - // Format is: - // securityContextProperty. - root context properties - // securityContextProperty.. - sub context properties - // cannot contain . - - //Load sub context factories and context configuration properties - Map subContextConfigs = new Hashtable(); - Map subContextProperties = new Hashtable(); - for (Enumeration ctxnames = pr.propertyNames(); ctxnames.hasMoreElements(); ) { - String secname, sfactoryname; - String candidate = (String)ctxnames.nextElement(); - - //For sub context properties - if (candidate.startsWith(ctx + ".")) { - secname = candidate.substring(ctx.length()+1); - sfactoryname = pr.getProperty(candidate); - - try { - if (subContextConfigs.get(secname) != null) { - throw new IllegalArgumentException("Two sub contexts cannot share a name. (" + candidate + "=" + sfactoryname + ")"); - } - - ISecurityContextFactory sfactory = (ISecurityContextFactory)Class.forName(sfactoryname).newInstance(); - - ContextConfiguration subContextConfig = new ContextConfiguration(); - subContextConfig.contextFactory = sfactory; - subContextConfig.contextName = secname; - - Properties existingProps = (Properties)subContextProperties.remove(secname); - if (existingProps != null) { - subContextConfig.contextProperties = existingProps; - } - - subContextConfigs.put(secname, subContextConfig); - } - catch (Exception e) { - String errorMsg = "(Subcontext) Failed to instantiate " + sfactoryname; - PortalSecurityException ep = new PortalSecurityException(errorMsg); - ep.setRecordedException(e); - log.error( errorMsg); - log.error( e); - throw ep; - } - } - //For context configuration properties - else if (candidate.startsWith(CONTEXT_PROPERTY_PREFIX)) { - try { - StringTokenizer propNameParts = new StringTokenizer(candidate, ".", true); - int tokenCount = propNameParts.countTokens(); - - if (tokenCount == 3 || tokenCount == 5) { - String ctxName = null; - propNameParts.nextToken(); //Skip the prefix - propNameParts.nextToken(); //Skip the first . - - if (tokenCount == 3) { - ctxName = ""; - } - else if (tokenCount == 5) { - ctxName = propNameParts.nextToken(); - propNameParts.nextToken(); //Skip the second . - } - - if (ctxName != null) { - String ctxPropName = propNameParts.nextToken(); - String ctxPropValue = pr.getProperty(candidate); - - Properties subContextProps; - if (ctxName.equals("")) { - //"" context name means root context - subContextProps = contextConfig.rootConfig.contextProperties; - } - else { - //See if the desired context has been created yet - ContextConfiguration subContextConfig = (ContextConfiguration)subContextConfigs.get(ctxName); - - if (subContextConfig == null) { - //Desired context doesn't exist - //See if properties have been stored for this sub context yet - subContextProps = (Properties)subContextProperties.get(ctxName); - - if (subContextProps == null) { - //No properties stored for this sub context yet, create and store them - subContextProps = new Properties(); - subContextProperties.put(ctxName, subContextProps); - } - } - else { - //Desired context exists, use the properties object from it - subContextProps = subContextConfig.contextProperties; - } - } - - //Set the property on the context - subContextProps.setProperty(ctxPropName, ctxPropValue); - } - } - } - catch (Exception e) { - log.warn("Error parsing security context property from security.properties: " + candidate, e); - } - } - } - - contextConfig.subConfigs = (ContextConfiguration[])subContextConfigs.values().toArray(new ContextConfiguration[subContextConfigs.size()]); - contextConfig.initialized = true; + //Load the context configurations + contextConfigBase.rootConfig = loadContextConfigurationChain(rootContext, securityProperties); + contextConfigBase.initialized = true; } } //Should have a valid contextConfig here try { - //Create the root context - ISecurityContext ictx = contextConfig.rootConfig.contextFactory.getSecurityContext(); - - //If it is a configurable SecurityContext pass in the properties - if (ictx instanceof IConfigurableSecurityContext) { - ((IConfigurableSecurityContext)ictx).setProperties((Properties)contextConfig.rootConfig.contextProperties.clone()); - } - - //Create all the sub contexts - for (int index = 0; index < contextConfig.subConfigs.length; index++) { - ISecurityContext subIctx = contextConfig.subConfigs[index].contextFactory.getSecurityContext(); - - //If it is a configurable SecurityContext pass in the properties - if (subIctx instanceof IConfigurableSecurityContext) { - ((IConfigurableSecurityContext)subIctx).setProperties((Properties)contextConfig.subConfigs[index].contextProperties.clone()); - } - - ictx.addSubContext(contextConfig.subConfigs[index].contextName, subIctx); - } - - return ictx; + //Create the context tree + ISecurityContext ctx = createSecurityContextChain(contextConfigBase.rootConfig); + return ctx; } catch (NullPointerException npe) { - String errorMsg = "Error while creating ISecurityContext chain."; - PortalSecurityException ep = new PortalSecurityException(errorMsg); + final PortalSecurityException ep = new PortalSecurityException("Error while creating ISecurityContext chain."); ep.setRecordedException(npe); - log.error( ep); + log.error(ep.getMessage(), ep); throw ep; } } + + /** + * Recursivly parses the tree of {@link ContextConfiguration} objects to create + * a tree (chain) of {@link ISecurityContext}s. The root context is returned by + * the method after all of it's sub-contexts have been created and configured. + * + * @param contextConfig The {@link ContextConfiguration} to use as the root + * @return A configured {@link ISecurityContext} + * @throws PortalSecurityException If an excetion is thrown by the {@link ISecurityContext#addSubContext(String, ISecurityContext)} method. + */ + private static ISecurityContext createSecurityContextChain(final ContextConfiguration contextConfig) throws PortalSecurityException { + final ISecurityContext securityContext = contextConfig.contextFactory.getSecurityContext(); + + //If it is a configurable SecurityContext pass in the properties + if (securityContext instanceof IConfigurableSecurityContext) { + ((IConfigurableSecurityContext)securityContext).setProperties((Properties)contextConfig.contextProperties.clone()); + } + + //Create all the sub contexts + for (int index = 0; index < contextConfig.subConfigs.length; index++) { + final ISecurityContext subSecurityContext = createSecurityContextChain(contextConfig.subConfigs[index]); + + securityContext.addSubContext(contextConfig.subConfigs[index].contextName, subSecurityContext); + } + + return securityContext; + } + + /** + * This method parses the {@link Properties} file to find the configuration + * for the specified context. The factory is loaded and the configuration is + * named then the {@link Properties} are parsed to find all context configuration + * properties and sub-contexts for this context. For each sub-context this method + * is called recursivly. + * + * @param fullContextName The fully qualified name of the context to configure. + * @param securtiyProperties The {@link Properties} to use for configuration. + * @return A fully configured {@link ContextConfiguration} object. + * @throws PortalSecurityException If no context with the specified named exists or the factory cannot be created. + */ + private static ContextConfiguration loadContextConfigurationChain(final String fullContextName, final Properties securtiyProperties) throws PortalSecurityException { + //Load the context factory name + final String factoryName = securtiyProperties.getProperty(fullContextName); + if (factoryName == null) { + final PortalSecurityException ep = new PortalSecurityException("No such security context " + fullContextName); + log.error(ep.getMessage(), ep); + throw(ep); + } + + //The contextConfig this method will return + final ContextConfiguration contextConfig = new ContextConfiguration(); + + final int lastDotIndex = fullContextName.lastIndexOf("."); + String localContextName = fullContextName; + if (lastDotIndex >= 0) { + try { + localContextName = fullContextName.substring(lastDotIndex + 1); + } + catch (IndexOutOfBoundsException ioobe) { + final PortalSecurityException pse = new PortalSecurityException("Invalid context name " + fullContextName); + pse.setRecordedException(ioobe); + log.error(pse.getMessage(), pse); + throw pse; + } + } + + + //Create the context factory + try { + final ISecurityContextFactory factory = (ISecurityContextFactory)Class.forName(factoryName).newInstance(); + contextConfig.contextFactory = factory; + contextConfig.contextName = localContextName; + } + catch (Exception e) { + final PortalSecurityException ep = new PortalSecurityException("Failed to instantiate " + factoryName); + log.error("Failed to instantiate " + factoryName, e); + throw(ep); + } + + + //Just move this string concatination out of the loop to save cycles + final String contextConfigPropertyPrefix = CONTEXT_PROPERTY_PREFIX + "." + fullContextName; + + //Read sub context names & properties for this context + final Collection subContexts = new Vector(); + for (final Enumeration ctxnames = securtiyProperties.propertyNames(); ctxnames.hasMoreElements(); ) { + final String securityPropName = (String)ctxnames.nextElement(); + + if (securityPropName.startsWith(fullContextName) && + securityPropName.length() > fullContextName.length() && + securityPropName.indexOf(".", fullContextName.length() + 1) < 0) { + + //call getContextConfiguration(name) on each + final ContextConfiguration subContextConfig = loadContextConfigurationChain(securityPropName, securtiyProperties); + //add context to list for this context + subContexts.add(subContextConfig); + } + //Context configuration properties as securityContextProperty. entries + // Format is: + // securityContextProperty.. + // cannot contain . + else if (securityPropName.startsWith(contextConfigPropertyPrefix) && + securityPropName.length() > contextConfigPropertyPrefix.length() && + securityPropName.indexOf(".", contextConfigPropertyPrefix.length() + 1) < 0) { + + final String propValue = securtiyProperties.getProperty(securityPropName); + final String propName = securityPropName.substring(contextConfigPropertyPrefix.length() + 1); + + contextConfig.contextProperties.setProperty(propName, propValue); + } + } + + //Set the sub contexts into this context + contextConfig.subConfigs = (ContextConfiguration[])subContexts.toArray(new ContextConfiguration[subContexts.size()]); + + return contextConfig; + } } class BaseContextConfiguration { - final ContextConfiguration rootConfig = new ContextConfiguration(); - ContextConfiguration[] subConfigs = null; + ContextConfiguration rootConfig = null; boolean initialized = false; } class ContextConfiguration { ISecurityContextFactory contextFactory = null; String contextName = null; - Properties contextProperties = new Properties(); + final Properties contextProperties = new Properties(); + ContextConfiguration[] subConfigs = null; } \ No newline at end of file diff --git a/source/org/jasig/portal/security/provider/CacheSecurityContext.java b/source/org/jasig/portal/security/provider/CacheSecurityContext.java index ae38d368d99..4e71108583c 100644 --- a/source/org/jasig/portal/security/provider/CacheSecurityContext.java +++ b/source/org/jasig/portal/security/provider/CacheSecurityContext.java @@ -112,7 +112,7 @@ public synchronized void authenticate() throws PortalSecurityException { log.info( "No such user: " + this.myPrincipal.UID); } catch (Exception e) { PortalSecurityException ep = new PortalSecurityException("SQL Database Error"); - log.error( ep); + log.error( "SQL database error", e); throw (ep); } } diff --git a/source/org/jasig/portal/security/provider/ChainingSecurityContext.java b/source/org/jasig/portal/security/provider/ChainingSecurityContext.java index 4dd12b56a82..e8344992649 100644 --- a/source/org/jasig/portal/security/provider/ChainingSecurityContext.java +++ b/source/org/jasig/portal/security/provider/ChainingSecurityContext.java @@ -111,7 +111,7 @@ public synchronized void authenticate() throws PortalSecurityException { sctx.authenticate(); } catch (Exception ex) { error = true; - log.error( ex); + log.error("Exception authenticating subcontext " + sctx, ex); } // Stop attempting to authenticate if authenticated and if the property flag is set if(stopWhenAuthenticated && sctx.isAuthenticated()) { @@ -164,7 +164,7 @@ public synchronized ISecurityContext getSubContext(String name) { } } PortalSecurityException ep = new PortalSecurityException("No such subcontext: " + name); - log.debug(ep); + log.debug("No such subcontext as " + name, ep); return(null); } @@ -206,7 +206,7 @@ public synchronized void addSubContext(String name, ISecurityContext ctx) if(doesSubContextExist(name)) { PortalSecurityException ep = new PortalSecurityException("Subcontext already exists: " + name); - log.error(ep); + log.error("Subcontext already exists:" + name, ep); throw(ep); } else diff --git a/source/org/jasig/portal/security/provider/RDBMPermissionImpl.java b/source/org/jasig/portal/security/provider/RDBMPermissionImpl.java index e366b347f46..671f505167c 100644 --- a/source/org/jasig/portal/security/provider/RDBMPermissionImpl.java +++ b/source/org/jasig/portal/security/provider/RDBMPermissionImpl.java @@ -109,7 +109,7 @@ public void add(IPermission[] perms) throws AuthorizationException } catch (Exception ex) { - log.error( ex); + log.error("Exception adding permissions " + perms, ex); throw new AuthorizationException(ex.getMessage()); } } @@ -143,7 +143,7 @@ public void add(IPermission perm) throws AuthorizationException } catch (Exception ex) { - log.error( ex.getMessage()); + log.error("Exception adding permission [" + perm + "]", ex); throw new AuthorizationException("Problem adding Permission " + perm); } finally @@ -164,7 +164,7 @@ public void delete(IPermission[] perms) throws AuthorizationException } catch (Exception ex) { - log.error( ex); + log.error("Exception deleting permissions " + perms, ex); throw new AuthorizationException(ex.getMessage()); } } @@ -190,7 +190,7 @@ public void delete(IPermission perm) throws AuthorizationException } catch (Exception ex) { - log.error( ex.getMessage()); + log.error("Exception deleting permission [" + perm + "]", ex); throw new AuthorizationException("Problem deleting Permission " + perm); } finally @@ -230,7 +230,8 @@ public boolean existsInDatabase(IPermission perm) throws AuthorizationException, } catch (Exception ex) { - log.error( ex); + log.error("Exception determining whether " + + "permission [" + perm + "] exists in database.", ex); throw new AuthorizationException("RDBMPermissionImpl.existsInDatabase(): " + ex); } finally @@ -493,7 +494,7 @@ private void primAdd(IPermission[] perms) throws Exception } catch (Exception ex) { - log.error( ex); + log.error("Exception adding permissions " + perms, ex); RDBMServices.rollback(conn); throw ex; } @@ -573,7 +574,7 @@ private void primDelete(IPermission[] perms) throws Exception } catch (Exception ex) { - log.error( ex); + log.error("Exception deleting permissions [" + perms + "]", ex); RDBMServices.rollback(conn); throw ex; } @@ -633,7 +634,7 @@ private void primUpdate(IPermission[] perms) throws Exception } catch (Exception ex) { - log.error( ex); + log.error("Exception updating permissions " + perms, ex); RDBMServices.rollback(conn); throw ex; } @@ -789,7 +790,7 @@ private int primUpdate(IPermission perm, RDBMServices.PreparedStatement ps) thro } catch (SQLException sqle) { - log.error( sqle); + log.error("Problem retrieving permissions", sqle); throw new AuthorizationException("Problem retrieving Permissions " + sqle.getMessage()); } finally @@ -821,7 +822,7 @@ public void update(IPermission[] perms) throws AuthorizationException } catch (Exception ex) { - log.error( ex); + log.error("Exception updating permissions " + perms, ex); throw new AuthorizationException(ex.getMessage()); } } @@ -848,7 +849,7 @@ public void update(IPermission perm) throws AuthorizationException } catch (Exception ex) { - log.error( ex.getMessage()); + log.error("Exception updating permission [" + perm + "]", ex); throw new AuthorizationException("Problem updating Permission " + perm); } finally diff --git a/source/org/jasig/portal/security/provider/RemoteUserPersonManager.java b/source/org/jasig/portal/security/provider/RemoteUserPersonManager.java index a93a98b3795..d1306d31898 100644 --- a/source/org/jasig/portal/security/provider/RemoteUserPersonManager.java +++ b/source/org/jasig/portal/security/provider/RemoteUserPersonManager.java @@ -85,7 +85,7 @@ public IPerson getPerson(HttpServletRequest request) } catch (Exception e) { // Log the exception - log.error( e); + log.error("Exception creating person for request " + request, e); } // Add this person object to the user's session request.getSession(false).setAttribute(PERSON_SESSION_KEY, person); diff --git a/source/org/jasig/portal/security/provider/SimpleLdapSecurityContext.java b/source/org/jasig/portal/security/provider/SimpleLdapSecurityContext.java index 0979c389d1b..ea848be4458 100644 --- a/source/org/jasig/portal/security/provider/SimpleLdapSecurityContext.java +++ b/source/org/jasig/portal/security/provider/SimpleLdapSecurityContext.java @@ -159,63 +159,68 @@ public synchronized void authenticate () throws PortalSecurityException { searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE); // do lookup - try { - results = conn.search(ldapConn.getBaseDN(), user.toString(), searchCtls); - if (results != null) { - if (!results.hasMore()) - log.error( - "SimpleLdapSecurityContext: user not found , " + - this.myPrincipal.UID); - Vector entries = new Vector(); - while (results != null && results.hasMore()) { - SearchResult entry = (SearchResult)results.next(); - StringBuffer dnBuffer = new StringBuffer(); - dnBuffer.append(entry.getName()).append(", "); - dnBuffer.append(ldapConn.getBaseDN()); - Attributes attrs = entry.getAttributes(); - first_name = getAttributeValue(attrs, ATTR_FIRSTNAME); - last_name = getAttributeValue(attrs, ATTR_LASTNAME); - // re-bind as user - conn.removeFromEnvironment(javax.naming.Context.SECURITY_PRINCIPAL); - conn.removeFromEnvironment(javax.naming.Context.SECURITY_CREDENTIALS); - conn.addToEnvironment(javax.naming.Context.SECURITY_PRINCIPAL, dnBuffer.toString()); - conn.addToEnvironment(javax.naming.Context.SECURITY_CREDENTIALS, this.myOpaqueCredentials.credentialstring); - searchCtls = new SearchControls(); - searchCtls.setReturningAttributes(new String[0]); - searchCtls.setSearchScope(SearchControls.OBJECT_SCOPE); - - String attrSearch = "(" + ldapConn.getUidAttribute() + "=*)"; - log.debug( - "SimpleLdapSecurityContext: Looking in " + - dnBuffer.toString() + " for " + attrSearch); - conn.search(dnBuffer.toString(), attrSearch, searchCtls); - - this.isauth = true; - this.myPrincipal.FullName = first_name + " " + last_name; - log.debug( - "SimpleLdapSecurityContext: User " + - this.myPrincipal.UID + " (" + - this.myPrincipal.FullName + ") is authenticated"); + if (conn != null) { + try { + results = conn.search(ldapConn.getBaseDN(), user.toString(), searchCtls); + if (results != null) { + if (!results.hasMore()) + log.error( + "SimpleLdapSecurityContext: user not found , " + + this.myPrincipal.UID); + Vector entries = new Vector(); + while (results != null && results.hasMore()) { + SearchResult entry = (SearchResult)results.next(); + StringBuffer dnBuffer = new StringBuffer(); + dnBuffer.append(entry.getName()).append(", "); + dnBuffer.append(ldapConn.getBaseDN()); + Attributes attrs = entry.getAttributes(); + first_name = getAttributeValue(attrs, ATTR_FIRSTNAME); + last_name = getAttributeValue(attrs, ATTR_LASTNAME); + // re-bind as user + conn.removeFromEnvironment(javax.naming.Context.SECURITY_PRINCIPAL); + conn.removeFromEnvironment(javax.naming.Context.SECURITY_CREDENTIALS); + conn.addToEnvironment(javax.naming.Context.SECURITY_PRINCIPAL, dnBuffer.toString()); + conn.addToEnvironment(javax.naming.Context.SECURITY_CREDENTIALS, this.myOpaqueCredentials.credentialstring); + searchCtls = new SearchControls(); + searchCtls.setReturningAttributes(new String[0]); + searchCtls.setSearchScope(SearchControls.OBJECT_SCOPE); + + String attrSearch = "(" + ldapConn.getUidAttribute() + "=*)"; + log.debug( + "SimpleLdapSecurityContext: Looking in " + + dnBuffer.toString() + " for " + attrSearch); + conn.search(dnBuffer.toString(), attrSearch, searchCtls); + + this.isauth = true; + this.myPrincipal.FullName = first_name + " " + last_name; + log.debug( + "SimpleLdapSecurityContext: User " + + this.myPrincipal.UID + " (" + + this.myPrincipal.FullName + ") is authenticated"); - // Since LDAP is case-insensitive with respect to uid, force - // user name to lower case for use by the portal - this.myPrincipal.UID = this.myPrincipal.UID.toLowerCase(); - } // while (results != null && results.hasMore()) - } - else { - log.error( - "SimpleLdapSecurityContext: No such user: " + - this.myPrincipal.UID); - } - } catch (AuthenticationException ae) { - log.info("SimpleLdapSecurityContext: Password invalid for user: " + this.myPrincipal.UID); - } catch (Exception e) { - log.error( - "SimpleLdapSecurityContext: LDAP Error with user: " + - this.myPrincipal.UID + "; " + e); - throw new PortalSecurityException("SimpleLdapSecurityContext: LDAP Error" + e + " with user: " + this.myPrincipal.UID); - } finally { - ldapConn.releaseConnection(conn); + // Since LDAP is case-insensitive with respect to uid, force + // user name to lower case for use by the portal + this.myPrincipal.UID = this.myPrincipal.UID.toLowerCase(); + } // while (results != null && results.hasMore()) + } + else { + log.error( + "SimpleLdapSecurityContext: No such user: " + + this.myPrincipal.UID); + } + } catch (AuthenticationException ae) { + log.info("SimpleLdapSecurityContext: Password invalid for user: " + this.myPrincipal.UID); + } catch (Exception e) { + log.error( + "SimpleLdapSecurityContext: LDAP Error with user: " + + this.myPrincipal.UID + "; ", e); + throw new PortalSecurityException("SimpleLdapSecurityContext: LDAP Error" + e + " with user: " + this.myPrincipal.UID); + } finally { + ldapConn.releaseConnection(conn); + } + } + else { + log.error("LDAP Server Connection unavalable"); } } else { diff --git a/source/org/jasig/portal/security/provider/SimplePersonManager.java b/source/org/jasig/portal/security/provider/SimplePersonManager.java index e89b7ef0184..1b1443ca098 100644 --- a/source/org/jasig/portal/security/provider/SimplePersonManager.java +++ b/source/org/jasig/portal/security/provider/SimplePersonManager.java @@ -70,7 +70,7 @@ public IPerson getPerson (HttpServletRequest request) throws PortalSecurityExcep person = PersonFactory.createGuestPerson(); } catch (Exception e) { // Log the exception - log.error( e); + log.error("Exception creating guest person.", e); } // Add this person object to the user's session if (person != null && session != null) diff --git a/source/org/jasig/portal/security/provider/SimpleSecurityContext.java b/source/org/jasig/portal/security/provider/SimpleSecurityContext.java index c9c80810ee5..35c03373438 100644 --- a/source/org/jasig/portal/security/provider/SimpleSecurityContext.java +++ b/source/org/jasig/portal/security/provider/SimpleSecurityContext.java @@ -114,7 +114,7 @@ public synchronized void authenticate() throws PortalSecurityException { } } catch (Exception e) { PortalSecurityException ep = new PortalSecurityException("SQL Database Error"); - log.error( e); + log.error("Error authenticating user", e); throw (ep); } } diff --git a/source/org/jasig/portal/security/provider/TrustSecurityContext.java b/source/org/jasig/portal/security/provider/TrustSecurityContext.java index 4bdbc991981..51779b6a0d1 100644 --- a/source/org/jasig/portal/security/provider/TrustSecurityContext.java +++ b/source/org/jasig/portal/security/provider/TrustSecurityContext.java @@ -87,7 +87,7 @@ public synchronized void authenticate() throws PortalSecurityException { } } catch (Exception e) { PortalSecurityException ep = new PortalSecurityException("SQL Database Error"); - log.error( ep); + log.error(e,e); throw (ep); } } diff --git a/source/org/jasig/portal/serialize/HTMLSerializer.java b/source/org/jasig/portal/serialize/HTMLSerializer.java index ac393f8f8f4..0d1a3436e69 100644 --- a/source/org/jasig/portal/serialize/HTMLSerializer.java +++ b/source/org/jasig/portal/serialize/HTMLSerializer.java @@ -884,7 +884,7 @@ protected String appendAnchorIfNecessary(String elementName, String attributeNam // does it contain either an "href" or "action" attribute if (attributeName.equalsIgnoreCase("href") || attributeName.equalsIgnoreCase("action")) { // found the attribute, now lets make sure it points back to a channel - if (attributeValue.indexOf(".render.") != -1) { + if (attributeValue.indexOf(".render.") != -1 && attributeValue.indexOf("javascript:") == -1) { // this link points back to a channel, so let's // rewrite it and place back into the Attribute Object attributeValue += "#" + anchorId; diff --git a/source/org/jasig/portal/services/Authentication.java b/source/org/jasig/portal/services/Authentication.java index 8cd3dff3aa8..38c7e812118 100644 --- a/source/org/jasig/portal/services/Authentication.java +++ b/source/org/jasig/portal/services/Authentication.java @@ -70,6 +70,8 @@ public class Authentication { private static final Log log = LogFactory.getLog(Authentication.class); + private final static String BASE_CONTEXT_NAME = "root"; + protected org.jasig.portal.security.IPerson m_Person = null; protected ISecurityContext ic = null; @@ -84,26 +86,15 @@ public void authenticate (HashMap principals, HashMap credentials, IPerson perso // Retrieve the security context for the user ISecurityContext securityContext = person.getSecurityContext(); - Enumeration subCtxNames = securityContext.getSubContextNames(); + + //Set the principals and credentials for the security context chain + this.configureSecurityContextChain(principals, credentials, person, securityContext, BASE_CONTEXT_NAME); + // NOTE: The LoginServlet looks in the security.properties file to // determine what tokens to look for that represent the principals and // credentials for each context. It then retrieves the values from the request // and stores the values in the principals and credentials HashMaps that are // passed to the Authentication service. - // Set the principals and credentials for the root context first. - setContextParameters (principals, credentials, "root", securityContext, person); - - // load principals and credentials for the subContexts - while (subCtxNames.hasMoreElements()) { - String subCtxName = (String)subCtxNames.nextElement(); - // root context is handled above - if (!subCtxName.equals("root")){ - // strip off "root." part of name - String subCtxNameWithoutPrefix = (subCtxName.startsWith("root.") ? subCtxName.substring(5) : subCtxName); - ISecurityContext sc = securityContext.getSubContext(subCtxNameWithoutPrefix); - setContextParameters (principals, credentials, subCtxName, sc, person); - } - } // Attempt to authenticate the user securityContext.authenticate(); @@ -195,6 +186,8 @@ else if (person.getAttribute("displayName") != null) { throw new PortalSecurityException("Authentication Service: Exception retrieving UID"); } + PersonDirectory.persons.put(person.getAttribute(IPerson.USERNAME), person); + // Record the successful authentication StatsRecorder.recordLogin(person); } @@ -238,8 +231,8 @@ public void setContextParameters (HashMap principals, HashMap credentials, Strin String credential = (String)credentials.get(ctxName); // If username or credential are null, this indicates that the token was not // set in security properties. We will then use the value for root. - username = (username != null ? username : (String)principals.get("root")); - credential = (credential != null ? credential : (String)credentials.get("root")); + username = (username != null ? username : (String)principals.get(BASE_CONTEXT_NAME)); + credential = (credential != null ? credential : (String)credentials.get(BASE_CONTEXT_NAME)); log.debug("Authentication::setContextParameters() username: " + username); // Retrieve and populate an instance of the principal object IPrincipal principalInstance = securityContext.getPrincipalInstance(); @@ -250,4 +243,35 @@ public void setContextParameters (HashMap principals, HashMap credentials, Strin IOpaqueCredentials credentialsInstance = securityContext.getOpaqueCredentialsInstance(); credentialsInstance.setCredentials(credential); } + + /** + * Recureses through the {@link ISecurityContext} chain, setting the credentials + * for each. + * TODO This functionality should be moved into the {@link org.jasig.portal.security.provider.ChainingSecurityContext}. + * + * @param principals + * @param credentials + * @param person + * @param securityContext + * @param BASE_CONTEXT_NAME + * @throws PortalSecurityException + */ + private void configureSecurityContextChain(final HashMap principals, final HashMap credentials, final IPerson person, final ISecurityContext securityContext, final String baseContextName) throws PortalSecurityException { + this.setContextParameters (principals, credentials, baseContextName, securityContext, person); + + // load principals and credentials for the subContexts + for (final Enumeration subCtxNames = securityContext.getSubContextNames(); subCtxNames.hasMoreElements(); ) { + final String fullSubCtxName = (String)subCtxNames.nextElement(); + + //Strip off the base of the name + String localSubCtxName = fullSubCtxName; + if (fullSubCtxName.startsWith(baseContextName + ".")) { + localSubCtxName = localSubCtxName.substring(baseContextName.length() + 1); + } + + final ISecurityContext sc = securityContext.getSubContext(localSubCtxName); + + this.configureSecurityContextChain(principals, credentials, person, sc, fullSubCtxName); + } + } } diff --git a/source/org/jasig/portal/services/AuthorizationService.java b/source/org/jasig/portal/services/AuthorizationService.java index aa64991a510..72f3636bd99 100644 --- a/source/org/jasig/portal/services/AuthorizationService.java +++ b/source/org/jasig/portal/services/AuthorizationService.java @@ -76,24 +76,23 @@ public class AuthorizationService secprops.close(); // Look for our authorization factory and instantiate an instance of it or die trying. if ((s_factoryName = pr.getProperty("authorizationProvider")) == null) { - log.error( new PortalSecurityException("AuthorizationProvider not specified or incorrect in security.properties")); + log.error("AuthorizationProvider not specified or incorrect in security.properties", new PortalSecurityException("AuthorizationProvider not specified or incorrect in security.properties")); } else { try { m_Factory = (IAuthorizationServiceFactory)Class.forName(s_factoryName).newInstance(); } catch (Exception e) { - log.error( new PortalSecurityException("Failed to instantiate " + s_factoryName)); + log.error("Failed to instantiate " + s_factoryName, new PortalSecurityException("Failed to instantiate " + s_factoryName)); } } } catch (IOException e) { - log.error( new PortalSecurityException(e.getMessage())); + log.error("Error loading security properties", e); } finally { try { if (secprops != null) secprops.close(); } catch (IOException ioe) { - log.error( new PortalSecurityException( - ioe.getMessage())); + log.error("Error closing security properties file.", ioe); } } } diff --git a/source/org/jasig/portal/services/EntityPropertyRegistry.java b/source/org/jasig/portal/services/EntityPropertyRegistry.java index 40e650a7456..c8324dd946c 100644 --- a/source/org/jasig/portal/services/EntityPropertyRegistry.java +++ b/source/org/jasig/portal/services/EntityPropertyRegistry.java @@ -118,8 +118,7 @@ public synchronized static EntityPropertyRegistry instance() { _instance.init(); } catch (Exception e) { _instance = null; - log.error( "Could not initialize EntityPropertyRegistry"); - log.error( e); + log.error( "Could not initialize EntityPropertyRegistry", e); } } return _instance; @@ -178,10 +177,10 @@ public void clearCache(EntityIdentifier entityID) { try { EntityCachingService.instance().remove(propsType, getPropKey(entityID)); } catch (CachingException e) { - log.error( e); + log.error("Error clearing cache for entity ID [" + entityID + "]", e); Exception ee = e.getRecordedException(); if (ee != null) { - log.error( ee); + log.error(ee, ee); } } } @@ -190,10 +189,10 @@ public void addToCache(EntityProperties ep) { try { EntityCachingService.instance().add(ep); } catch (CachingException e) { - log.error( e); + log.error("Error adding entity properties [" + ep + "] to the cache", e); Exception ee = e.getRecordedException(); if (ee != null) { - log.error( ee); + log.error(ee, ee); } } } @@ -204,10 +203,10 @@ public EntityProperties getCachedProperties(EntityIdentifier entityID) { ep = (EntityProperties) EntityCachingService.instance().get(propsType, entityID.getKey()); } catch (CachingException e) { - log.error( e); + log.error("Error getting cached properties for entity [" + entityID + "]", e); Exception ee = e.getRecordedException(); if (ee != null) { - log.error( ee); + log.error(ee, ee); } } return ep; diff --git a/source/org/jasig/portal/services/ExternalServices.java b/source/org/jasig/portal/services/ExternalServices.java index b05908b93b6..d38f8f40c27 100644 --- a/source/org/jasig/portal/services/ExternalServices.java +++ b/source/org/jasig/portal/services/ExternalServices.java @@ -180,28 +180,28 @@ public static Class getClassObject (String className) throws Exception { } class ServiceItem { - String name; - String javaClass; - String jndiName; - String startMethod; - String methodType; + StringBuffer name = new StringBuffer(""); + StringBuffer javaClass = new StringBuffer(""); + StringBuffer jndiName = new StringBuffer(""); + StringBuffer startMethod = new StringBuffer(""); + StringBuffer methodType = new StringBuffer(""); List argList; - public void setName (String svcName) { name = svcName; } - public String getName () { return name; } + public void setName (String svcName) { name.append(svcName); } + public String getName () { return name.toString(); } - public void setJavaClass (String svcClass) { javaClass = svcClass; } - public String getJavaClass () { return javaClass; } + public void setJavaClass (String svcClass) { javaClass.append(svcClass); } + public String getJavaClass () { return javaClass.toString(); } - public void setStartMethod (String methodName) { startMethod = methodName; } - public String getStartMethod () { return startMethod; } + public void setStartMethod (String methodName) { startMethod.append(methodName); } + public String getStartMethod () { return startMethod.toString(); } - public void setJndiName (String name) { this.jndiName = name; } - public String getJndiName () { return jndiName; } + public void setJndiName (String name) { this.jndiName.append(name); } + public String getJndiName () { return jndiName.toString(); } - public void setMethodType(String type) { methodType = type; } + public void setMethodType(String type) { methodType.append(type); } - public boolean isStatic() { return !(methodType == null); } + public boolean isStatic() { return (methodType.length() > 0); } public void addArgument (Argument argItem) { if (argList == null) @@ -353,7 +353,7 @@ public void endElement (String namespaceURI, String localName, String qName) { Object returnObject=null; // check if any method is specified - if(svcItem.getStartMethod()!=null) { + if(svcItem.getStartMethod().length() > 0) { Method startMethod = svcClass.getMethod(svcItem.getStartMethod(), classNames); if(Modifier.isStatic(startMethod.getModifiers())) { // no need to instantiate an object @@ -367,7 +367,7 @@ public void endElement (String namespaceURI, String localName, String qName) { } // check if jndi binding needed - if(svcItem.getJndiName()!=null) { + if(svcItem.getJndiName().length() > 0) { if(returnObject!=null) { // a non-void method was specified // in the service description, bind diff --git a/source/org/jasig/portal/services/GroupService.java b/source/org/jasig/portal/services/GroupService.java index 1d6a5545892..7bf4237e6b2 100644 --- a/source/org/jasig/portal/services/GroupService.java +++ b/source/org/jasig/portal/services/GroupService.java @@ -120,7 +120,7 @@ public static void finishedSession(IPerson person) try { instance().ifinishedSession(person); } catch (GroupsException ge) - { log.error( ge); } + { log.error("Error upon session finishing for person [" + person + "]", ge); } } /* * Returns the ICompositeGroupService implementation in use. diff --git a/source/org/jasig/portal/services/LogService.java b/source/org/jasig/portal/services/LogService.java index 0fff06ffc0e..4b8e0afab40 100644 --- a/source/org/jasig/portal/services/LogService.java +++ b/source/org/jasig/portal/services/LogService.java @@ -124,25 +124,30 @@ public final static void log (Priority pLogLevel, String sMessage) { } + /** + * Log the given throwable at the given priority. + * @param pLogLevel - logging level + * @param ex - throwable to be logged + */ public final static void log (Priority pLogLevel, Throwable ex) { initialize(); if (pLogLevel == null){ - log.fatal(ex); + log.fatal(ex, ex); } else if (pLogLevel.equals(SEVERE)){ - log.fatal(ex); + log.fatal(ex, ex); } else if (pLogLevel.equals(ERROR)){ - log.error(ex); + log.error(ex, ex); } else if (pLogLevel.equals(WARN)){ - log.warn(ex); + log.warn(ex, ex); } else if (pLogLevel.equals(INFO)){ - log.info(ex); + log.info(ex, ex); } else if (pLogLevel.equals(DEBUG)){ - log.debug(ex); + log.debug(ex, ex); } else if (pLogLevel.equals(NONE)){ - log.debug(ex); + log.debug(ex, ex); } else { // should never get here - log.fatal(ex); + log.fatal("Unrecognized logging level " + pLogLevel, ex); } } diff --git a/source/org/jasig/portal/services/PersonDirectory.java b/source/org/jasig/portal/services/PersonDirectory.java index e532d85f17a..c8ecee30e99 100644 --- a/source/org/jasig/portal/services/PersonDirectory.java +++ b/source/org/jasig/portal/services/PersonDirectory.java @@ -331,120 +331,145 @@ public void getUserDirectoryInformation(String uid, IPerson m_Person) { */ void processLdapDir(String username, PersonDirInfo pdi, Hashtable attribs) { - Hashtable jndienv = new Hashtable(); - DirContext context = null; - ILdapServer srvr = null; - boolean fromLdapServices = false; + Hashtable jndienv = new Hashtable(); + DirContext context = null; + ILdapServer srvr = null; + boolean fromLdapServices = false; - //Check for a named ldap reference - if (pdi.LdapRefName!=null && pdi.LdapRefName.length()>0) { - //Get a ILdapServer info interface from LdapServices - srvr = LdapServices.getLdapServer(pdi.LdapRefName); - - if (srvr != null) { - context = srvr.getConnection(); - fromLdapServices = true; - } - - log.debug("PersonDirectory::processLdapDir(): Looking in "+pdi.LdapRefName+ - " for person attributes of "+username); - } - - //Either no named ldap reference specified or it wasn't found - if (context == null) { - //JNDI boilerplate to connect to an initial context - jndienv.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory"); - jndienv.put(Context.SECURITY_AUTHENTICATION,"simple"); - if (pdi.url.startsWith("ldaps")) { // Handle SSL connections - String newurl=pdi.url.substring(0,4) + pdi.url.substring(5); - jndienv.put(Context.SECURITY_PROTOCOL,"ssl"); - jndienv.put(Context.PROVIDER_URL,newurl); - } - else { - jndienv.put(Context.PROVIDER_URL,pdi.url); - } - if (pdi.logonid!=null) - jndienv.put(Context.SECURITY_PRINCIPAL,pdi.logonid); - if (pdi.logonpassword!=null) - jndienv.put(Context.SECURITY_CREDENTIALS,pdi.logonpassword); try { - context = new InitialDirContext(jndienv); - } catch (NamingException nex) { - return; - } - } + //Check for a named ldap reference + if (pdi.LdapRefName != null && pdi.LdapRefName.length() > 0) { + //Get a ILdapServer info interface from LdapServices + srvr = LdapServices.getLdapServer(pdi.LdapRefName); - // Search for the userid in the usercontext subtree of the directory - // Use the uidquery substituting username for {0} - NamingEnumeration userlist = null; - SearchControls sc = new SearchControls(); - sc.setSearchScope(SearchControls.SUBTREE_SCOPE); - sc.setTimeLimit(pdi.ldaptimelimit); - Object [] args = new Object[] {username}; - try { - String userCtx = pdi.usercontext; - - //ILdapServer instances have no DN in the connect string - //Append the baseDN for the server here. - if (fromLdapServices) { - userCtx = userCtx + "," + srvr.getBaseDN(); - } - - userlist = context.search(userCtx,pdi.uidquery,args,sc); - } catch (NamingException nex) { - return; - } + if (srvr != null) { + context = srvr.getConnection(); + fromLdapServices = true; + } - // If one object matched, extract properties from the attribute list - try { - if (userlist.hasMoreElements()) { - SearchResult result = (SearchResult) userlist.next(); - Attributes ldapattribs = result.getAttributes(); - for (int i=0;i 0) { + userCtx = baseDN; + } + } + + if (context != null) { + userlist = context.search(userCtx, pdi.uidquery, args, sc); + } + } catch (NamingException nex) { + return; + } + + // If one object matched, extract properties from the attribute + // list + try { + if (userlist != null && userlist.hasMoreElements()) { + SearchResult result = (SearchResult) userlist.next(); + Attributes ldapattribs = result.getAttributes(); + for (int i = 0; i < pdi.attributenames.length; i++) { + Attribute tattrib = null; + if (pdi.attributenames[i] != null) + tattrib = ldapattribs.get(pdi.attributenames[i]); + if (tattrib != null) { + // determine if this attribute is a String or a + // binary (byte array) + if (tattrib.size() == 1) { + Object att = tattrib.get(); + if (att instanceof byte[]) { + attribs.put(pdi.attributealiases[i], (Object) att); + } else { + String value = att.toString(); + attribs.put(pdi.attributealiases[i], value); + } + } else { + // multivalued + Vector values = new Vector(); + for (NamingEnumeration ne = tattrib.getAll(); ne.hasMoreElements();) { + Object value = ne.nextElement(); + if (value instanceof byte[]) { + values.add(value); + } else { + values.add(value.toString()); + } + } + attribs.put(pdi.attributealiases[i], values); + } + } + } + } + } catch (NamingException ne) { + if (log.isErrorEnabled()) { + log.error("Unable to extract properties from attribute list", ne); + } } + } finally { + try { + if (userlist != null) { + userlist.close(); + } + } catch (NamingException ne) { + if (log.isErrorEnabled()) { + log.error("Unable to close the user list", ne); + } + } + } + } finally { + if (fromLdapServices && srvr != null) { + srvr.releaseConnection(context); } else { - // multivalued - Vector values = new Vector(); - for (NamingEnumeration ne = tattrib.getAll(); ne.hasMoreElements(); ) { - Object value = ne.nextElement(); - if (value instanceof byte[]) { - values.add(value); - } else { - values.add(value.toString()); + try { + if (context != null) { + context.close(); + } + } catch (NamingException ne) { + if (log.isErrorEnabled()) { + log.error("Unable to close the context", ne); } } - attribs.put(pdi.attributealiases[i], values); } - } } - } - } catch (NamingException nex) { - ; } - try {userlist.close();} catch (Exception e) {;} - - if (srvr != null && fromLdapServices) { - srvr.releaseConnection(context); - } - else { - try {context.close();} catch (Exception e) {;} - } - - } - /** * Extract data from a JDBC database */ @@ -558,7 +583,8 @@ public static RestrictedPerson getRestrictedPerson(String uid) { try { person.setID(UserIdentityStoreFactory.getUserIdentityStoreImpl().getPortalUID(person)); } catch (Exception e) { - log.error( e); + log.error("Exception setting ID for our " + + "restricted person for uid [" + uid + "]", e); } instance().getUserDirectoryInformation(uid, person); } diff --git a/source/org/jasig/portal/services/SequenceGenerator.java b/source/org/jasig/portal/services/SequenceGenerator.java index d5b70842970..d667cc6f166 100644 --- a/source/org/jasig/portal/services/SequenceGenerator.java +++ b/source/org/jasig/portal/services/SequenceGenerator.java @@ -24,7 +24,8 @@ public class SequenceGenerator // Look for our factory and instantiate an instance. if (s_factoryName == null) { - log.error( new PortalException + log.error("Sequence Provider not specified or incorrect in portal.properties", + new PortalException ("Sequence Provider not specified or incorrect in portal.properties")); } else @@ -35,7 +36,7 @@ public class SequenceGenerator } catch (Exception e) { - log.error( new PortalException + log.error( "Failed to instantiate " + s_factoryName, new PortalException ("Failed to instantiate " + s_factoryName)); } } diff --git a/source/org/jasig/portal/services/StatsRecorder.java b/source/org/jasig/portal/services/StatsRecorder.java index 4826c05940d..3b39788d262 100644 --- a/source/org/jasig/portal/services/StatsRecorder.java +++ b/source/org/jasig/portal/services/StatsRecorder.java @@ -118,7 +118,7 @@ private StatsRecorder() { int threadPriority = PropertiesManager.getPropertyAsInt(prefix + "threadPriority"); threadPool = new BoundedThreadPool(initialThreads, maxThreads, threadPriority); } catch (Exception e) { - log.error( e); + log.error("Error instantiating StatsRecorder", e); } } diff --git a/source/org/jasig/portal/services/entityproperties/ChannelRegistryPropertyFinder.java b/source/org/jasig/portal/services/entityproperties/ChannelRegistryPropertyFinder.java index ea7a20e498a..3d9f369013d 100644 --- a/source/org/jasig/portal/services/entityproperties/ChannelRegistryPropertyFinder.java +++ b/source/org/jasig/portal/services/entityproperties/ChannelRegistryPropertyFinder.java @@ -78,8 +78,7 @@ public static void init (){ try { chan = Class.forName("org.jasig.portal.ChannelDefinition"); } catch (Exception e) { - log.error( "ChannelRegistryPropertyFinder - static:"); - log.error( e); + log.error( "ChannelRegistryPropertyFinder - static:", e); } INITIALIZED = true; } @@ -118,8 +117,7 @@ public String getProperty(EntityIdentifier entityID, String name) { r = String.valueOf(cd.isSecure()); } } catch (Exception e) { - log.error( "ChannelRegistryPropertyFinder.getProperty("+entityID.getKey()+"-"+entityID.getType().getName()+","+name+") :"); - log.error( e); + log.error( "ChannelRegistryPropertyFinder.getProperty("+entityID.getKey()+"-"+entityID.getType().getName()+","+name+") :", e); } } return r; diff --git a/source/org/jasig/portal/services/entityproperties/ContainingGroupsFinder.java b/source/org/jasig/portal/services/entityproperties/ContainingGroupsFinder.java index 07b5cc84763..53412f120cb 100644 --- a/source/org/jasig/portal/services/entityproperties/ContainingGroupsFinder.java +++ b/source/org/jasig/portal/services/entityproperties/ContainingGroupsFinder.java @@ -82,7 +82,8 @@ public String getProperty(EntityIdentifier entityID, String name) { r = buf.toString(); } catch(Exception e){ - log.error(e); + log.error("Exception getting property " + + "entityId=" + entityID + " name=" + name, e); } return r; } diff --git a/source/org/jasig/portal/services/entityproperties/PersonDirPropertyFinder.java b/source/org/jasig/portal/services/entityproperties/PersonDirPropertyFinder.java index 82e77ceffca..be97cc8b27a 100644 --- a/source/org/jasig/portal/services/entityproperties/PersonDirPropertyFinder.java +++ b/source/org/jasig/portal/services/entityproperties/PersonDirPropertyFinder.java @@ -104,7 +104,7 @@ protected Hashtable getPropertiesHash(EntityIdentifier entityID) { try { ht = pd.getUserDirectoryInformation(entityID.getKey()); } catch (Exception e) { - log.error( e); + log.error("Error getting properties hash for entityID [" + entityID + "]", e); } cache.put(entityID.getKey(), ht); } diff --git a/source/org/jasig/portal/services/entityproperties/RDBMPropertyStore.java b/source/org/jasig/portal/services/entityproperties/RDBMPropertyStore.java index cf165fa9c53..acade7e250b 100644 --- a/source/org/jasig/portal/services/entityproperties/RDBMPropertyStore.java +++ b/source/org/jasig/portal/services/entityproperties/RDBMPropertyStore.java @@ -80,8 +80,7 @@ public RDBMPropertyStore() { propsType = Class.forName("org.jasig.portal.services.entityproperties.EntityProperties"); } } catch (Exception e) { - log.error( "RDBMPropertyStore.Constructor Unable to create propstype"); - log.error( e); + log.error( "RDBMPropertyStore.Constructor Unable to create propstype", e); } } @@ -122,8 +121,7 @@ public void storeProperty(EntityIdentifier entityID, String name, String value) clearCache(entityID); } catch (Exception e) { log.error( "RDBMPropertyStore.storeProperty " - + ps); - log.error( e); + + ps, e); } finally { this.releaseConnection(conn); } @@ -145,8 +143,7 @@ public void unStoreProperty(EntityIdentifier entityID, String name) { clearCache(entityID); } catch (Exception e) { log.error( "RDBMPropertyStore.unStoreProperty " - + ps); - log.error( e); + + ps, e); } finally { this.releaseConnection(conn); } @@ -180,8 +177,7 @@ protected EntityProperties getCachedProperties(EntityIdentifier entityID) { rs.close(); ps.close(); } catch (Exception e) { - log.error( "RDBMPropertyStore.getPropertyNames: " + ps); - log.error( e); + log.error( "RDBMPropertyStore.getPropertyNames: " + ps, e); } finally { this.releaseConnection(conn); } diff --git a/source/org/jasig/portal/services/stats/StatsRecorderSettings.java b/source/org/jasig/portal/services/stats/StatsRecorderSettings.java index 207f04cb99c..4146058cb27 100644 --- a/source/org/jasig/portal/services/stats/StatsRecorderSettings.java +++ b/source/org/jasig/portal/services/stats/StatsRecorderSettings.java @@ -124,7 +124,7 @@ private StatsRecorderSettings() { recordChannelTargeted = PropertiesManager.getPropertyAsBoolean(prefix + "recordChannelTargeted"); } catch (Exception e) { - log.error( e); + log.error("Error instantiating StatsRecorderSettings", e); } } diff --git a/source/org/jasig/portal/tools/dbloader/Configuration.java b/source/org/jasig/portal/tools/dbloader/Configuration.java index 64dac65bcb4..a6aeec561ab 100755 --- a/source/org/jasig/portal/tools/dbloader/Configuration.java +++ b/source/org/jasig/portal/tools/dbloader/Configuration.java @@ -1,37 +1,7 @@ -/** - * Copyright 2001 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. - * - */ +/* Copyright 2004 The JA-SIG Collaborative. All rights reserved. +* See license distributed with this file and +* available online at http://www.uportal.org/license.html +*/ package org.jasig.portal.tools.dbloader; @@ -43,6 +13,8 @@ import java.util.Iterator; import java.util.Map; +import org.apache.oro.text.perl.Perl5Util; + import org.jasig.portal.properties.PropertiesManager; import org.w3c.dom.Document; @@ -75,6 +47,9 @@ public class Configuration private String upgradeVersion; private int upgradeMajor; private int upgradeMinor; + + private String adminLocale; + private boolean localeAware; private String tablesUri; private String tablesXslUri; @@ -89,9 +64,13 @@ public class Configuration ///////// Accessor Methods ///////// + public void setLocaleAware(boolean localeAware) { this.localeAware = localeAware; } + public void setAdminLocale(String adminLocale) { this.adminLocale = adminLocale; } + public void setUpgradeVersion(String v) { this.upgradeVersion = v; } public String getUpgradeVersion() { return this.upgradeVersion; } public void setUpgradeMajor(int m) { this.upgradeMajor = m; } + public int getUpgradeMajor() { return this.upgradeMajor; } public void setUpgradeMinor(int m) { this.upgradeMinor = m; } public int getUpgradeMinor() { return this.upgradeMinor; } @@ -115,18 +94,29 @@ public class Configuration public void setConnection(Connection c){this.con=c;} public void setLog(PrintWriter w) {this.log=w;} - public boolean getDropTables() { return dropTables; } - public boolean getCreateTables() { return createTables; } + public boolean getDropTables() { return dropTables; } + public boolean getCreateTables() { return createTables; } public boolean getCreateScript() { return createScript; } - public boolean getPopulateTables() { return populateTables; } + public boolean getPopulateTables() { return populateTables; } public String getTablesUri() { return tablesUri; } - public String getTablesXslUri() { return tablesXslUri; } - public String getDataUri() { return dataUri; } - public String getDataXslUri() { return dataXslUri; } - public String getScriptFileName() { return scriptFileName; } - public String getStatementTerminator() { return statementTerminator; } - public ArrayList getDbTypeMappings() { return dbTypeMappings; } + public String getTablesXslUri() { return tablesXslUri; } + + public String getDataUri() { + String ret = dataUri; + if (localeAware == true && adminLocale != null) { + // Switch to replaceAll when we can rely on JDK 1.4 + // ret = ret.replaceAll("\\.xml", "_" + admin_locale + ".xml"); + Perl5Util perl5Util = new Perl5Util(); + ret = perl5Util.substitute("s/\\.xml/_" + adminLocale + ".xml" + "/g", ret); + } + return ret; + } + + public String getDataXslUri() { return dataXslUri; } + public String getScriptFileName() { return scriptFileName; } + public String getStatementTerminator() { return statementTerminator; } + public ArrayList getDbTypeMappings() { return dbTypeMappings; } public void setDropTables(String dropTables) { this.setDropTables(toBoolean(dropTables)); } public void setDropTables(boolean dropTables) { this.dropTables = dropTables; } @@ -136,14 +126,14 @@ public class Configuration public void setPopulateTables(String populateTables) { this.setPopulateTables(toBoolean(populateTables)); } public void setPopulateTables(boolean populateTables) { this.populateTables = populateTables; } public void setTablesUri(String tablesUri) { this.tablesUri = tablesUri; } - public void setTablesXslUri(String tablesXslUri) { this.tablesXslUri = tablesXslUri; } + public void setTablesXslUri(String tablesXslUri) { this.tablesXslUri = tablesXslUri; } public void setDataUri(String dataUri) { this.dataUri = dataUri; } - public void setDataXslUri(String dataXslUri) { this.dataXslUri = dataXslUri; } + public void setDataXslUri(String dataXslUri) { this.dataXslUri = dataXslUri; } public void setCreateScript(String createScript) { this.setCreateScript(toBoolean(createScript)); } public void setCreateScript(boolean createScript) { this.createScript = createScript; } - public void setScriptFileName(String scriptFileName) { this.scriptFileName = scriptFileName; } - public void setStatementTerminator(String statementTerminator) { this.statementTerminator = statementTerminator; } - public void addDbTypeMapping(DbTypeMapping dbTypeMapping) { dbTypeMappings.add(dbTypeMapping); } + public void setScriptFileName(String scriptFileName) { this.scriptFileName = scriptFileName; } + public void setStatementTerminator(String statementTerminator) { this.statementTerminator = statementTerminator; } + public void addDbTypeMapping(DbTypeMapping dbTypeMapping) { dbTypeMappings.add(dbTypeMapping); } public void setLocalTypeMap(Map m){this.localDbMetaTypeMap = m;} public Map getLocalTypeMap(){return this.localDbMetaTypeMap;} diff --git a/source/org/jasig/portal/tools/dbloader/DbLoader.java b/source/org/jasig/portal/tools/dbloader/DbLoader.java index 52340659ad8..30fb0aec719 100644 --- a/source/org/jasig/portal/tools/dbloader/DbLoader.java +++ b/source/org/jasig/portal/tools/dbloader/DbLoader.java @@ -1,36 +1,6 @@ -/** - * Copyright 2001 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. - * +/* Copyright 2004 The JA-SIG Collaborative. All rights reserved. + * See license distributed with this file and + * available online at http://www.uportal.org/license.html */ package org.jasig.portal.tools.dbloader; @@ -49,8 +19,6 @@ import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParserFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.jasig.portal.PortalException; import org.jasig.portal.RDBMServices; import org.jasig.portal.utils.XSLT; @@ -102,13 +70,12 @@ public class DbLoader { private Configuration config = null; - private static final Log log = LogFactory.getLog(DbLoader.class); public DbLoader(Configuration c) { this.config = c; } - + /** * Creates a default DbLoader with no configuration object installed. Before * DbLoader can work it must have a configuration object set. @@ -117,7 +84,7 @@ public DbLoader(Configuration c) public DbLoader() { } - + /** * Set the configuration object to govern DbLoader's behavior. * @param c @@ -126,7 +93,7 @@ public void setConfig(Configuration c) { this.config = c; } - + public static void main(String[] args) { Configuration config = new Configuration(); @@ -136,7 +103,7 @@ public static void main(String[] args) loadConfiguration(config); // read command line arguements to override properties in dbloader.xml readOverrides(config, args); - + // create the script file if indicated if (config.getCreateScript()) initScript(config); @@ -157,7 +124,7 @@ public static void main(String[] args) exit(config); } config.getLog().flush(); - + if (config.getScriptWriter() != null) config.getScriptWriter().flush(); } @@ -173,7 +140,7 @@ public void process() try { config.setConnection(RDBMServices.getConnection()); - + if (config.getConnection() == null) { config.getLog().println( @@ -184,7 +151,7 @@ public void process() long startTime = System.currentTimeMillis(); DbUtils.logDbInfo(config); - + if ( config.getDataURL() == null ) config.setDataURL(DbLoader.class.getResource(config.getDataUri())); @@ -192,13 +159,13 @@ public void process() // get tablesURL and dataURL here if ( config.getTablesURL() == null) config.setTablesURL(DbLoader.class.getResource(config.getTablesUri())); - + config.getLog().println("Getting tables from: "+config.getTablesURL()); config.getLog().println("Getting data from: "+config.getDataURL()); DocumentBuilder domParser = null; - // get a dom parser for handling tables.xml and/or indexes.xml + // get a dom parser for handling tables.xml and/or indexes.xml try { // Read tables.xml @@ -254,6 +221,12 @@ public void process() xslt.setXML(config.getTablesDoc()); xslt.setXSL(config.getTablesXslUri()); xslt.setTarget(new TableHandler(config)); + + if (config.getUpgradeVersion() != null) { + xslt.setStylesheetParameter("upgradeMajor", Integer.toString(config.getUpgradeMajor())); + xslt.setStylesheetParameter("upgradeMinor", Integer.toString(config.getUpgradeMinor())); + } + xslt.transform(); } else @@ -262,7 +235,7 @@ public void process() config.getLog().println("Dropping tables and Creating tables...Disabled"); config.getLog().println(); } - + // populate tables if indiicated // data.xml --> INSERT sql statements @@ -278,7 +251,7 @@ public void process() else config.getLog().println("Populating tables...disabled."); - // cleanup and exit + // cleanup and exit config.getConnection().commit(); config.getLog().println("Done!"); long endTime = System.currentTimeMillis(); @@ -288,9 +261,9 @@ public void process() finally { RDBMServices.releaseConnection(config.getConnection()); - } + } } - + public static void loadConfiguration(Configuration config) throws ParserConfigurationException, SAXException, IOException { @@ -304,7 +277,7 @@ public static void loadConfiguration(Configuration config) handler.properties.getLog().print("Parsing " + handler.properties.getPropertiesURL() + "..."); parser.parse(new InputSource(handler.properties.getPropertiesURL().openStream())); } - + /** * @param config */ @@ -314,9 +287,13 @@ private static void readOverrides(Configuration config, String[] args) boolean usetable = false; boolean useDataUri = false; boolean useDataFile = false; + boolean useLocale = false; + boolean upgrade = false; + + String adminLocale = null; + String upgradeVersion = null; for (int i = 0; i < args.length; i++) { - //System.out.println("args["+i+"]: "+args[i]); if (!args[i].startsWith("-")) { if (usetable) { config.setTablesUri(args[i]); @@ -326,11 +303,28 @@ private static void readOverrides(Configuration config, String[] args) config.setDataURL(DbLoader.class.getResource(config.getDataUri())); useDataUri=false; } else if (useDataFile) { - URL url = getDataFileUri(args[i]); + URL url = getDataFileUri(args[i]); config.setDataUri(url.toString()); config.setDataURL(url); useDataFile=false; + } else if (useLocale) { + adminLocale = args[i]; + config.setAdminLocale(adminLocale); + useLocale = false; + } else if (upgrade) { + upgradeVersion = args[i]; + config.setUpgradeVersion(upgradeVersion); + int index = upgradeVersion.indexOf('.'); + config.setUpgradeMajor(Integer.parseInt(upgradeVersion.substring(0, index))); + if (upgradeVersion.indexOf('.', index+1) != -1) { + config.setUpgradeMinor(Integer.parseInt(upgradeVersion.substring(index+1, upgradeVersion.indexOf('.', index+1)))); + } else { + config.setUpgradeMinor(Integer.parseInt(upgradeVersion.substring(index+1))); + } + upgrade = false; } + } else if (args[i].equals("-u")) { + upgrade = true; } else if (args[i].equals("-t")) { usetable = true; } else if (args[i].equals("-d")) { @@ -353,7 +347,9 @@ private static void readOverrides(Configuration config, String[] args) config.setPopulateTables(true); } else if (args[i].equals("-nP")) { config.setPopulateTables(false); - } else { + } else if (args[i].equals("-l")) { + config.setLocaleAware(true); + useLocale = true; } } } @@ -402,6 +398,7 @@ private static void initScript(Configuration config) throws java.io.IOException config.setScriptWriter(new PrintWriter(new BufferedWriter(new FileWriter(scriptFileName, true)))); } + static void exit(Configuration config) { if (config.getScriptWriter() != null) diff --git a/source/org/jasig/portal/tools/dbloader/DbUtils.java b/source/org/jasig/portal/tools/dbloader/DbUtils.java index cc7270ca179..bb7dcaa6d71 100755 --- a/source/org/jasig/portal/tools/dbloader/DbUtils.java +++ b/source/org/jasig/portal/tools/dbloader/DbUtils.java @@ -1,36 +1,6 @@ -/** - * Copyright 2001 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. - * +/* Copyright 2004 The JA-SIG Collaborative. All rights reserved. + * See license distributed with this file and + * available online at http://www.uportal.org/license.html */ package org.jasig.portal.tools.dbloader; @@ -41,8 +11,8 @@ import java.sql.SQLException; import java.sql.Statement; import java.sql.Types; -import java.util.Collections; import java.util.Hashtable; +import java.util.Map; import org.jasig.portal.RDBMServices; @@ -95,25 +65,33 @@ static String getLocalDataTypeName (Configuration config, // Check for a mapping in DbLoader.xml localDataTypeName = config.getMappedDataTypeName(dbName, dbVersion, driverName, driverVersion, genericDataTypeName); + // Find the type code for this generic type name + int dataTypeCode = DbUtils.getJavaSqlType(genericDataTypeName); + if (localDataTypeName != null) return localDataTypeName; + if (config.getLocalTypeMap() == null) { + + Map localTypeMap = new Hashtable(); + config.setLocalTypeMap(localTypeMap); - if (config.getLocalTypeMap() == null) { - config.setLocalTypeMap(new Hashtable()); - try { - // Find the first local type name matching the type code + ResultSet rs = dbmd.getTypeInfo(); try { while (rs.next()) { Integer dbTypeCode = new Integer(rs.getInt("DATA_TYPE")); String dbTypeName = rs.getString("TYPE_NAME"); - - config.getLocalTypeMap().put(dbTypeCode, dbTypeName); + + // Add only first occurence of each type code + // See Bugzilla for a detailed explanation + if (!localTypeMap.containsKey(dbTypeCode)) { + localTypeMap.put(dbTypeCode, dbTypeName); + } } - } + } finally { rs.close(); } @@ -125,13 +103,10 @@ static String getLocalDataTypeName (Configuration config, e.printStackTrace(config.getLog()); DbLoader.exit(config); } - - config.setLocalTypeMap(Collections.unmodifiableMap(config.getLocalTypeMap())); } - // Find the type code for this generic type name - int dataTypeCode = DbUtils.getJavaSqlType(genericDataTypeName); - Integer dataTypeCodeObj = new Integer(dataTypeCode); - localDataTypeName = (String)config.getLocalTypeMap().get(dataTypeCodeObj); + + Integer dataTypeCodeObj = new Integer(dataTypeCode); + localDataTypeName = (String)config.getLocalTypeMap().get(dataTypeCodeObj); if (localDataTypeName != null) { diff --git a/source/org/jasig/portal/utils/DocumentFactory.java b/source/org/jasig/portal/utils/DocumentFactory.java index a0ab01023bc..a63d37418f5 100644 --- a/source/org/jasig/portal/utils/DocumentFactory.java +++ b/source/org/jasig/portal/utils/DocumentFactory.java @@ -75,8 +75,7 @@ protected DocumentFactory() { dbFactory.setNamespaceAware(true); dbFactory.setValidating(false); } catch (Exception e) { - log.error( "DocumentFactory: unable to initialize DocumentBuilderFactory"); - log.error( e); + log.error( "DocumentFactory: unable to initialize DocumentBuilderFactory", e); } } @@ -91,7 +90,8 @@ public static Document getNewDocument() { String className = PropertiesManager.getProperty("org.jasig.portal.utils.IPortalDocument.implementation"); doc = (IPortalDocument)Class.forName(className).newInstance(); } catch (Exception e) { - log.error( e); + log.error("org.jasig.portal.utils.DocumentFactory could not create new " + + "IPortalDocument: ", e); throw new RuntimeException("org.jasig.portal.utils.DocumentFactory could not create new " + "IPortalDocument: " + e.getMessage()); } return doc; @@ -130,7 +130,7 @@ protected Object initialValue() { try { r = instance().dbFactory.newDocumentBuilder(); } catch (Exception e) { - log.error( e); + log.error(e, e); } return r; } diff --git a/source/org/jasig/portal/utils/RDBMCounterStore.java b/source/org/jasig/portal/utils/RDBMCounterStore.java index 1c6e390965f..afb611fc09a 100644 --- a/source/org/jasig/portal/utils/RDBMCounterStore.java +++ b/source/org/jasig/portal/utils/RDBMCounterStore.java @@ -83,7 +83,9 @@ public synchronized void createCounter (String counterName) throws Exception { if (updateCount <= 0) { PortalException pe = new PortalException("RDBMCounterStore::createCounter(): An error occured while creating the counter named: " + counterName + ".\nNo rows were created."); - log.error( pe); + log.error("RDBMCounterStore::createCounter(): " + + "An error occured while creating the counter named: " + + counterName + ".\nNo rows were created.", pe); throw pe; } @@ -92,8 +94,13 @@ public synchronized void createCounter (String counterName) throws Exception { catch (SQLException sqle) { RDBMServices.rollback(con); - PortalException pe = new PortalException("RDBMCounterStore::createCounter(): An error occured while creating the counter named: " + counterName, sqle); - log.error( pe); + PortalException pe = + new PortalException("RDBMCounterStore::createCounter(): " + + "An error occured while creating the counter named: " + + counterName, sqle); + log.error("RDBMCounterStore::createCounter(): " + + "An error occured while creating the counter named: " + + counterName, pe); throw pe; } finally { @@ -131,8 +138,11 @@ public synchronized void setCounter (String counterName, int value) throws Excep int updateCount = setCounterPstmt.executeUpdate(); if (updateCount <= 0) { - PortalException pe = new PortalException("RDBMCounterStore::setCounter(): An error occured while setting the counter named: " + counterName + ".\nNo rows were updated."); - log.error( pe); + PortalException pe = + new PortalException("RDBMCounterStore::setCounter(): " + + "An error occured while setting the counter named: " + + counterName + ".\nNo rows were updated."); + log.error(pe, pe); throw pe; } @@ -141,8 +151,11 @@ public synchronized void setCounter (String counterName, int value) throws Excep catch (SQLException sqle) { RDBMServices.rollback(con); - PortalException pe = new PortalException("RDBMCounterStore::createCounter(): An error occured while creating the counter named: " + counterName, sqle); - log.error( pe); + PortalException pe = + new PortalException("RDBMCounterStore::createCounter(): " + + "An error occured while creating the counter named: " + + counterName, sqle); + log.error(pe, pe); throw pe; } @@ -185,7 +198,8 @@ public synchronized int getIncrementIntegerId (String counterName) throws Except for (int i = 0; i < 25; i++) { - log.debug("RDBMCounterStore::getIncrementInteger(" + counterName + "): " + getCounterQuery); + log.debug("RDBMCounterStore::getIncrementInteger(" + + counterName + "): " + getCounterQuery); rs = getCounterPstmt.executeQuery(); if (!rs.next()) { @@ -193,7 +207,9 @@ public synchronized int getIncrementIntegerId (String counterName) throws Except createCounter(counterName); } catch (Exception e) { - throw new PortalException("RDBMCounterStore::getIncrementInteger(): Could not create new counter for name: " + counterName, e); + throw + new PortalException("RDBMCounterStore::getIncrementInteger(): " + + "Could not create new counter for name: " + counterName, e); } rs = getCounterPstmt.executeQuery(); @@ -223,7 +239,7 @@ public synchronized int getIncrementIntegerId (String counterName) throws Except } catch (SQLException sqle) { PortalException pe = new PortalException("RDBMCounterStore::getIncrementInteger(): An error occured while updating the counter, name: " + counterName, sqle); - log.error( pe); + log.error(pe, pe); throw pe; } finally { @@ -235,7 +251,7 @@ public synchronized int getIncrementIntegerId (String counterName) throws Except } PortalException pe = new PortalException("RDBMCounterStore::getIncrementInteger(): Unable to increment counter for " + counterName); - log.error( pe); + log.error(pe, pe); throw pe; } diff --git a/source/org/jasig/portal/utils/SqlTransaction.java b/source/org/jasig/portal/utils/SqlTransaction.java index ae04b6e17a8..5442800f623 100644 --- a/source/org/jasig/portal/utils/SqlTransaction.java +++ b/source/org/jasig/portal/utils/SqlTransaction.java @@ -32,7 +32,7 @@ public static void begin(Connection conn) throws java.sql.SQLException } catch (SQLException sqle) { - log.error( sqle); + log.error("Error beginning connection", sqle); throw sqle; } } @@ -50,7 +50,7 @@ public static void commit(Connection conn) throws java.sql.SQLException } catch (SQLException sqle) { - log.error( sqle); + log.error("Error committing", sqle); throw sqle; } } @@ -77,7 +77,7 @@ public static void rollback(Connection conn) throws java.sql.SQLException } catch (SQLException sqle) { - log.error( sqle); + log.error("Error rolling back connection.", sqle); throw sqle; } } @@ -94,7 +94,7 @@ public static void setAutoCommit(Connection conn, boolean newValue) throws java. } catch (SQLException sqle) { - log.error( sqle); + log.error("Error setting auto commit to " + newValue, sqle); throw sqle; } } diff --git a/source/org/jasig/portal/utils/URLUtil.java b/source/org/jasig/portal/utils/URLUtil.java index 86ccd8d36ba..2aab082e2f2 100644 --- a/source/org/jasig/portal/utils/URLUtil.java +++ b/source/org/jasig/portal/utils/URLUtil.java @@ -329,7 +329,7 @@ public static void redirectPost(HttpServletRequest req, // send the results back to the original requestor res.getWriter().print(results.toString()); } catch (IOException ioe) { - log.error( ioe); + log.error(ioe, ioe); throw new PortalException(ioe); } finally { try { diff --git a/source/org/jasig/portal/wsrp/bind/WSRP_v1_ServiceDescription_Binding_SOAPImpl.java b/source/org/jasig/portal/wsrp/bind/WSRP_v1_ServiceDescription_Binding_SOAPImpl.java index 1cab9949c61..75c13ce5013 100644 --- a/source/org/jasig/portal/wsrp/bind/WSRP_v1_ServiceDescription_Binding_SOAPImpl.java +++ b/source/org/jasig/portal/wsrp/bind/WSRP_v1_ServiceDescription_Binding_SOAPImpl.java @@ -130,7 +130,7 @@ public void getServiceDescription(RegistrationContext registrationContext, Strin } offeredPortlets.value = (PortletDescription[])portletDescriptionList.toArray(new PortletDescription[0]); } catch (Exception e) { - log.error( e); + log.error("Exception determining offered portlets.", e); } // User category descriptions @@ -152,7 +152,7 @@ public void getServiceDescription(RegistrationContext registrationContext, Strin } userCategoryDescriptions.value = (ItemDescription[])userCategoryDescriptionList.toArray(new ItemDescription[0]); } catch (PortalException pe) { - log.error( pe); + log.error("Exception determining user category descriptions", pe); } // Custom user profile item descriptions diff --git a/tests/org/jasig/portal/ExceptionHelperTest.java b/tests/org/jasig/portal/ExceptionHelperTest.java new file mode 100644 index 00000000000..9ad5836d9e1 --- /dev/null +++ b/tests/org/jasig/portal/ExceptionHelperTest.java @@ -0,0 +1,217 @@ +/* Copyright 2004 The JA-SIG Collaborative. All rights reserved. +* See license distributed with this file and +* available online at http://www.uportal.org/license.html +*/ + +package org.jasig.portal; + +import junit.framework.TestCase; + +/** + * Testcase for ExceptionHelper. + * @author andrew.petro@yale.edu + * @version $Revision$ $Date$ + */ +public class ExceptionHelperTest extends TestCase { + + /** + * A trace which requires no trimming. + */ + private String reallyBasicTrace = "Programming error\n" + + " org.jasig.portal.PortalException: java.lang.RuntimeException: java.lang.NullPointerException [based on exception: java.lang.NullPointerException]\n" + + " at org.jasig.portal.UserInstance.renderState(UserInstance.java:600)\n" + + " at org.jasig.portal.UserInstance.writeContent(UserInstance.java:174)\n" + + " at org.jasig.portal.PortalSessionManager.doGet(PortalSessionManager.java:234)\n"; + + /** + * An example raw stack trace which has only one throwable. + */ + private String basicTrace = "Programming error\n" + + " org.jasig.portal.PortalException: java.lang.RuntimeException: java.lang.NullPointerException [based on exception: java.lang.NullPointerException]\n" + + " at org.jasig.portal.UserInstance.renderState(UserInstance.java:600)\n" + + " at org.jasig.portal.UserInstance.writeContent(UserInstance.java:174)\n" + + " at org.jasig.portal.PortalSessionManager.doGet(PortalSessionManager.java:234)\n" + + " at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)\n" + + " at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)\n" + + " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)\n" + + " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)\n" + + " at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)\n" + + " at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)\n" + + " at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)\n" + + " at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)\n" + + " at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)\n" + + " at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)\n" + + " at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)\n" + + " at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)\n" + + " at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)\n" + + " at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)\n" + + " at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)\n" + + " at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)\n" + + " at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)\n" + + " at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)\n" + + " at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)\n" + + " at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)\n" + + " at java.lang.Thread.run(Thread.java:534)\n"; + + /** + * Excpected result of trimming the basic trace. + */ + private String basicTraceTrimmed = "Programming error\n" + + " org.jasig.portal.PortalException: java.lang.RuntimeException: java.lang.NullPointerException [based on exception: java.lang.NullPointerException]\n" + + " at org.jasig.portal.UserInstance.renderState(UserInstance.java:600)\n" + + " at org.jasig.portal.UserInstance.writeContent(UserInstance.java:174)\n" + + " at org.jasig.portal.PortalSessionManager.doGet(PortalSessionManager.java:234)\n"; + + /** + * An example raw stack trace which has two throwables in the chain and + * only the first throwable need be trimmed. + */ + private String rawCauseTrace = "Programming error\n" + + " org.jasig.portal.PortalException: java.lang.RuntimeException: java.lang.NullPointerException [based on exception: java.lang.NullPointerException]\n" + + " at org.jasig.portal.UserInstance.renderState(UserInstance.java:600)\n" + + " at org.jasig.portal.UserInstance.writeContent(UserInstance.java:174)\n" + + " at org.jasig.portal.PortalSessionManager.doGet(PortalSessionManager.java:234)\n" + + " at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)\n" + + " at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)\n" + + " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)\n" + + " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)\n" + + " at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)\n" + + " at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)\n" + + " at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)\n" + + " at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)\n" + + " at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)\n" + + " at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)\n" + + " at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)\n" + + " at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)\n" + + " at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)\n" + + " at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)\n" + + " at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)\n" + + " at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)\n" + + " at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)\n" + + " at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)\n" + + " at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)\n" + + " at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)\n" + + " at java.lang.Thread.run(Thread.java:534)\n" + + "Caused by: java.lang.RuntimeException: java.lang.NullPointerException\n" + + " at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3407)\n" + + " at org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:433)\n" + + " at org.jasig.portal.utils.SAX2FilterImpl.endDocument(SAX2FilterImpl.java:654)\n" + + " at org.jasig.portal.utils.SAX2BufferImpl.outputBuffer(SAX2BufferImpl.java:181)\n" + + " at org.jasig.portal.UserInstance.renderState(UserInstance.java:557)\n"; + + private String trimmedCauseStackTrace = "Programming error\n" + + " org.jasig.portal.PortalException: java.lang.RuntimeException: java.lang.NullPointerException [based on exception: java.lang.NullPointerException]\n" + + " at org.jasig.portal.UserInstance.renderState(UserInstance.java:600)\n" + + " at org.jasig.portal.UserInstance.writeContent(UserInstance.java:174)\n" + + " at org.jasig.portal.PortalSessionManager.doGet(PortalSessionManager.java:234)\n" + + "Caused by: java.lang.RuntimeException: java.lang.NullPointerException\n" + + " at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3407)\n" + + " at org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:433)\n" + + " at org.jasig.portal.utils.SAX2FilterImpl.endDocument(SAX2FilterImpl.java:654)\n" + + " at org.jasig.portal.utils.SAX2BufferImpl.outputBuffer(SAX2BufferImpl.java:181)\n" + + " at org.jasig.portal.UserInstance.renderState(UserInstance.java:557)\n"; + + + /** + * An example raw stack trace which has two throwables in the chain and + * both need to be trimmed + */ + private String complexCauseTrace = "Programming error\n" + + " org.jasig.portal.PortalException: java.lang.RuntimeException: java.lang.NullPointerException [based on exception: java.lang.NullPointerException]\n" + + " at org.jasig.portal.UserInstance.renderState(UserInstance.java:600)\n" + + " at org.jasig.portal.UserInstance.writeContent(UserInstance.java:174)\n" + + " at org.jasig.portal.PortalSessionManager.doGet(PortalSessionManager.java:234)\n" + + " at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)\n" + + " at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)\n" + + " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)\n" + + " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)\n" + + " at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)\n" + + " at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)\n" + + " at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)\n" + + " at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)\n" + + " at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)\n" + + " at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)\n" + + " at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)\n" + + " at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)\n" + + " at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)\n" + + " at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)\n" + + " at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)\n" + + " at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)\n" + + " at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)\n" + + " at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)\n" + + " at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)\n" + + " at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)\n" + + " at java.lang.Thread.run(Thread.java:534)\n" + + "Caused by: java.lang.RuntimeException: java.lang.NullPointerException\n" + + " at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3407)\n" + + " at org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:433)\n" + + " at org.jasig.portal.utils.SAX2FilterImpl.endDocument(SAX2FilterImpl.java:654)\n" + + " at org.jasig.portal.utils.SAX2BufferImpl.outputBuffer(SAX2BufferImpl.java:181)\n" + + " at org.jasig.portal.UserInstance.renderState(UserInstance.java:557)\n" + + " at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)\n" + + " at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)\n" + + " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)\n" + + " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)\n" + + " at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)\n" + + " at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)\n" + + " at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)\n" + + " at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)\n" + + " at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)\n" + + " at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)\n" + + " at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)\n" + + " at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)\n" + + " at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)\n" + + " at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)\n"; + + /** + * Test ability to refrain from trimming stack trace where + * no trimming is necessary. + */ + public void testNoTrim(){ + assertEquals(this.reallyBasicTrace, + ExceptionHelper.trimStackTrace(this.reallyBasicTrace)); + } + + /** + * Test ability to trim a basic stack trace. + */ + public void testTrimStackTrace(){ + assertEquals(this.basicTraceTrimmed, + ExceptionHelper.trimStackTrace(this.basicTrace)); + } + + /** + * Test that a Cause after trimming is maintained. + */ + public void testCauseTrace() { + assertEquals(this.trimmedCauseStackTrace, + ExceptionHelper.trimStackTrace(this.rawCauseTrace)); + } + + /** + * Test that causes are also properly trimmed. + */ + public void testTrimCauseTrace() { + assertEquals(this.trimmedCauseStackTrace, + ExceptionHelper.trimStackTrace(this.complexCauseTrace)); + } + +} \ No newline at end of file diff --git a/tests/org/jasig/portal/lang/ChainedThrowable_Test.java b/tests/org/jasig/portal/lang/ChainedThrowable_Test.java index f3e5df0fe05..6a7d9d051e4 100644 --- a/tests/org/jasig/portal/lang/ChainedThrowable_Test.java +++ b/tests/org/jasig/portal/lang/ChainedThrowable_Test.java @@ -1,22 +1,36 @@ -///////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) Campus Pipeline, Inc. 2000 -// All Rights Reserved -// -// THIS WORK IS AN UNPUBLISHED WORK AND CONTAINS CONFIDENTIAL, PROPRIETARY, -// AND TRADE SECRET INFORMATION OF CAMPUS PIPELINE, INC. ACCESS TO THIS -// WORK IS RESTRICTED TO CAMPUS PIPELINE, INC. EMPLOYEES AND TO ENTITIES -// OTHER THAN CAMPUS PIPELINE, INC. WHO ARE PARTIES TO CURRENT LICENSE AND -// CONFIDENTIALITY AGREEMENTS WITH CAMPUS PIPELINE, INC. OR ITS AUTHORIZED -// DISTRIBUTORS. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED, -// COPIED, DISTRIBUTED, REPRODUCED, REVISED, MODIFIED, TRANSLATED, -// ABRIDGED, CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, -// TRANSFORMED, ADAPTED, OR REVERSE ENGINEERED WITHOUT THE PRIOR WRITTEN -// CONSENT OF CAMPUS PIPELINE, INC. ANY USE OR EXPLOITATION OF THIS WORK -// WITHOUT EXPRESS AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL -// AND CIVIL LIABILITY. -// -///////////////////////////////////////////////////////////////////////////// +/* Copyright 2000 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. +* +*/ package org.jasig.portal.lang; diff --git a/tests/org/jasig/portal/lang/Resources_Test.java b/tests/org/jasig/portal/lang/Resources_Test.java index 2a58311fa96..3bedb9f40d1 100644 --- a/tests/org/jasig/portal/lang/Resources_Test.java +++ b/tests/org/jasig/portal/lang/Resources_Test.java @@ -1,26 +1,37 @@ -///////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) Campus Pipeline, Inc. 2001 -// All Rights Reserved -// -// THIS WORK IS AN UNPUBLISHED WORK AND CONTAINS CONFIDENTIAL, PROPRIETARY, -// AND TRADE SECRET INFORMATION OF CAMPUS PIPELINE, INC. ACCESS TO THIS -// WORK IS RESTRICTED TO CAMPUS PIPELINE, INC. EMPLOYEES AND TO ENTITIES -// OTHER THAN CAMPUS PIPELINE, INC. WHO ARE PARTIES TO CURRENT LICENSE AND -// CONFIDENTIALITY AGREEMENTS WITH CAMPUS PIPELINE, INC. OR ITS AUTHORIZED -// DISTRIBUTORS. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED, -// COPIED, DISTRIBUTED, REPRODUCED, REVISED, MODIFIED, TRANSLATED, -// ABRIDGED, CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, -// TRANSFORMED, ADAPTED, OR REVERSE ENGINEERED WITHOUT THE PRIOR WRITTEN -// CONSENT OF CAMPUS PIPELINE, INC. ANY USE OR EXPLOITATION OF THIS WORK -// WITHOUT EXPRESS AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL -// AND CIVIL LIABILITY. -// -///////////////////////////////////////////////////////////////////////////// - - +/* Copyright 2001 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. +* +*/ package org.jasig.portal.lang; - import java.text.MessageFormat; import java.util.MissingResourceException; import java.util.Properties; @@ -72,7 +83,6 @@ public Resources_Test( String name ) { super( name ); } - public void test() throws Exception { @@ -83,10 +93,8 @@ public void test() {"someUnknownProperty", MissingResourceException.class}, {"testGetString", null } }; - tryEach( tests ); } - private void tryEach( Object[][] objects ) throws Exception { @@ -94,7 +102,6 @@ private void tryEach( Object[][] objects ) { String name = (String)objects[i][0]; Class throwable = (Class)objects[i][1]; - tryValue( name, throwable ); tryValue( name, null, throwable ); tryValue( name, new String[]{ "some value" }, throwable ); @@ -139,9 +146,7 @@ private void tryValue( if( null != throwable ) expected = throwable.getName(); - String got = t.getClass().getName(); - TestCase.assertEquals( expected, got @@ -160,7 +165,6 @@ private String getString( objects ); } - private String getString( String name ) { return Resources.getString( @@ -173,16 +177,12 @@ private String loadString( String name ) throws Exception { Properties properties = new Properties(); - properties.load( getClass().getResourceAsStream( "Resources_Test.properties" ) ); - String value = properties.getProperty( name ); - if( null == value ) throw new MissingResourceException( "Undefined property.", Resources_Test.class.getName(), name ); - return value; } diff --git a/tests/org/jasig/portal/lang/StackTrace_Test.java b/tests/org/jasig/portal/lang/StackTrace_Test.java index 52f78a27571..f178d3eff82 100644 --- a/tests/org/jasig/portal/lang/StackTrace_Test.java +++ b/tests/org/jasig/portal/lang/StackTrace_Test.java @@ -1,22 +1,36 @@ -///////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) Campus Pipeline, Inc. 2001 -// All Rights Reserved -// -// THIS WORK IS AN UNPUBLISHED WORK AND CONTAINS CONFIDENTIAL, PROPRIETARY, -// AND TRADE SECRET INFORMATION OF CAMPUS PIPELINE, INC. ACCESS TO THIS -// WORK IS RESTRICTED TO CAMPUS PIPELINE, INC. EMPLOYEES AND TO ENTITIES -// OTHER THAN CAMPUS PIPELINE, INC. WHO ARE PARTIES TO CURRENT LICENSE AND -// CONFIDENTIALITY AGREEMENTS WITH CAMPUS PIPELINE, INC. OR ITS AUTHORIZED -// DISTRIBUTORS. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED, -// COPIED, DISTRIBUTED, REPRODUCED, REVISED, MODIFIED, TRANSLATED, -// ABRIDGED, CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, -// TRANSFORMED, ADAPTED, OR REVERSE ENGINEERED WITHOUT THE PRIOR WRITTEN -// CONSENT OF CAMPUS PIPELINE, INC. ANY USE OR EXPLOITATION OF THIS WORK -// WITHOUT EXPRESS AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL -// AND CIVIL LIABILITY. -// -///////////////////////////////////////////////////////////////////////////// +/* Copyright 2001 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. +* +*/ package org.jasig.portal.lang; diff --git a/tests/org/jasig/portal/lang/ThrowableHelper_Test.java b/tests/org/jasig/portal/lang/ThrowableHelper_Test.java index 8621deeee1b..d9092b0888e 100644 --- a/tests/org/jasig/portal/lang/ThrowableHelper_Test.java +++ b/tests/org/jasig/portal/lang/ThrowableHelper_Test.java @@ -1,22 +1,36 @@ -///////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) Campus Pipeline, Inc. 2001 -// All Rights Reserved -// -// THIS WORK IS AN UNPUBLISHED WORK AND CONTAINS CONFIDENTIAL, PROPRIETARY, -// AND TRADE SECRET INFORMATION OF CAMPUS PIPELINE, INC. ACCESS TO THIS -// WORK IS RESTRICTED TO CAMPUS PIPELINE, INC. EMPLOYEES AND TO ENTITIES -// OTHER THAN CAMPUS PIPELINE, INC. WHO ARE PARTIES TO CURRENT LICENSE AND -// CONFIDENTIALITY AGREEMENTS WITH CAMPUS PIPELINE, INC. OR ITS AUTHORIZED -// DISTRIBUTORS. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED, -// COPIED, DISTRIBUTED, REPRODUCED, REVISED, MODIFIED, TRANSLATED, -// ABRIDGED, CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, -// TRANSFORMED, ADAPTED, OR REVERSE ENGINEERED WITHOUT THE PRIOR WRITTEN -// CONSENT OF CAMPUS PIPELINE, INC. ANY USE OR EXPLOITATION OF THIS WORK -// WITHOUT EXPRESS AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL -// AND CIVIL LIABILITY. -// -///////////////////////////////////////////////////////////////////////////// +/* Copyright 2001 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. +* +*/ package org.jasig.portal.lang; diff --git a/tests/org/jasig/portal/lang/TypeConverter_Test.java b/tests/org/jasig/portal/lang/TypeConverter_Test.java index bccc5977cd6..cb184a59f71 100644 --- a/tests/org/jasig/portal/lang/TypeConverter_Test.java +++ b/tests/org/jasig/portal/lang/TypeConverter_Test.java @@ -1,22 +1,36 @@ -///////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) Campus Pipeline, Inc. 2001 -// All Rights Reserved -// -// THIS WORK IS AN UNPUBLISHED WORK AND CONTAINS CONFIDENTIAL, PROPRIETARY, -// AND TRADE SECRET INFORMATION OF CAMPUS PIPELINE, INC. ACCESS TO THIS -// WORK IS RESTRICTED TO CAMPUS PIPELINE, INC. EMPLOYEES AND TO ENTITIES -// OTHER THAN CAMPUS PIPELINE, INC. WHO ARE PARTIES TO CURRENT LICENSE AND -// CONFIDENTIALITY AGREEMENTS WITH CAMPUS PIPELINE, INC. OR ITS AUTHORIZED -// DISTRIBUTORS. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED, -// COPIED, DISTRIBUTED, REPRODUCED, REVISED, MODIFIED, TRANSLATED, -// ABRIDGED, CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, -// TRANSFORMED, ADAPTED, OR REVERSE ENGINEERED WITHOUT THE PRIOR WRITTEN -// CONSENT OF CAMPUS PIPELINE, INC. ANY USE OR EXPLOITATION OF THIS WORK -// WITHOUT EXPRESS AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL -// AND CIVIL LIABILITY. -// -///////////////////////////////////////////////////////////////////////////// +/* Copyright 2001 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. +* +*/ package org.jasig.portal.lang; diff --git a/webpages/media/org/jasig/portal/channels/portlet/wsrp-consumer.cpd b/webpages/media/org/jasig/portal/channels/portlet/wsrp-consumer.cpd index 1489c674032..eb90099aaab 100644 --- a/webpages/media/org/jasig/portal/channels/portlet/wsrp-consumer.cpd +++ b/webpages/media/org/jasig/portal/channels/portlet/wsrp-consumer.cpd @@ -62,7 +62,7 @@ Version $Revision: 1.1 $ 80 255 - http://www.webservices.org:8080/wsrp/WSRPBaseService + http://www.webservices.org:8080/wsrp/wsrp4j/WSRPBaseService The WSRP Base service @@ -76,7 +76,7 @@ Version $Revision: 1.1 $ 80 255 - http://www.webservices.org:8080/wsrp/WSRPServiceDescriptionService + http://www.webservices.org:8080/wsrp/wsrp4j/WSRPServiceDescriptionService The WSRP Service Description service @@ -90,7 +90,7 @@ Version $Revision: 1.1 $ 80 255 - http://www.webservices.org:8080/wsrp/WSRPRegistrationService + http://www.webservices.org:8080/wsrp/wsrp4j/WSRPRegistrationService The WSRP Registration service (optional) @@ -98,13 +98,13 @@ Version $Revision: 1.1 $ PORTLET.wsrp_portlet_mgmt_url - + 80 255 - http://www.webservices.org:8080/wsrp/WSRPPortletManagementService + http://www.webservices.org:8080/wsrp/wsrp4j/WSRPPortletManagementService The WSRP Portlet Management service (optional) diff --git a/webpages/media/org/jasig/portal/layout/AL_TabColumn/integratedModes/cartoon/CVS/Entries b/webpages/media/org/jasig/portal/layout/AL_TabColumn/integratedModes/cartoon/CVS/Entries deleted file mode 100644 index 64eb23340ea..00000000000 --- a/webpages/media/org/jasig/portal/layout/AL_TabColumn/integratedModes/cartoon/CVS/Entries +++ /dev/null @@ -1,6 +0,0 @@ -D/skin//// -D/mainBorder//// -D/institutional//// -D/icons//// -D/columnBorder//// -D/CVS//// diff --git a/webpages/media/org/jasig/portal/layout/AL_TabColumn/integratedModes/cartoon/CVS/Repository b/webpages/media/org/jasig/portal/layout/AL_TabColumn/integratedModes/cartoon/CVS/Repository deleted file mode 100644 index 792c3c414d0..00000000000 --- a/webpages/media/org/jasig/portal/layout/AL_TabColumn/integratedModes/cartoon/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -/home/cvs/jasig/. diff --git a/webpages/media/org/jasig/portal/layout/AL_TabColumn/integratedModes/cartoon/CVS/Root b/webpages/media/org/jasig/portal/layout/AL_TabColumn/integratedModes/cartoon/CVS/Root deleted file mode 100644 index 69c588a289a..00000000000 --- a/webpages/media/org/jasig/portal/layout/AL_TabColumn/integratedModes/cartoon/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:blynch@mis105.mis.udel.edu:/home/cvs/jasig diff --git a/webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html.xsl b/webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html.xsl index 2408f2c1ce8..494aeb77a70 100644 --- a/webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html.xsl +++ b/webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html.xsl @@ -752,8 +752,16 @@ diff --git a/webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html_en_US.xsl b/webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html_en_US.xsl index 2408f2c1ce8..90e1a7c59ae 100644 --- a/webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html_en_US.xsl +++ b/webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html_en_US.xsl @@ -752,8 +752,16 @@ diff --git a/webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html_it_IT.xsl b/webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html_it_IT.xsl index 879604096d4..33c8840e954 100644 --- a/webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html_it_IT.xsl +++ b/webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html_it_IT.xsl @@ -752,8 +752,16 @@ diff --git a/webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html_ja_JP.xsl b/webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html_ja_JP.xsl index 5e27d67bdc9..2d12c0defca 100644 --- a/webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html_ja_JP.xsl +++ b/webpages/stylesheets/org/jasig/portal/channels/CChannelManager/html_ja_JP.xsl @@ -69,27 +69,27 @@ - + @@ -159,7 +159,7 @@
Channel Timeout:
- - + + + + + + + 5000 + + + milliseconds (1000 = 1 second)
Channel Timeout:
- - + + + + + + + 5000 + + + milliseconds (1000 = 1 second)
Timeout del canale:
- - + + + + + + + 5000 + + + millisecondi (1000 = 1 secondo)
- +
チャネル管理オプション:?ャ?ル管?オプション:
- インターフェイス画像 + インターフェイス画?
- インターフェイス画像 + インターフェイス画? - 新規チャネルの出版 + 新??ャ?ル?出版
- インターフェイス画像 + インターフェイス画? - 出版済みチャネルの修正 + 出版済??ャ?ル?修正
@@ -108,7 +108,7 @@ + タイプ: オプションカラム??る?択アイコンをクリック?,追加????ャ?ルタイプを?択??? - + @@ -129,7 +129,7 @@
- タイプ: オプションカラムにある選択アイコンをクリックし,追加したいチャネルタイプを選択します
@@ -116,11 +116,11 @@
オプション - インターフェイス画像 + インターフェイス画? チャネルタイプ?ャ?ルタイプ - インターフェイス画像 + インターフェイス画? 説明
- インターフェイス画像 + インターフェイス画?
@@ -143,15 +143,15 @@ checked
- インターフェイス画像 + インターフェイス画? カスタム - インターフェイス画像 + インターフェイス画? このチャネルタイプを使用すると,CPD(Channel Publishing Document)を伴わないチャネルを出版することができます.通常,チャネル定義が1つしかないチャネルの出版に使用されます.???ャ?ルタイプを使用?る?,CPD(Channel Publishing Document)を伴????ャ?ルを出版?る????????.通常,?ャ?ル定義?1??????ャ?ル?出版?使用?れ??.
- インターフェイス画像 + インターフェイス画?
@@ -171,7 +171,7 @@
- インターフェイス画像 + インターフェイス画?
@@ -186,7 +186,7 @@ checked - インターフェイス画像 + インターフェイス画? @@ -194,7 +194,7 @@ - インターフェイス画像 + インターフェイス画? @@ -205,7 +205,7 @@
- インターフェイス画像 + インターフェイス画?
@@ -222,7 +222,7 @@ - + @@ -242,10 +242,10 @@ - + - +
出版済みチャネルの修正:出版済??ャ?ル?修正:
下のテーブルのアイコンをクリックしてオプションを選択します.下?テーブル?アイコンをクリック??オプションを?択???.
@@ -256,10 +256,10 @@
- インターフェイス画像 + インターフェイス画? - キャンセルして戻る + キャンセル??戻る
@@ -278,7 +278,7 @@

- カテゴリによるフィルタ: + カテゴリ?よるフィルタ: ?uPCM_action=filterByCategory&newCategory= @@ -294,7 +294,7 @@ + フィルタ?? @@ -307,11 +307,11 @@ オプション - インターフェイス画像 + インターフェイス画? - チャネル名 + ?ャ?ル?? - インターフェイス画像 + インターフェイス画? 説明 @@ -320,7 +320,7 @@
- インターフェイス画像 + インターフェイス画?
@@ -332,16 +332,16 @@
- {@ID} 設定の編集 + {@ID} 設定?編集 - 出版済みのチャネル {@ID} の削除 + 出版済???ャ?ル {@ID} ?削除 - インターフェイス画像 + インターフェイス画? @@ -349,7 +349,7 @@ - インターフェイス画像 + インターフェイス画? @@ -360,7 +360,7 @@
- インターフェイス画像 + インターフェイス画?
@@ -372,7 +372,7 @@ - インターフェイス画像表示するチャネルがありません + インターフェイス画?表示?る?ャ?ル??り??ん @@ -390,7 +390,7 @@ - 個のレコードを一度に表示.インターフェイス画像 + 個?レコードを一度?表示.インターフェイス画? @@ -403,8 +403,8 @@ ページ: - 前 - インターフェイス画像 + ? + インターフェイス画? @@ -412,13 +412,13 @@ ?uPCM_action=changePage&newPage= Go to page [{($currPage)-1}] - インターフェイス画像 + インターフェイス画? - インターフェイス画像 + インターフェイス画? @@ -426,7 +426,7 @@ ?uPCM_action=changePage&newPage= - インターフェイス画像 + インターフェイス画? 次 @@ -435,7 +435,7 @@ ?uPCM_action=changePage&newPage= - ページ [{($currPage)+1}] へ + ページ [{($currPage)+1}] ? @@ -454,14 +454,14 @@ - インターフェイス画像 + インターフェイス画? - +
処理の流れ:インターフェイス画像処???れ:インターフェイス画?
@@ -469,7 +469,7 @@ - インターフェイス画像 + インターフェイス画? @@ -488,7 +488,7 @@
- インターフェイス画像 + インターフェイス画?
@@ -505,7 +505,7 @@ javascript:document.workflow.uPCM_action.value='';document.workflow.uPCM_step.value='';document.workflow.submit() - チャネルパラメータ + ?ャ?ルパラメータ @@ -521,14 +521,14 @@
- インターフェイス画像 + インターフェイス画?
- インターフェイス画像 + インターフェイス画? @@ -540,7 +540,7 @@ javascript:document.workflow.uPCM_action.value='';document.workflow.uPCM_step.value='';document.workflow.submit() - チャネルパラメータ + ?ャ?ルパラメータ @@ -555,7 +555,7 @@
- インターフェイス画像 + インターフェイス画?
@@ -571,7 +571,7 @@ javascript:document.workflow.uPCM_action.value='';document.workflow.uPCM_step.value='';document.workflow.submit() - チャネルパラメータ + ?ャ?ルパラメータ @@ -595,19 +595,19 @@ + 設定 [1]: 以下?フォーム?設定を入力??? @@ -645,7 +645,7 @@
- 設定 [1]: 以下のフォームに設定を入力します
- + + インターフェイス画?オプション + インターフェイス画? @@ -617,7 +617,7 @@
- インターフェイス画像オプション - インターフェイス画像 - インターフェイス画像 + インターフェイス画? 全体設定
- インターフェイス画像 + インターフェイス画?
@@ -627,8 +627,8 @@
- - ヘルプ情報の表示 + + ヘルプ情報?表示
- インターフェイス画像 + インターフェイス画?
@@ -655,13 +655,13 @@ - - ヘルプ情報の表示 + + ヘルプ情報?表示 - 名前: [例 - StockCharts]
+ ???: [例 - StockCharts]
@@ -673,7 +673,7 @@
- インターフェイス画像 + インターフェイス画?
@@ -683,13 +683,13 @@ - - ヘルプ情報の表示 + + ヘルプ情報?表示 - ファンクション名: [例 - stock-charts]
+ ファンクション??: [例 - stock-charts]
@@ -701,7 +701,7 @@
- インターフェイス画像 + インターフェイス画?
@@ -711,13 +711,13 @@ - - ヘルプ情報の表示 + + ヘルプ情報?表示 - チャネルの説明
+ ?ャ?ル?説明