portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r332185 - /portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/PageImporter.java
Date Thu, 10 Nov 2005 00:24:42 GMT
Author: taylor
Date: Wed Nov  9 16:24:40 2005
New Revision: 332185

URL: http://svn.apache.org/viewcvs?rev=332185&view=rev
Log:
handle special case where no page.security found

Modified:
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/PageImporter.java

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/PageImporter.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/PageImporter.java?rev=332185&r1=332184&r2=332185&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/PageImporter.java
(original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/PageImporter.java
Wed Nov  9 16:24:40 2005
@@ -22,6 +22,7 @@
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.page.Page;
 import org.apache.jetspeed.om.page.PageSecurity;
+import org.apache.jetspeed.page.document.DocumentNotFoundException;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -112,10 +113,25 @@
     throws JetspeedException
     {
         Folder fsRoot = sourceManager.getFolder(rootFolder);                
-        Folder root = importFolder(fsRoot);                            
+        Folder root = importFolder(fsRoot);
+        
+        
         // create the root page security
-        PageSecurity rootSecurity = destManager.copyPageSecurity(sourceManager.getPageSecurity());
       
-        destManager.updatePageSecurity(rootSecurity);
+        PageSecurity sourcePageSecurity = null;
+        try
+        {
+            sourcePageSecurity = sourceManager.getPageSecurity();
+        }
+        catch (DocumentNotFoundException e)
+        {
+            // skip over it, not found
+        }
+        
+        if (sourcePageSecurity != null)
+        {
+            PageSecurity rootSecurity = destManager.copyPageSecurity(sourcePageSecurity);
       
+            destManager.updatePageSecurity(rootSecurity);
+        }
     }
 
     public void folderTreeImport()



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message