portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r592266 - in /portals/jetspeed-2/branches/JETSPEED-2.1.3: applications/j2-admin/src/java/org/apache/jetspeed/portlets/admin/ applications/j2-admin/src/webapp/WEB-INF/ applications/j2-admin/src/webapp/WEB-INF/view/admin/ components/portal/sr...
Date Tue, 06 Nov 2007 04:30:17 GMT
Author: taylor
Date: Mon Nov  5 20:30:15 2007
New Revision: 592266

URL: http://svn.apache.org/viewvc?rev=592266&view=rev
Log:
http://issues.apache.org/jira/browse/JS2-716
import/export features for seed data, still under development
patch from Vivek Kumar 

Added:
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/admin/
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/admin/JetspeedDataImporter.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/admin/
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/admin/importer-header.vm
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/admin/importer-view.vm
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/jetspeedSchema.vm
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/layout/impl/ExportJetspeedSchema.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/serializer/JetspeedSerializerFactory.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/serializer.xml
    portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/min-pages/Administrative/portal-admin/export.psml
    portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/pages/Administrative/export.psml
Modified:
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/jetspeed-portlet.xml
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/portlet.xml
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/layout/impl/BasePortletAction.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/maven.xml
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerApplication.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerBase.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerImpl.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerSecondaryImpl.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/CommonPortletServices.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/serializer/JetspeedSerializer.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/ajax-layout.xml
    portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/jetspeed-services.xml
    portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/min-pages/Administrative/portal-admin/folder.metadata
    portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/pages/Administrative/folder.metadata

