portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r1595090 - in /portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets: serializer/PortalDataSerializer.java site/PortalSiteManager.java
Date Fri, 16 May 2014 02:43:36 GMT
Author: taylor
Date: Fri May 16 02:43:36 2014
New Revision: 1595090

URL: http://svn.apache.org/r1595090
Log:
JS2-874 - refactor Jetspeed API to use generics

Modified:
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/serializer/PortalDataSerializer.java
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/serializer/PortalDataSerializer.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/serializer/PortalDataSerializer.java?rev=1595090&r1=1595089&r2=1595090&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/serializer/PortalDataSerializer.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/serializer/PortalDataSerializer.java
Fri May 16 02:43:36 2014
@@ -16,16 +16,6 @@
  */
 package org.apache.jetspeed.portlets.serializer;
 
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Serializable;
-import java.text.MessageFormat;
-import java.util.HashMap;
-import java.util.Map;
-
 import org.apache.jetspeed.portlets.AdminPortletWebPage;
 import org.apache.jetspeed.portlets.wicket.component.DynamicResourceLink;
 import org.apache.jetspeed.portlets.wicket.component.ResourceProvider;
@@ -45,6 +35,16 @@ import org.apache.wicket.model.ResourceM
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+import java.text.MessageFormat;
+import java.util.HashMap;
+import java.util.Map;
+
 /**
  * Wicket Serializer WebPage for import and export of portal data.
  * 
@@ -281,7 +281,7 @@ public class PortalDataSerializer extend
     {
         private static final long serialVersionUID = 1L;
 
-        private final Map<String, Boolean> settings = new HashMap<String, Boolean>();
+        private final Map<String, Object> settings = new HashMap<String, Object>();
         {
             settings.put(JetspeedSerializer.KEY_PROCESS_USERS, Boolean.TRUE);
             settings.put(JetspeedSerializer.KEY_PROCESS_CAPABILITIES, Boolean.TRUE);

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java?rev=1595090&r1=1595089&r2=1595090&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
Fri May 16 02:43:36 2014
@@ -16,22 +16,6 @@
  */
 package org.apache.jetspeed.portlets.site;
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Serializable;
-import java.util.*;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-import javax.portlet.PortletRequest;
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.TreeModel;
-
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.jetspeed.PortalReservedParameters;
@@ -125,6 +109,29 @@ import org.apache.wicket.validation.vali
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.portlet.PortletRequest;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreeModel;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Locale;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
 /**
  * Manage the Portal Site
  * 
@@ -4056,7 +4063,7 @@ public class PortalSiteManager extends A
     private void getMenus(JetspeedDocument document,
             DefaultMutableTreeNode menuNode)
     {
-        MenuDefinition definitaion = null;
+        MenuDefinition definition = null;
         DefaultMutableTreeNode menu = null;
         List menuDefinitions = null;
         if (getUserSelectedNode().getDocType() == FileType.Folder)
@@ -4069,11 +4076,11 @@ public class PortalSiteManager extends A
                     .getMenuDefinitions();
         }
         if (menuDefinitions == null || menuDefinitions.size() == 0) { return; }
-        Iterator menuItreator = menuDefinitions.iterator();
-        while (menuItreator.hasNext())
+        Iterator menuIterator = menuDefinitions.iterator();
+        while (menuIterator.hasNext())
         {
-            definitaion = (MenuDefinition) menuItreator.next();
-            menu = new DefaultMutableTreeNode(new MenuTreeNode(definitaion.getName(),document.getPath(),document.getType(),getServiceLocator()));
+            definition = (MenuDefinition) menuIterator.next();
+            menu = new DefaultMutableTreeNode(new MenuTreeNode(definition.getName(),document.getPath(),document.getType(),getServiceLocator()));
             menuNode.add(menu);
         }
     }



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