You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2001/04/25 02:06:45 UTC
cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/util PSMLManager.java
taylor 01/04/24 17:06:45
Modified: src/java/org/apache/jetspeed/util PSMLManager.java
Log:
ProfileException must be caught
Revision Changes Path
1.5 +30 -25 jakarta-jetspeed/src/java/org/apache/jetspeed/util/PSMLManager.java
Index: PSMLManager.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/util/PSMLManager.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- PSMLManager.java 2001/03/07 06:49:57 1.4
+++ PSMLManager.java 2001/04/25 00:06:44 1.5
@@ -116,17 +116,17 @@
}
// Get the URL to the appopriate PSML file
- String url;
- if (JetspeedResources.getBoolean("services.ProfileManager.enable", false))
- {
- Profile profile = ProfileManager.getProfile( data, mimetype );
- url = profile.getURL();
- }
- else
- url = profiler.getUserURL(username, mimetype);
-
+ String url = null;
try
{
+ if (JetspeedResources.getBoolean("services.ProfileManager.enable", false))
+ {
+ Profile profile = ProfileManager.getProfile( data, mimetype );
+ url = profile.getURL();
+ }
+ else
+ url = profiler.getUserURL(username, mimetype);
+
// Test if the PSML file exists
DiskCacheEntry pde = JetspeedDiskCache.getInstance().getEntry( url );
@@ -140,8 +140,13 @@
Log.note("Profiled URL doesn't exist, using default");
if (JetspeedResources.getBoolean("services.ProfileManager.enable", false))
{
- Profile profile = ProfileManager.getProfile( null, mimetype );
- url = profile.getURL();
+ try
+ {
+ Profile profile = ProfileManager.getProfile( null, mimetype );
+ url = profile.getURL();
+ }
+ catch (ProfileException ex)
+ {} // url will be null
}
else
url = profiler.getUserURL(null, mimetype);
@@ -209,24 +214,24 @@
}
String url ;
- if (JetspeedResources.getBoolean("services.ProfileManager.enable", false))
- {
- Profile profile = ProfileManager.getProfile( data, mimetype );
- url = profile.getURL();
- }
- else
- url = profiler.getUserURL(username, mimetype);
- if (url == null)
+ try
{
- Log.error("PSMLManager: Could not resolve URL of user's PSML file!");
- return false;
- }
+ if (JetspeedResources.getBoolean("services.ProfileManager.enable", false))
+ {
+ Profile profile = ProfileManager.getProfile( data, mimetype );
+ url = profile.getURL();
+ }
+ else
+ url = profiler.getUserURL(username, mimetype);
+ if (url == null)
+ {
+ Log.error("PSMLManager: Could not resolve URL of user's PSML file!");
+ return false;
+ }
- Log.note("PSMLManager: Writing "+username+"'s PSML for '"+mimetype.toString()+"' to '"+url+"'");
+ Log.note("PSMLManager: Writing "+username+"'s PSML for '"+mimetype.toString()+"' to '"+url+"'");
- try
- {
DiskCacheEntry pde = JetspeedDiskCache.getInstance().getEntry( url );
java.io.Writer out = pde.getWriter();
portlets.marshal(out);
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org