Added: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/admin/JetspeedDataImporter.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/admin/JetspeedDataImporter.java?rev=592266&view=auto
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/admin/JetspeedDataImporter.java (added)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/admin/JetspeedDataImporter.java Mon Nov  5 20:30:15 2007
@@ -0,0 +1,295 @@
+package org.apache.jetspeed.portlets.admin;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
+import org.apache.commons.fileupload.portlet.PortletFileUpload;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.CommonPortletServices;
+import org.apache.jetspeed.headerresource.HeaderResource;
+import org.apache.jetspeed.security.GroupManager;
+import org.apache.jetspeed.security.RoleManager;
+import org.apache.jetspeed.security.UserManager;
+import org.apache.jetspeed.serializer.JetspeedSerializer;
+import org.apache.jetspeed.serializer.JetspeedSerializerFactory;
+import org.apache.portals.gems.dojo.AbstractDojoVelocityPortlet;
+
+/**
+ * Manage the Portal Site
+ * 
+ * @author <a href="mailto:firevelocity@gmail.com">Vivek Kumar</a>
+ * 
+ * @version $Id$
+ */
+public class JetspeedDataImporter extends AbstractDojoVelocityPortlet
+{
+
+    protected final Log log = LogFactory.getLog(this.getClass());
+
+    // components
+    protected UserManager userManager;
+
+    protected GroupManager groupManager;
+
+    protected RoleManager roleManager;
+
+    private HashMap roleMap = new HashMap();
+
+    private HashMap groupMap = new HashMap();
+
+    private HashMap userMap = new HashMap();
+
+    private HashMap mimeMap = new HashMap();
+
+    private HashMap mimeMapInt = new HashMap();
+
+    private HashMap mediaMap = new HashMap();
+
+    private HashMap capabilityMap = new HashMap();
+
+    private HashMap capabilityMapInt = new HashMap();
+
+    private HashMap clientMap = new HashMap();
+
+    private HashMap permissionMap = new HashMap();
+
+    private HashMap rulesMap = new HashMap();
+
+    int refCouter = 0;
+
+    private static String ENCODING_STRING = "JETSPEED 2.1 - 2006";
+
+    private static String JETSPEED = "JETSPEED";
+    
+    protected JetspeedSerializerFactory serializerFactory;    
+
+    protected void includeHeaderContent(HeaderResource headerResource)
+    {
+        headerResource.dojoAddCoreLibraryRequire("dojo.lang.*");
+        // headerResource.dojoAddCoreLibraryRequire("dojo.dnd.*");
+        headerResource.dojoAddCoreLibraryRequire("dojo.dnd.HtmlDragManager");
+        headerResource.dojoAddCoreLibraryRequire("dojo.dnd.DragAndDrop");
+        headerResource.dojoAddCoreLibraryRequire("dojo.dnd.HtmlDragAndDrop");
+
+        headerResource.dojoAddCoreLibraryRequire("dojo.event.*");
+        headerResource.dojoAddCoreLibraryRequire("dojo.io");
+
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.ContentPane");
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.LayoutContainer");
+
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.Tree");
+        headerResource
+                .dojoAddCoreLibraryRequire("dojo.widget.TreeRPCController");
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.TreeSelector");
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.TreeNode");
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.TreeContextMenu");
+
+        headerResource
+                .dojoAddCoreLibraryRequire("dojo.widget.ValidationTextbox");
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.ComboBox");
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.Checkbox");
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.Dialog");
+        headerResource.dojoAddCoreLibraryRequire("dojo.widget.Button");
+
+        headerResource.dojoAddModuleLibraryRequire("jetspeed.desktop.core");
+        headerResource
+                .dojoAddModuleLibraryRequire("jetspeed.widget.EditorTable");
+    }
+
+    public void init(PortletConfig config) throws PortletException
+    {
+        super.init(config);
+        userManager = (UserManager) getPortletContext().getAttribute(
+                CommonPortletServices.CPS_USER_MANAGER_COMPONENT);
+        if (null == userManager)
+        {
+            PortletException pe = new PortletException(
+                    "Failed to find the User Manager on SiteViewController initialization");
+            throw new RuntimeException(pe);
+        }
+        groupManager = (GroupManager) getPortletContext().getAttribute(
+                CommonPortletServices.CPS_GROUP_MANAGER_COMPONENT);
+        if (null == groupManager)
+        {
+            PortletException pe = new PortletException(
+                    "Failed to find the Group Manager on SiteViewController initialization");
+            throw new RuntimeException(pe);
+        }
+        roleManager = (RoleManager) getPortletContext().getAttribute(
+                CommonPortletServices.CPS_ROLE_MANAGER_COMPONENT);
+        if (null == roleManager)
+        {
+            PortletException pe = new PortletException(
+                    "Failed to find the Group Manager on SiteViewController initialization");
+            throw new RuntimeException(pe);
+        }
+        serializerFactory = (JetspeedSerializerFactory) getPortletContext().getAttribute(
+                CommonPortletServices.CPS_JETSPEED_SERIALIZER_FACTORY);
+        if (null == serializerFactory)
+        {
+            PortletException pe = new PortletException(
+                    "Failed to find the SerializerFactory on SiteViewController initialization");
+            throw new RuntimeException(pe);
+        }
+        
+    }
+
+    public void doView(RenderRequest request, RenderResponse response)
+            throws PortletException, IOException
+    {
+        super.doView(request, response);
+        request.getPortletSession().removeAttribute("status");
+    }
+
+    public void processAction(ActionRequest request,
+            ActionResponse actionResponse) throws PortletException,
+            java.io.IOException
+    {
+        String export = request.getParameter("export");
+        String fileName = "";
+        String destPath = "";
+        String fileType = "";
+        String path = "";
+        String usrFolder = "";
+        boolean success = false;
+        String filePath = "";
+        cleanUserFolder(request.getUserPrincipal().toString());
+        try
+        {
+            DiskFileItemFactory diskFileItemFactory = new DiskFileItemFactory();
+            PortletFileUpload portletFileUpload = new PortletFileUpload(
+                    diskFileItemFactory);
+            if (PortletFileUpload.isMultipartContent(request))
+            {
+                Iterator fileIt = portletFileUpload.parseRequest(request)
+                        .iterator();
+                while (fileIt.hasNext())
+                {
+                    FileItem fileItem = (FileItem) fileIt.next();
+                    if (fileItem.getFieldName().equals("importFile"))
+                    {
+                        synchronized (this)
+                        {
+                            fileName = fileItem.getName();
+                            usrFolder = getTempFolder(request);
+                            path = System.getProperty("file.separator");
+                            filePath = usrFolder + path + fileItem.getName();
+                            FileOutputStream out = new FileOutputStream(
+                                    filePath);
+                            out.write(fileItem.get());
+                            out.close();
+                        }
+
+                    }
+                }
+                success = importJetspeedData(filePath);
+            }
+            if (success)
+            {
+                request.getPortletSession().setAttribute("status", fileName);
+            } else
+            {
+                request.getPortletSession().setAttribute("status", "false");
+            }
+        } catch (Exception e)
+        {
+            request.getPortletSession().setAttribute("status", "false");
+            // throw new PortletException("Error occured in file uplodad");
+        }
+
+        try
+        {
+
+        } catch (Exception e)
+        {
+            // TODO: handle exception
+        }
+        // serializer.exportData(name, exportFileName, settings)
+    }
+
+    private boolean importJetspeedData(String filePath)
+    {
+        try
+        {
+            Map settings = new HashMap();
+            settings.put(JetspeedSerializer.KEY_PROCESS_USERS, Boolean.TRUE);
+            settings.put(JetspeedSerializer.KEY_PROCESS_CAPABILITIES,
+                    Boolean.TRUE);
+            settings.put(JetspeedSerializer.KEY_PROCESS_PROFILER, Boolean.TRUE);
+            settings.put(JetspeedSerializer.KEY_PROCESS_USER_PREFERENCES,
+                    Boolean.TRUE);
+            settings.put(JetspeedSerializer.KEY_OVERWRITE_EXISTING,
+                    Boolean.TRUE);
+            settings.put(JetspeedSerializer.KEY_BACKUP_BEFORE_PROCESS,
+                    Boolean.FALSE);
+            JetspeedSerializer serializer = serializerFactory.create(JetspeedSerializerFactory.PRIMARY);
+            serializer.importData(filePath, settings);
+            // TODO: secondarySerializer            
+            return true;
+        } catch (Exception e)
+        {
+            return false;
+        }
+
+    }
+
+    private boolean cleanUserFolder(String userName)
+    {
+        boolean success = false;
+        synchronized (this)
+        {
+            String tmpdir = System.getProperty("java.io.tmpdir");
+            String path = System.getProperty("file.separator");
+            String folder = tmpdir + path + userName;
+            File dir = new File(folder);
+            if (dir.exists())
+            {
+                success = deleteDir(dir);
+            }
+            success = dir.mkdir();
+        }
+        return success;
+    }
+
+    private boolean deleteDir(File dir)
+    {
+        if (dir.exists())
+        {
+            File[] files = dir.listFiles();
+            for (int i = 0; i < files.length; i++)
+            {
+                if (files[i].isDirectory())
+                {
+                    deleteDir(files[i]);
+                } else
+                {
+                    files[i].delete();
+                }
+            }
+        }
+        return (dir.delete());
+    }
+
+    private String getTempFolder(ActionRequest request)
+    {
+        String dir = System.getProperty("java.io.tmpdir");
+        String path = System.getProperty("file.separator");
+        File file = new File(dir + path + request.getUserPrincipal());
+        file.mkdir();
+        return dir + path + request.getUserPrincipal();
+    }
+}

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/jetspeed-portlet.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/jetspeed-portlet.xml?rev=592266&r1=592265&r2=592266&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/jetspeed-portlet.xml (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/jetspeed-portlet.xml Mon Nov  5 20:30:15 2007
@@ -135,6 +135,7 @@
         <js:service name='PortalConfiguration'/>
         <js:service name='ImporterManager'/>
         <js:service name='AuditActivity'/>
+        <js:service name='JetspeedSerializerFactory'/>
 	</js:services>
 
 </portlet-app>

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/portlet.xml?rev=592266&r1=592265&r2=592266&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/portlet.xml (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/portlet.xml Mon Nov  5 20:30:15 2007
@@ -1828,7 +1828,46 @@
         </preference>                        
     </portlet-preferences>
 </portlet>
-
-
+ <portlet>
+    <description>The Portal Data Importer, import and export the jetspeed data from jetspeed schema. From here you import/export the users,group,roles and jetspeed objects
+	</description>
+    <portlet-name>PortalSchemaExporter</portlet-name>
+    <display-name>Portal Schema Importer</display-name>
+    <display-name xml:lang="ja">ポータルサイトマネージャ</display-name>
+    <portlet-class>org.apache.jetspeed.portlets.admin.JetspeedDataImporter</portlet-class>
+    <init-param>
+      <name>ViewPage</name>
+      <value>/WEB-INF/view/admin/importer-view.vm</value>
+    </init-param>
+    <init-param>
+      <name>HeaderPage</name>
+      <value>/WEB-INF/view/admin/importer-header.vm</value>
+    </init-param>
+    <init-param>
+      <name>dojo.requires.core</name>
+      <value>dojo.lang.*;dojo.event.*;dojo.io.*;dojo.dnd.*;dojo.widget.*;dojo.widget.Tree;dojo.widget.Button;dojo.widget.Checkbox;dojo.widget.Dialog;dojo.widget.TabContainer;dojo.widget.ContentPane;dojo.widget.LayoutContainer;dojo.widget.TreeRPCController;dojo.widget.TreeSelector;dojo.widget.TreeNode;dojo.widget.TreeContextMenu;dojo.widget.validate;dojo.widget.ComboBox;</value>
+    </init-param>
+    <init-param>
+      <name>portlet-icon</name>
+      <value>user-home.png</value>
+    </init-param>
+    <expiration-cache>300</expiration-cache>
+    <supports>
+      <mime-type>text/html</mime-type>
+      <portlet-mode>view</portlet-mode>
+    </supports>
+    <resource-bundle>org.apache.jetspeed.portlets.admin.resources.Importer</resource-bundle>
+    <portlet-info>
+      <title>Import Export Service</title>
+      <short-title>Import-Export</short-title>
+      <keywords>schema,export,import,users,group,roles</keywords>
+    </portlet-info>
+    <portlet-preferences>
+      <preference>
+        <name>defaultLayout</name>
+        <value>jetspeed-layouts::VelocityTwoColumns</value>
+      </preference>
+    </portlet-preferences>
+  </portlet>  
 </portlet-app>
 

Added: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/admin/importer-header.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/admin/importer-header.vm?rev=592266&view=auto
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/admin/importer-header.vm (added)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/admin/importer-header.vm Mon Nov  5 20:30:15 2007
@@ -0,0 +1,78 @@
+#*
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+*#
+<style type="text/css">
+
+#toolsDiv img {
+  vertical-align: middle;
+}
+.treeTable tr {
+  vertical-align: top;
+}
+.formQuestion {
+        background-color:#d0e3f5;
+        padding:0.3em;
+        font-weight:900;
+        font-family:Verdana, Arial, sans-serif;
+        font-size:0.8em;
+        color:#5a5a5a;
+    }
+.formAnswer {
+        background-color:#f5eede;
+        padding:0.3em;
+        margin-bottom:1em;
+        width: 100%;
+    }
+.pageSubContentTitle {
+            color:#8e8e8e;
+            font-size:1em;
+            font-family:Verdana, Arial, sans-serif;
+            margin-bottom:0.75em;
+    }
+.small {
+        width: 2.5em;
+    }
+.medium {
+        width: 15em;
+    }
+.long {
+        width: 30em;
+    }
+
+span.invalid, span.missing {
+        display: inline;
+        margin-left: 1em;
+        font-weight: bold;
+        font-style: italic;
+        font-family: Arial, Verdana, sans-serif;
+        color: #f66;
+        font-size: 0.9em;
+    }
+
+.noticeMessage {
+        display: block;
+        float: right;
+        font-weight: normal;
+        font-family:Arial, Verdana, sans-serif;
+        color:#663;
+        font-size:0.9em;
+    }
+    /* group multiple buttons in a row */
+    div .dojoButton {
+        float: left;
+        margin-left: 10px;
+    }
+</style>

Added: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/admin/importer-view.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/admin/importer-view.vm?rev=592266&view=auto
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/admin/importer-view.vm (added)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/admin/importer-view.vm Mon Nov  5 20:30:15 2007
@@ -0,0 +1,208 @@
+#*
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+*#
+#set($rc = $renderRequest.getAttribute("org.apache.jetspeed.request.RequestContext"))
+#set($req = $rc.Request)
+#set($app = $renderRequest.getContextPath())
+#set($rooturl = "${req.scheme}://${req.serverName}:${req.serverPort}${req.contextPath}/")
+#set($treeName = $renderRequest.getParameter("treeName"))
+#set($renderURL = $renderResponse.createRenderURL())
+#set($actionURL = $renderResponse.createActionURL())
+#set($status = $renderRequest.getPortletSession().getAttribute("status"))
+<script>
+	function buildExportquery(){
+		var users = document.getElementById('users');     
+		if(users.checked)
+		{
+			users.value = 'y';
+		}
+		else
+		{
+		    users.value = 'n';
+		}
+		var profiling = document.getElementById('profiling');     
+		if(profiling.checked)
+		{
+			profiling.value='y';
+		}		
+		else
+		{
+			profiling.value='n';
+		}
+		var capabilities = document.getElementById('capabilities');     
+		if(capabilities.checked)
+		{
+			capabilities.value='y';
+		}				
+		else
+		{
+			capabilities.value='n';
+		}						
+		var permissions = document.getElementById('permissions');     
+		if(permissions.checked)
+		{
+			permissions.value='y';
+		}				
+		else
+		{
+			permissions.value='n';
+		}						
+		var names = new Array("users", "profiles","capabilities", "permissions");
+		var values = new Array(users.value,profiling.value,capabilities.value,permissions.value);
+		ajaxInvoke("jetspeedexport", names, values, new exportHandler() );     		
+	}
+	function exportHandler()
+	{
+		this.populate = function(xml) 
+		{
+			var path = xml.getElementsByTagName("link");
+			if (path != null && path.length > 0)
+			{    
+			   for (ix=0; ix < path.length; ix++)
+			   {
+				  var refName = path[ix].firstChild.nodeValue;
+			   }
+			}
+			var pgCol = document.getElementById("exportAns");
+			var	a = document.createElement("a");
+			a.innerHTML ='Download';
+			a.href = refName;
+			a.setAttribute("target","_blank");
+			a.setAttribute("onClick","javascript:downloadObject()");
+			pgCol.appendChild(a);              
+		}     
+		this.failure = function(data)
+		{
+		}
+	}	
+	function downloadObject()
+	{
+		document.getElementById("exportAns").innerHTML = '';
+	}	
+	function ajaxInvoke(action, names, values, handler)
+	{	
+		var contextPath = document.location.protocol + "/" + "/" + document.location.host + "$req.ContextPath";
+		var requestUrl = contextPath + "/ajaxapi?action=" + action;		
+		if (names != null)
+		{
+			for (var ix=0;  ix<names.length; ix++)
+			{
+				requestUrl = requestUrl + "&" + names[ix] + "=" + encodeURIComponent(values[ix]);
+			}    
+		}
+		//alert(' url ' + requestUrl);
+		var mimeType = "text/xml";
+		dojo.io.bind({
+		url: requestUrl,
+	      mimetype: mimeType,
+	      load: function( type, data, evt )
+	      {
+	        var success = false;
+	        var statusElmt = data.getElementsByTagName( "status" );
+	        if ( statusElmt != null )
+	        {
+	            var successVal = statusElmt[0].firstChild.nodeValue;
+	            if ( successVal == "success" )
+	            {            
+	                handler.populate(data);
+	                success = true;                
+	            }                   
+	        }
+	        if ( ! success )
+	        {
+	            var textContent = dojo.dom.innerXML( data );
+	            if ( ! textContent )
+	                textContent = ( data != null ? "!= null (IE no XMLSerializer)" : "null" );
+	            // dojo.raise( "saveEntrySubmit failure url=" + requestUrl + "  xml-content=" + textContent );
+	            if (data instanceof XMLDocument)
+	            {
+	                var reason = retrieveElementValue("reason", data);
+	                alert("Portal Communication Failure: " + reason);               
+	                handler.failure(reason);
+	            }
+	            else
+	                alert("Unknown Portal Communication Failure");                               
+	        }
+	    },    
+	    error: function( type, error )
+	    {
+	        var msg = "Portal Communication Error: " + requestUrl + " type: " + type + jetspeed.url.formatBindError( error );
+	        // dojo.raise(msg);
+	        alert(msg);
+	        handler.failure(msg);
+	    }
+	    });     
+	}
+</script>
+<table width="100%" height="194" border="1">
+  <tr>
+    <form><td width="40%" height="188">
+	<table width="97%" border="1">
+      <tr>
+        <td colspan="2"><div align="left"><b>Export</b></div></td>
+      </tr>
+      <tr>
+        <td colspan="2"><input type="checkbox" name="users" id="users" value="n">
+          Users/Groups/Roles</td>
+      </tr>
+      <tr>
+        <td colspan="2"><input type="checkbox" name="profiling" id="profiling" value="n">
+          Profiling Rules </td>
+      </tr>
+      <tr>
+        <td colspan="2"><input type="checkbox" name="Capabilities" id="capabilities" value="n">
+          Capabilities (Mimetypes, mediatypes, capabilities,clients)</td>		  
+	  </tr>
+      <tr>
+        <td colspan="2"><input type="checkbox" name="permissions"  id="permissions" value="n">
+          Permissions</td>
+      </tr>	  
+	  <tr>
+		  <td><input type="button" value="Export" onClick="javascript:buildExportquery();"></td>
+		  <td id='exportAns'></td>
+      </tr>
+    </table>
+	</td>
+    </form>
+    <td width="60%">
+	<form action="$actionURL" method="post" name="importObject" enctype="multipart/form-data">
+	<table width="100%" border="1">
+      <tr>
+        <td><div><b>Import</b></div></td>
+      </tr>
+#if($status != '')
+	#if($status == 'true')
+      <tr>
+        <td>File imported succesfully</td>
+      </tr>	  
+	 #end 
+#end
+      <tr>
+        <td>Choose file to import 
+          <input type="file" name="importFile"></td>
+      </tr>
+      <tr>
+        <td>Please select xml file to import, containing jetspeed objects</td>
+      </tr>
+      <tr>
+        <td>&nbsp;</td>
+      </tr>
+      <tr>
+        <td><input type="button" value="Import" onClick="javascript:document.importObject.submit();"></td>
+      </tr>
+    </table></form></td>
+  </tr>
+</table>
\ No newline at end of file

Added: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/jetspeedSchema.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/jetspeedSchema.vm?rev=592266&view=auto
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/jetspeedSchema.vm (added)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/jetspeedSchema.vm Mon Nov  5 20:30:15 2007
@@ -0,0 +1,21 @@
+#*
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+*#
+<js>
+    <status>$status</status>
+    <action>$action</action>
+    <link>$link</link>
+</js>
\ No newline at end of file

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/layout/impl/BasePortletAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/layout/impl/BasePortletAction.java?rev=592266&r1=592265&r2=592266&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/layout/impl/BasePortletAction.java (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/layout/impl/BasePortletAction.java Mon Nov  5 20:30:15 2007
@@ -164,6 +164,14 @@
         return parameter;
     }
     
+    public String getNonNullActionParameter(RequestContext requestContext, String name)
+    {
+        String result = getActionParameter(requestContext, name);
+        if (result == null)
+            return "";
+        return result;
+    }
+    
     public Fragment getParentFragmentById(String id, Fragment root)
     {
         if ( id == null )

Added: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/layout/impl/ExportJetspeedSchema.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/layout/impl/ExportJetspeedSchema.java?rev=592266&view=auto
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/layout/impl/ExportJetspeedSchema.java (added)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/layout/impl/ExportJetspeedSchema.java Mon Nov  5 20:30:15 2007
@@ -0,0 +1,188 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.layout.impl;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.JetspeedActions;
+import org.apache.jetspeed.ajax.AjaxAction;
+import org.apache.jetspeed.ajax.AjaxBuilder;
+import org.apache.jetspeed.layout.PortletActionSecurityBehavior;
+import org.apache.jetspeed.page.PageManager;
+import org.apache.jetspeed.request.RequestContext;
+import org.apache.jetspeed.serializer.JetspeedSerializer;
+import org.apache.jetspeed.serializer.JetspeedSerializerFactory;
+
+/**
+ * Exporting the object using Ajax command
+ * 
+ * @author <a href="mailto:firevelocity@gmail.com">Vivek Kumar</a>
+ * @version $Id$
+ */
+public class ExportJetspeedSchema extends BaseGetResourceAction implements
+        AjaxAction, AjaxBuilder, Constants
+{
+
+    protected Log log = LogFactory.getLog(GetFolderAction.class);
+
+    protected PageManager castorPageManager;
+
+    protected JetspeedSerializerFactory serializerFactory;
+
+    protected String pageRoot;
+
+    // categories of export
+    private static final String USERS = "users";
+    private static final String GROUPS = "groups";
+    private static final String ROLES = "roles";
+    private static final String PERMISSIONS = "permissions";
+    private static final String PROFILES = "profiles";
+    private static final String CAPABILITIES = "capabilities";
+
+    String pathSeprator = System.getProperty("file.separator");
+
+    public ExportJetspeedSchema(String template, String errorTemplate,
+            PageManager pageManager,
+            PortletActionSecurityBehavior securityBehavior,
+            JetspeedSerializerFactory serializerFactory,
+            String dir)
+    {
+        super(template, errorTemplate, pageManager, securityBehavior);
+        this.serializerFactory = serializerFactory;
+        this.pageRoot = dir;
+    }
+
+    public boolean run(RequestContext requestContext, Map resultMap)
+    {
+        boolean success = true;
+        String status = "success";
+        String userName = requestContext.getUserPrincipal().toString();
+        Map settings = new HashMap();
+        String exportFileName = getUserFolder(userName, false) + pathSeprator
+                + "ldapExport.xml";
+        try
+        {
+            resultMap.put(ACTION, "export");
+            if (false == checkAccess(requestContext, JetspeedActions.VIEW))
+            {
+                success = false;
+                resultMap.put(REASON, "Insufficient access to get portlets");
+                return success;
+            }
+            settings.put(JetspeedSerializer.KEY_PROCESS_USERS, 
+                    getNonNullActionParameter(requestContext, USERS).equalsIgnoreCase("y") ? Boolean.TRUE : Boolean.FALSE);
+            settings.put(JetspeedSerializer.KEY_PROCESS_PERMISSIONS, 
+                    getNonNullActionParameter(requestContext, PERMISSIONS).equalsIgnoreCase("y") ? Boolean.TRUE : Boolean.FALSE);
+            settings.put(JetspeedSerializer.KEY_PROCESS_PROFILER, 
+                    getNonNullActionParameter(requestContext, PROFILES).equalsIgnoreCase("y") ? Boolean.TRUE : Boolean.FALSE);
+            settings.put(JetspeedSerializer.KEY_PROCESS_CAPABILITIES, 
+                    getNonNullActionParameter(requestContext, CAPABILITIES).equalsIgnoreCase("y") ? Boolean.TRUE : Boolean.FALSE);
+            if (!cleanUserFolder(userName)) 
+            {
+                resultMap.put(STATUS, "failure");
+                resultMap.put(REASON, "Could not create temp files on disk.");
+                success = false;
+                return success;
+            }
+            settings.put(JetspeedSerializer.KEY_OVERWRITE_EXISTING,
+                    Boolean.TRUE);
+            settings.put(JetspeedSerializer.KEY_BACKUP_BEFORE_PROCESS,
+                    Boolean.FALSE);
+            JetspeedSerializer serializer = serializerFactory.create(JetspeedSerializerFactory.PRIMARY);                
+            serializer.exportData("jetspeedadmin_export_process", exportFileName, settings);
+            requestContext.getRequest().getSession().setAttribute("file", userName + "_ldapExport.xml");
+            resultMap.put("link", getDownloadLink(requestContext, "tmpExport.xml", userName));
+
+            resultMap.put(STATUS, status);
+        } catch (Exception e)
+        {
+            // Log the exception
+            e.printStackTrace();
+            log.error("exception while getting folder info", e);
+            resultMap.put(STATUS, "failure");
+            resultMap.put(REASON, e.getMessage());
+            // Return a failure indicator
+            success = false;
+        }
+        return success;
+    }
+
+    private String getDownloadLink(RequestContext requestContext,
+            String ObjectName, String userName) throws Exception
+    {
+        String link = "";
+        String basePath = requestContext.getRequest().getContextPath()
+                + "/fileserver/_content/";
+        link = basePath + userName + "/" + ObjectName;
+        return link;
+    }
+
+    private boolean cleanUserFolder(String userName)
+    {
+        boolean success = false;
+        synchronized (this)
+        {
+            String folder = getUserFolder(userName, false);
+            File dir = new File(pageRoot + pathSeprator + userName + ".zip");
+            if (dir.exists()) dir.delete();
+
+            dir = new File(folder);
+            if (dir.exists())
+            {
+                success = deleteDir(dir);
+            }
+            success = dir.mkdir();
+        }
+        return success;
+    }
+
+    private boolean deleteDir(File dir)
+    {
+        if (dir.exists())
+        {
+            File[] files = dir.listFiles();
+            for (int i = 0; i < files.length; i++)
+            {
+                if (files[i].isDirectory())
+                {
+                    deleteDir(files[i]);
+                } else
+                {
+                    files[i].delete();
+                }
+            }
+        }
+        return (dir.delete());
+    }
+
+    private String getUserFolder(String userName, boolean fullPath)
+    {
+        if (pathSeprator == null || pathSeprator.equals(""))
+            pathSeprator = "/";
+        if (fullPath)
+        {
+            return userName + pathSeprator;
+        } else
+        {
+            return pageRoot + pathSeprator + userName;
+        }
+    }
+}

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/maven.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/maven.xml?rev=592266&r1=592265&r2=592266&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/maven.xml (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/maven.xml Mon Nov  5 20:30:15 2007
@@ -34,9 +34,11 @@
         <copy todir='${maven.build.dir}/assembly/' file='../../src/webapp/WEB-INF/assembly/security-spi-atn.xml'/>
         <copy todir='${maven.build.dir}/assembly/' file='../../src/webapp/WEB-INF/assembly/security-spi-atz.xml'/>
         <copy todir='${maven.build.dir}/assembly/' file='../../src/webapp/WEB-INF/assembly/transaction.xml'/>        
-        <copy todir='${maven.build.dir}/assembly/' file='../../src/webapp/WEB-INF/assembly/registry.xml'/>        
         <copy todir='${maven.build.dir}/assembly/' file='../../src/webapp/WEB-INF/assembly/prefs.xml'/>                
-        <copy todir='${maven.build.dir}/assembly/' file='../../src/webapp/WEB-INF/assembly/alternate/request-context.xml'/>                
+        <copy todir='${maven.build.dir}/assembly/' file='../../src/webapp/WEB-INF/assembly/cache.xml'/>                        	        	
+        <copy todir='${maven.build.dir}/assembly/' file='../../etc/registration/assembly/registry.xml'/>        
+
+  <!--        <copy todir='${maven.build.dir}/assembly/' file='../../src/webapp/WEB-INF/assembly/alternate/request-context.xml'/>                -->
     </goal>
     
 	
@@ -54,7 +56,7 @@
 	            <pathelement path="${maven.build.dest}"/>
 	            <pathelement path="${org.apache.jetspeed.production.jdbc.drivers.path}"/>                          
 	          </classpath>
-	        	<arg line="-E c:/temp/exportprefs.xml -b target/assembly/boot/ -c target/assembly/ -O PREFS "/>  
+	        	<arg line="-E ./target/exportprefs.xml -b target/assembly/boot/ -c target/assembly/ -O PREFS "/>  
 	            <sysproperty key="org.apache.jetspeed.database.url" value="${org.apache.jetspeed.production.database.url}"/>
 	            <sysproperty key="org.apache.jetspeed.database.driver" value="${org.apache.jetspeed.production.database.driver}"/>
 	            <sysproperty key="org.apache.jetspeed.database.user" value="${org.apache.jetspeed.production.database.user}"/>
@@ -85,7 +87,7 @@
             <pathelement path="${maven.build.dest}"/>
             <pathelement path="${org.apache.jetspeed.production.jdbc.drivers.path}"/>                          
           </classpath>
-            <arg line="-E c:/temp/export100.xml -b target/assembly/boot/ -c target/assembly/"/>  
+            <arg line="-E ./target/export100.xml -b target/assembly/boot/ -c target/assembly/"/>  
             <sysproperty key="org.apache.jetspeed.database.url" value="${org.apache.jetspeed.production.database.url}"/>
             <sysproperty key="org.apache.jetspeed.database.driver" value="${org.apache.jetspeed.production.database.driver}"/>
             <sysproperty key="org.apache.jetspeed.database.user" value="${org.apache.jetspeed.production.database.user}"/>

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerApplication.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerApplication.java?rev=592266&r1=592265&r2=592266&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerApplication.java (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerApplication.java Mon Nov  5 20:30:15 2007
@@ -40,12 +40,13 @@
  * <p>-b bootPath : directory to Spring boot files,   overwrite the default assembly/boot/ or bootPath  property in properties file)</p>  
  * <p>-c configPath : directory to Spring config files,   overwrite the default assembly/ or configPath property in properties file)</p>
  * 
- * <p>-O optionstring : overwrite defrault "ALL,REPLACE"</p>
+ * <p>-O optionstring : overwrite default "ALL,REPLACE"</p>
  * <p>optionstring: 
  *      ALL - extract/import all (with exception of PREFERENCES)
- *      USER - extract/import users
+ *      USER - extract/import users, groups, roles
  *      CAPABILITIES - extract/import capabilities
- *      PROFILE = extract/import profile settings (for export requires USER) 
+ *      PROFILE = extract/import profile settings (for export requires USER)
+ *      PERMISSIONS = extract/import permissions 
  *      PREFS = extract/import  portlet preferences (ignored if any of the above is set)
  *      
  *      NOOVERWRITE = don't overwrite existing file (for export)
@@ -72,10 +73,22 @@
  * @author <a href="mailto:hajo@bluesunrise.com">Hajo Birthelmer</a>
  * @version $Id: $
  */
-public class JetspeedSerializerApplication
+public class JetspeedSerializerApplication implements JetspeedSerializerFactory
 {
     public static final String JNDI_DS_NAME = "jetspeed";    
     
+    public JetspeedSerializerApplication()
+    {        
+    }
+    
+    public JetspeedSerializer create(String serializerType)
+    {
+        if (serializerType.equals(JetspeedSerializerFactory.SECONDARY))
+            return new JetspeedSerializerSecondaryImpl();
+        else
+            return new JetspeedSerializerImpl();           
+    }
+    
     public static void main(String[] args)
     {
         String propertyFileName = null;
@@ -265,39 +278,42 @@
                     settings.put(JetspeedSerializer.KEY_PROCESS_USERS, Boolean.TRUE);
                     settings.put(JetspeedSerializer.KEY_PROCESS_CAPABILITIES, Boolean.TRUE);
                     settings.put(JetspeedSerializer.KEY_PROCESS_PROFILER, Boolean.TRUE);
+                    settings.put(JetspeedSerializer.KEY_PROCESS_PERMISSIONS, Boolean.TRUE);                    
                     settings.put(JetspeedSerializer.KEY_PROCESS_USER_PREFERENCES, Boolean.FALSE);
                     processHelper = 1;
                 }
-                else
-                if (o.equalsIgnoreCase("user"))
+                else if (o.equalsIgnoreCase("user"))
                 {
-                    settings.put(JetspeedSerializer.KEY_PROCESS_USERS, Boolean.TRUE);
+                    settings.put(JetspeedSerializer.KEY_PROCESS_USERS,
+                            Boolean.TRUE);
                     processHelper = 1;
-                }
-                else 
-                    if (o.equalsIgnoreCase("PREFS"))
-                    {
-                        settings.put(JetspeedSerializer.KEY_PROCESS_USER_PREFERENCES, Boolean.TRUE);
-                		processHelper = 2;
-                    }
-                    else 
-                        if (o.equalsIgnoreCase("CAPABILITIES"))
-                        {
-                            settings.put(JetspeedSerializer.KEY_PROCESS_CAPABILITIES, Boolean.TRUE);
-                            processHelper = 1;
-                        }
-                        else 
-                            if (o.equalsIgnoreCase("PROFILE"))
-                            {
-                                settings.put(JetspeedSerializer.KEY_PROCESS_PROFILER, Boolean.TRUE);
-                                processHelper = 1;
-                            }
-                            else 
-                                if (o.equalsIgnoreCase("NOOVERWRITE"))
-                                    settings.put(JetspeedSerializer.KEY_OVERWRITE_EXISTING, Boolean.FALSE);
-                                else 
-                                    if (o.equalsIgnoreCase("BACKUP"))
-                                        settings.put(JetspeedSerializer.KEY_BACKUP_BEFORE_PROCESS, Boolean.TRUE);
+                } else if (o.equalsIgnoreCase("PREFS"))
+                {
+                    settings.put(
+                            JetspeedSerializer.KEY_PROCESS_USER_PREFERENCES,
+                            Boolean.TRUE);
+                    processHelper = 2;
+                } else if (o.equalsIgnoreCase("CAPABILITIES"))
+                {
+                    settings.put(JetspeedSerializer.KEY_PROCESS_CAPABILITIES,
+                            Boolean.TRUE);
+                    processHelper = 1;
+                } else if (o.equalsIgnoreCase("PROFILE"))
+                {
+                    settings.put(JetspeedSerializer.KEY_PROCESS_PROFILER,
+                            Boolean.TRUE);
+                    processHelper = 1;
+                } else if (o.equalsIgnoreCase("PERMISSIONS"))
+                {
+                    settings.put(JetspeedSerializer.KEY_PROCESS_PERMISSIONS,
+                            Boolean.TRUE);
+                    processHelper = 1;                    
+                } else if (o.equalsIgnoreCase("NOOVERWRITE"))
+                    settings.put(JetspeedSerializer.KEY_OVERWRITE_EXISTING,
+                            Boolean.FALSE);
+                else if (o.equalsIgnoreCase("BACKUP"))
+                    settings.put(JetspeedSerializer.KEY_BACKUP_BEFORE_PROCESS,
+                            Boolean.TRUE);
                 
             }
             

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerBase.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerBase.java?rev=592266&r1=592265&r2=592266&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerBase.java (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerBase.java Mon Nov  5 20:30:15 2007
@@ -34,6 +34,7 @@
 import org.apache.commons.configuration.PropertiesConfiguration;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.Jetspeed;
 import org.apache.jetspeed.components.ComponentManager;
 import org.apache.jetspeed.components.SpringComponentManager;
 import org.apache.jetspeed.engine.JetspeedEngineConstants;
@@ -46,7 +47,7 @@
     protected static final Log log = LogFactory.getLog(JetspeedSerializer.class);
 
     private ComponentManager cm = null;
-
+    private Object sem = new Object();
 
     int refCouter = 0;
 
@@ -66,9 +67,12 @@
     private static String ENCODING_STRING = "JETSPEED 2.1 - 2006";
     private static String JETSPEED = "JETSPEED";
     
-    
     protected final ComponentManager getCM()
     {
+        if (cm == null)
+        {
+            cm = Jetspeed.getComponentManager();
+        }
     	return cm;
     }
     
@@ -186,14 +190,15 @@
     public final  void importData(String importFileName, Map settings)
             throws SerializerException
     {
+        if (cm == null)
+        {
+            cm = Jetspeed.getComponentManager();
+        }        
         /** pre-processing homework... */
         XMLBinding binding = new XMLBinding();
         setupAliases(binding);
         checkSettings(settings);
-
-        
         setSnapshot(readFile(importFileName, binding));
-
         if (getSnapshot() == null)
             throw new SerializerException(
                     SerializerException.FILE_PROCESSING_ERROR
@@ -214,7 +219,7 @@
         /** ok, now we have a valid snapshot and can start processing it */
 
         /** ensure we can work undisturbed */
-        synchronized (cm)
+        synchronized (sem)
         {
             logMe("*********Reading data*********");
             this.processImport();
@@ -235,9 +240,12 @@
         XMLBinding binding = new XMLBinding();
         setupAliases(binding);
         checkSettings(settings);
-
+        if (cm == null)
+        {
+            cm = Jetspeed.getComponentManager();
+        }
         /** ensure we can work undisturbed */
-        synchronized (cm)
+        synchronized (sem)
         {
             /** get the snapshot construct */
             this.processExport(name, binding);

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerImpl.java?rev=592266&r1=592265&r2=592266&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerImpl.java (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerImpl.java Mon Nov  5 20:30:15 2007
@@ -182,14 +182,7 @@
     	super(appRoot,bootConfig,appConfig);
     }
 
- 
- 
-
- 
-  
-
-
-    /**
+     /**
      * reset instruction flags to default settings (all true)
      * 
      */
@@ -198,6 +191,7 @@
         setSetting(JetspeedSerializer.KEY_PROCESS_USERS, true);
         setSetting(JetspeedSerializer.KEY_PROCESS_CAPABILITIES, true);
         setSetting(JetspeedSerializer.KEY_PROCESS_PROFILER, true);
+        setSetting(JetspeedSerializer.KEY_PROCESS_PERMISSIONS, true);
         setSetting(JetspeedSerializer.KEY_OVERWRITE_EXISTING, true);
         setSetting(JetspeedSerializer.KEY_BACKUP_BEFORE_PROCESS, true);
     }
@@ -529,10 +523,11 @@
         
         JSGroups groups = null;
         JSRoles roles = null;
-
+        Iterator _it = null;
         groups = ((JSSeedData)getSnapshot()).getGroups();
-        
-        Iterator _it = groups.iterator();
+        if (groups != null)
+        {
+         _it = groups.iterator();
         while (_it.hasNext())
         {
         	String name = ((JSGroup)_it.next()).getName();
@@ -551,12 +546,15 @@
 	                            { "Group", e.getMessage()}));
 	        }
         }
+        }
     	logMe("recreateGroups - done");
     	logMe("processing roles");
 
         roles = ((JSSeedData)getSnapshot()).getRoles();
-        
+        if (roles!= null)
+        {      
         _it = roles.iterator();
+        
         while (_it.hasNext())
         {
         	String name = ((JSRole)_it.next()).getName();
@@ -575,15 +573,16 @@
 	                            { "Role", e.getMessage()}));
 	        }
         }
-    	logMe("recreateRoles - done");
+        }
+        logMe("recreateRoles - done");
     	logMe("processing users");
 
     	/** determine whether passwords can be reconstructed or not */
     	int passwordEncoding = compareCurrentSecurityProvider((JSSeedData)getSnapshot());
         JSUsers users = null;
         users = ((JSSeedData)getSnapshot()).getUsers();
-        
-        _it = users.iterator();
+        if(users!=null)
+        {_it = users.iterator();
         while (_it.hasNext())
         {
         	
@@ -711,8 +710,8 @@
 	                            { "User", e.getMessage()}));
 	        }
         }
+        }
     	logMe("recreateUsers - done");
-    	recreatePermissions();
     	return;
     }
     
@@ -796,17 +795,11 @@
                             .create("org.apache.jetspeed.security.PermissionManager"));
 
         Iterator list = null;
-        try
-        {
-        	list = ((JSSeedData)getSnapshot()).getPermissions().iterator();
-        } catch (Exception e)
+        JSPermissions permissions = ((JSSeedData)getSnapshot()).getPermissions();
+ 
+        if (permissions != null)
         {
-            throw new SerializerException(
-                    SerializerException.GET_EXISTING_OBJECTS
-                            .create(new String[]
-                            { "Permissions", e.getMessage()}));
-        }
-
+           list =  permissions.iterator();
         while (list.hasNext())
         {
             JSPermission _js = (JSPermission)list.next();
@@ -872,7 +865,10 @@
 	                                { "Permissions", e.getMessage()}));
 	            }
             }
-        }
+        }}else{ throw new SerializerException(
+                SerializerException.GET_EXISTING_OBJECTS
+                .create(new String[]
+                { "Permissions"}));}
     	logMe("recreatePermissions - done");
     }
 
@@ -903,20 +899,35 @@
         catch (Exception e)
         {
         	e.printStackTrace();
+        }  
+    }
+
+    private void importUserGroupRoles()
+    {
+        System.out.println("importUserGroupRoles - processing");
+        try
+        {
+            recreateRolesGroupsUsers();
         }
-  
+        catch (Exception e)
+        {
+            e.printStackTrace();
+        }  
+    }
+
+    private void importUserPrincipals()
+    {
+        System.out.println("importUserPrincipals - processing");
         try
         {
-            this.recreateRolesGroupsUsers();
             recreateUserPrincipalRules();
-        	
         }
         catch (Exception e)
         {
-        	e.printStackTrace();
-        }
+            e.printStackTrace();
+        }  
     }
-
+    
 
     /**
      * The workhorse for importing data
@@ -936,32 +947,32 @@
         {
             logMe("creating clients, mediatypes and mimetypes");
             importCapabilitiesInfrastructure();
-        }
-        
+        }        
         /**
          * the order is important, since profiling rules are referenced by the user 
          * 
-         */
-        
+         */        
         if (this.getSetting(JetspeedSerializer.KEY_PROCESS_PROFILER))
         {
             logMe("collecting permissions, profiling rules and users/proups etc. etc.");
             importProfiler();
-        } else
+        } 
+        if (this.getSetting(JetspeedSerializer.KEY_PROCESS_USERS))
         {
-            logMe("permissions, rules etc. skipped ");
-	       
-	        if (this.getSetting(JetspeedSerializer.KEY_PROCESS_USERS))
-	        {
-	            logMe("creating users/roles/groups");
-	            this.recreateRolesGroupsUsers();
-	        }
-	        else
-	        {
-	            logMe("users skipped - ensure we have valid users to work with");
-	            exportUsers();
-	        }
+            logMe("creating users/roles/groups");
+            this.importUserGroupRoles();
+        }
+        if (this.getSetting(JetspeedSerializer.KEY_PROCESS_PROFILER) || this.getSetting(JetspeedSerializer.KEY_PROCESS_USERS))
+        {
+            logMe("collecting user principals");
+            this.importUserPrincipals();
         } 
+        
+        if (this.getSetting(JetspeedSerializer.KEY_PROCESS_PERMISSIONS))        
+        {
+            logMe("permissions, rules etc. skipped ");
+            recreatePermissions();            
+        }        
     }
 
     /**
@@ -993,18 +1004,23 @@
         {
             logMe("collecting users");
             exportUsers();
-
-            /** permissions require users - hence inside this scope */
-            if (this.getSetting(JetspeedSerializer.KEY_PROCESS_PROFILER))
-            {
-                logMe("collecting permissions, profiling rules etc.");
-                this.getProfilingRules();
-            } else
-                logMe(" profiling rules etc. skipped");
-
         } else
             logMe("users skipped");
 
+        if (this.getSetting(JetspeedSerializer.KEY_PROCESS_PROFILER))
+        {
+            logMe("collecting profiling rules");
+            this.getProfilingRules();
+        } else
+            logMe(" profiling rules skipped");
+
+        if (this.getSetting(JetspeedSerializer.KEY_PROCESS_PERMISSIONS))
+        {
+            logMe("collecting permissions");
+            this.getPermissions();
+        } else
+            logMe(" permissions skipped");
+        
     }
 
     /**
@@ -1718,7 +1734,6 @@
      */
     private void getProfilingRules() throws SerializerException
     {
-        getPermissions();
         Profiler pm = (Profiler) getCM()
                 .getComponent("org.apache.jetspeed.profiler.Profiler");
         if (pm == null)

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerSecondaryImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerSecondaryImpl.java?rev=592266&r1=592265&r2=592266&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerSecondaryImpl.java (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerSecondaryImpl.java Mon Nov  5 20:30:15 2007
@@ -129,7 +129,8 @@
 		setSetting(JetspeedSerializer.KEY_PROCESS_USERS, false);
 		setSetting(JetspeedSerializer.KEY_PROCESS_CAPABILITIES, false);
 		setSetting(JetspeedSerializer.KEY_PROCESS_PROFILER, false);
-		setSetting(JetspeedSerializer.KEY_PROCESS_USER_PREFERENCES, true);
+        setSetting(JetspeedSerializer.KEY_PROCESS_PERMISSIONS, false);
+        setSetting(JetspeedSerializer.KEY_PROCESS_USER_PREFERENCES, false);
 		setSetting(JetspeedSerializer.KEY_OVERWRITE_EXISTING, true);
 		setSetting(JetspeedSerializer.KEY_BACKUP_BEFORE_PROCESS, true);
 	}

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/CommonPortletServices.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/CommonPortletServices.java?rev=592266&r1=592265&r2=592266&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/CommonPortletServices.java (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/CommonPortletServices.java Mon Nov  5 20:30:15 2007
@@ -54,4 +54,5 @@
     public final static String CPS_DECORATOR_CACHE = "cps:decorationContentCache";
     public final static String CPS_PORTLET_CACHE = "cps:portletContentCache";
     public final static String CPS_AUDIT_ACTIVITY = "cps:AuditActivity";
+    public final static String CPS_JETSPEED_SERIALIZER_FACTORY = "cps:JetspeedSerializerFactory";
 }

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/serializer/JetspeedSerializer.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/serializer/JetspeedSerializer.java?rev=592266&r1=592265&r2=592266&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/serializer/JetspeedSerializer.java (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/serializer/JetspeedSerializer.java Mon Nov  5 20:30:15 2007
@@ -73,6 +73,9 @@
     public final static String KEY_PROCESS_PROFILER = "process_profiler"
             .intern();
 
+    public final static String KEY_PROCESS_PERMISSIONS = "process_permissions"
+        .intern();
+    
     public final static String KEY_PROCESS_USER_PREFERENCES = "process_user_preferences"
             .intern();
     public final static String KEY_PROCESS_PORTAL_PREFERENCES = "process_portal_preferences"
@@ -185,7 +188,7 @@
     public String getDefaultIndent();
 
     /**
-     * reelase the resources etc.
+     * release the resources etc.
      * 
      */
     public void closeUp();

Added: portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/serializer/JetspeedSerializerFactory.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/serializer/JetspeedSerializerFactory.java?rev=592266&view=auto
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/serializer/JetspeedSerializerFactory.java (added)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/serializer/JetspeedSerializerFactory.java Mon Nov  5 20:30:15 2007
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.serializer;
+
+
+/**
+ * Jetspeed Serializer Factory
+ * 
+ * <p>Interface for creating serializers. Serializer keep some state so they should be recreated as needed
+ * We will revisit this class in the refactoring in 2.2 as Im not really sure why we need a primary and secondary class
+ *  but I think its related to the dependencies fixed in these issues, see:
+ * http://issues.apache.org/jira/browse/JS2-771 and http://issues.apache.org/jira/browse/JS2-770 
+ * </p> 
+ */
+public interface JetspeedSerializerFactory
+{
+
+    /** Create basic Jetspeed Serializer */
+    public final static String PRIMARY = "primary";
+    /** Create a secondary Jetspeed Serializer (registry data) */
+    public final static String SECONDARY = "secondary";
+    
+    /**
+     * Create a Jetspeed Serializer of one of the two supported types
+     * @param serializerType eithe PRIMARY OR SECONDARY
+     * @return
+     */
+    public JetspeedSerializer create(String serializerType);
+    
+}

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/ajax-layout.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/ajax-layout.xml?rev=592266&r1=592265&r2=592266&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/ajax-layout.xml (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/ajax-layout.xml Mon Nov  5 20:30:15 2007
@@ -557,6 +557,27 @@
         <value>private</value>
     </constructor-arg>
 </bean>
+<bean id="AjaxJetspeedSchemaExportObject"
+    class="org.apache.jetspeed.layout.impl.ExportJetspeedSchema">
+    <constructor-arg index="0">
+        <value>org/apache/jetspeed/layout/ajax-xml/jetspeedSchema.vm</value>
+    </constructor-arg>
+    <constructor-arg index="1">
+        <value>org/apache/jetspeed/layout/ajax-xml/error.vm</value>
+    </constructor-arg>
+    <constructor-arg index='2'>    
+        <ref bean="org.apache.jetspeed.page.PageManager"/>        
+    </constructor-arg>
+    <constructor-arg index='3'>
+        <ref bean="PortletActionSecurityBehavior"/>
+    </constructor-arg>
+    <constructor-arg index='4'>
+        <ref bean="org.apache.jetspeed.serializer.JetspeedSerializerFactory"/>
+    </constructor-arg>
+	<constructor-arg index='5'>
+		<value>${java.io.tmpdir}</value>
+    </constructor-arg>
+</bean>
     
 <bean id="AjaxExportObject"
     class="org.apache.jetspeed.layout.impl.ExportObject">
@@ -666,6 +687,9 @@
             <entry key="export">
                 <ref bean="AjaxExportObject"/>                
             </entry>                        
+            <entry key="jetspeedexport">
+                <ref bean="AjaxJetspeedSchemaExportObject"/>                
+            </entry>      			
         </map>
     </constructor-arg>    
 </bean>    

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/jetspeed-services.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/jetspeed-services.xml?rev=592266&r1=592265&r2=592266&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/jetspeed-services.xml (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/jetspeed-services.xml Mon Nov  5 20:30:15 2007
@@ -126,6 +126,9 @@
           <entry key="AuditActivity">
           	<ref bean="org.apache.jetspeed.audit.AuditActivity"/>
           </entry>          
+          <entry key="JetspeedSerializerFactory">
+          	<ref bean="org.apache.jetspeed.serializer.JetspeedSerializerFactory"/>
+          </entry>
 <!-- first uncomment the below service bean in security-spi-atn.xml
          <entry key="PasswordEncodingService">
            <ref bean="org.apache.jetspeed.security.PasswordEncodingService" />

Added: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/serializer.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/serializer.xml?rev=592266&view=auto
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/serializer.xml (added)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/serializer.xml Mon Nov  5 20:30:15 2007
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<beans>
+
+  <bean id="org.apache.jetspeed.serializer.JetspeedSerializerFactory" 
+  	   class="org.apache.jetspeed.serializer.JetspeedSerializerApplication" />
+</beans>

Added: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/min-pages/Administrative/portal-admin/export.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/min-pages/Administrative/portal-admin/export.psml?rev=592266&view=auto
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/min-pages/Administrative/portal-admin/export.psml (added)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/min-pages/Administrative/portal-admin/export.psml Mon Nov  5 20:30:15 2007
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+    http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<page id="export"
+    xmlns="http://portals.apache.org/jetspeed"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xsi:schemaLocation="http://portals.apache.org/jetspeed http://portals.apache.org/jetspeed-2/2.1/schemas/psml.xsd">
+  <defaults skin="blue" layout-decorator="tigris" portlet-decorator="tigris"/>
+  <title>Import/Export Service</title>
+  <metadata name="short-title" xml:lang="es">Import-Export</metadata>
+
+  <fragment id="export-layout-1" type="layout" name="jetspeed-layouts::VelocityOneColumn">
+    <fragment id="export-2" type="portlet" name="j2-admin::PortalSchemaExporter"/>
+  </fragment>
+
+</page>

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/min-pages/Administrative/portal-admin/folder.metadata
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/min-pages/Administrative/portal-admin/folder.metadata?rev=592266&r1=592265&r2=592266&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/min-pages/Administrative/portal-admin/folder.metadata (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/min-pages/Administrative/portal-admin/folder.metadata Mon Nov  5 20:30:15 2007
@@ -32,6 +32,7 @@
   <document-order>entities.psml</document-order>
   <document-order>statistics.psml</document-order>  
   <document-order>tracking.psml</document-order>
+  <document-order>export.psml</document-order>
 
   <security-constraints>
     <security-constraints-ref>admin</security-constraints-ref>

Added: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/pages/Administrative/export.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/pages/Administrative/export.psml?rev=592266&view=auto
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/pages/Administrative/export.psml (added)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/pages/Administrative/export.psml Mon Nov  5 20:30:15 2007
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+    http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<page id="export"
+    xmlns="http://portals.apache.org/jetspeed"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xsi:schemaLocation="http://portals.apache.org/jetspeed http://portals.apache.org/jetspeed-2/2.1/schemas/psml.xsd">
+  <defaults skin="blue" layout-decorator="tigris" portlet-decorator="tigris"/>
+  <title>Import/Export Service</title>
+  <metadata name="short-title" xml:lang="es">Import-Export</metadata>
+
+  <fragment id="export-layout-1" type="layout" name="jetspeed-layouts::VelocityOneColumn">
+    <fragment id="export-2" type="portlet" name="j2-admin::PortalSchemaExporter"/>
+  </fragment>
+
+</page>

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/pages/Administrative/folder.metadata
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/pages/Administrative/folder.metadata?rev=592266&r1=592265&r2=592266&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/pages/Administrative/folder.metadata (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/pages/Administrative/folder.metadata Mon Nov  5 20:30:15 2007
@@ -34,6 +34,7 @@
   <document-order>palm.psml</document-order>
   <document-order>profiler.psml</document-order>
   <document-order>rpad.psml</document-order>
+  <document-order>export.psml</document-order>
 
   <menu name="page-navigations">
     <separator>



---------------------------------------------------------------------
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