portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r640072 - in /portals/jetspeed-2/portal/trunk: components/jetspeed-serializer/src/main/java/org/apache/jetspeed/serializer/ jetspeed-api/src/main/java/org/apache/jetspeed/ jetspeed-api/src/main/java/org/apache/jetspeed/serializer/ jetspeed-...
Date Sat, 22 Mar 2008 20:22:26 GMT
Author: ate
Date: Sat Mar 22 13:22:25 2008
New Revision: 640072

URL: http://svn.apache.org/viewvc?rev=640072&view=rev
Log:
Continuing and restoring part of the work I've already did for JS2-771.
This is going to break j2-admin for a while, which still is tied to the "old" 2.1.3 JetspeedSerializer
and JetspeedSerializerFactory service.
Fixing and updating j2-admin will be done in a short while: first priority is now getting
the trunk itself (especially the tests) working correctly again.  

Added:
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/serializer.xml
  (with props)
Removed:
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializerFactory.java
Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-serializer/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializerImpl.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializer.java
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-services.xml

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-serializer/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-serializer/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializerImpl.java?rev=640072&r1=640071&r2=640072&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-serializer/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializerImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-serializer/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializerImpl.java
Sat Mar 22 13:22:25 2008
@@ -183,20 +183,6 @@
         }
     }
 
-    public void setComponentManager(ComponentManager cm)
-            throws SerializerException
-    {
-    }
-
-    public void initializeComponentManager(String appRoot, String[] bootConfig,
-            String[] appConfig) throws SerializerException
-    {
-    }
-
-    public void closeUp()
-    {
-    }
-    
     protected Map getProcessSettings(Map settings)
     {
         Map processSettings = new HashMap(defaultSettings);

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java?rev=640072&r1=640071&r2=640072&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java
Sat Mar 22 13:22:25 2008
@@ -54,5 +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";
+    public final static String CPS_JETSPEED_SERIALIZER = "cps:JetspeedSerializer";
 }

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializer.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializer.java?rev=640072&r1=640071&r2=640072&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializer.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializer.java
Sat Mar 22 13:22:25 2008
@@ -16,10 +16,9 @@
  */
 package org.apache.jetspeed.serializer;
 
+import java.util.List;
 import java.util.Map;
 
-import org.apache.jetspeed.components.ComponentManager;
-
 /**
  * Jetspeed Serializer
  * <p>
@@ -43,86 +42,54 @@
 
     /** Password handling */
     /** Error in determening correct password handling */
-    public final static short ERROR_DECODING = -1;
+    short ERROR_DECODING = -1;
 
     /** the passwords are in clear text */
-    public final static short NO_DECODING = 0;
+    short NO_DECODING = 0;
 
     /**
      * the passwords are encoded and the provider is the same as the data
      * source, but is a 1-way algorithm
      */
-    public final static short PASSTHRU_REQUIRED = 1;
+    short PASSTHRU_REQUIRED = 1;
 
     /**
      * the passwords are encoded and the provider is the same as the data source
      * and we have a 2-way algorithm
      */
-    public final static short DECODING_SUPPORTED = 2;
+    short DECODING_SUPPORTED = 2;
 
     /** the passwords are encoded and the current provider is DIFFERENT.... */
-    public final static short INVALID_PASSWORDS = 3;
+    short INVALID_PASSWORDS = 3;
 
     /** export/import instructions */
 
-    public final static String KEY_PROCESS_USERS = "process_users".intern();
-    
-    public final static String KEY_LOGGER = "logger";
-    
-    public final static String KEY_PROCESS_CAPABILITIES = "process_capabilities"
-            .intern();
-
-    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"
-        .intern();
-
-    public final static String KEY_OVERWRITE_EXISTING = "overwrite_existing"
-            .intern();
-
-    public final static String KEY_BACKUP_BEFORE_PROCESS = "backup_before_process"
-            .intern();
-
-    /** export/import instructions secondary*/
-    public final static String KEY_PROCESS_ENTITIES = "process_entities".intern();
-    public final static String KEY_PROCESS_PREFERENCES = "process_preferences".intern();
-    
-    
+    String KEY_PROCESS_USERS = "process_users";
+    String KEY_PROCESS_CAPABILITIES = "process_capabilities";
+    String KEY_PROCESS_PROFILER = "process_profiler";
+    String KEY_PROCESS_USER_PREFERENCES = "process_user_preferences";
+    String KEY_PROCESS_PORTAL_PREFERENCES = "process_portal_preferences";
+    String KEY_PROCESS_ENTITIES = "process_entities";
+    String KEY_PROCESS_PREFERENCES = "process_preferences";
+    String KEY_LOGGER = "logger";
+    String KEY_OVERWRITE_EXISTING = "overwrite_existing";
+    String KEY_BACKUP_BEFORE_PROCESS = "backup_before_process";
     
     /**<p> the main tag in the XML file */
-    public final static String TAG_SNAPSHOT = "Snapshot"; 
-    public final static String TAG_SECONDARYSNAPSHOT = "SecondaryData"; 
+    String TAG_SNAPSHOT = "Snapshot"; 
+    
+    List getSerializers();
+    Map getDefaultSettings();
     
     /**
-     * hand the serializer an existing component manager to access the
-     * environment
-     * 
-     * @param cm
-     */
-    public void setComponentManager(ComponentManager cm)
-            throws SerializerException;
-
-    /**
-     * Create a component manager with the list of primary components (boot),
-     * the application components and the root path of the application
+     * Main routine to export the set of data elements and write them to the
+     * named XML file.
      * 
-     * @param appRoot
-     *            working directory
-     * @param bootConfig
-     *            boot (primary) file or files (wildcards are allowed)
-     * @param appConfig
-     *            application (secondary) file or files (wildcards are allowed)
-     * @return a newly initiated component manager
-     * @throws SerializerException
+     * @param name
+     *            of the snapshot
+     * @param exportFileName
      */
-    public void initializeComponentManager(String appRoot, String[] bootConfig,
-            String[] appConfig) throws SerializerException;
+    void exportData(String name, String exportFileName) throws SerializerException;
 
     /**
      * Main routine to export the set of data elements and write them to the
@@ -145,13 +112,22 @@
      * @param settings
      *            optional Map overwriting default export behavior
      */
-    public void exportData(String name, String exportFileName, Map settings)
-            throws SerializerException;
+    void exportData(String name, String exportFileName, Map settings) throws SerializerException;
 
     /**
      * Main routine to import the set of data elements and write them to the
-     * current environment. The default behavior of the serializer is that all
-     * available data is read and written to the current environment.
+     * current environment.
+     * 
+     * @param importFileName
+     * @param settings
+     *            optional Map overwriting default import behavior
+     * @return
+     */
+    void importData(String importFileName) throws SerializerException;
+    
+    /**
+     * Main routine to import the set of data elements and write them to the
+     * current environment.
      * <p>
      * Existing entries (like users) etc. will be overwritten with the provided
      * data.
@@ -172,27 +148,15 @@
      *            optional Map overwriting default import behavior
      * @return
      */
-    public void importData(String importFileName, Map settings)
-            throws SerializerException;
-
-    /**
-     * Set the default indent for the XML output
-     * 
-     * @param indent
-     */
-    public void setDefaultIndent(String indent);
+    void importData(String importFileName, Map settings) throws SerializerException;
+    
+    void deleteData() throws SerializerException;
+    void deleteData(Map settings) throws SerializerException;
 
     /**
      * Get the current indent setting for XML files
      * 
      * @return the current indent setting
      */
-    public String getDefaultIndent();
-
-    /**
-     * release the resources etc.
-     * 
-     */
-    public void closeUp();
-
+    String getDefaultIndent();
 }

Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-services.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-services.xml?rev=640072&r1=640071&r2=640072&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-services.xml
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-services.xml
Sat Mar 22 13:22:25 2008
@@ -126,7 +126,10 @@
           <entry key="AuditActivity">
           	<ref bean="org.apache.jetspeed.audit.AuditActivity"/>
           </entry>          
-<!-- first uncomment the below service bean in security-spi-atn.xml
+  	   	  <entry key="JetspeedSerializer">
+  	   	    <ref bean="JetspeedSerializer"/>
+  	   	  </entry>
+  	   	  <!-- first uncomment the below service bean in security-spi-atn.xml
          <entry key="PasswordEncodingService">
            <ref bean="org.apache.jetspeed.security.PasswordEncodingService" />
          </entry>

Added: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/serializer.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/serializer.xml?rev=640072&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/serializer.xml
(added)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/serializer.xml
Sat Mar 22 13:22:25 2008
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans>
+
+  <bean id="JetspeedSerializer" class="org.apache.jetspeed.serializer.JetspeedSerializerImpl">
+    <constructor-arg index="0">
+      <list>
+        <bean class="org.apache.jetspeed.serializer.JetspeedCapabilitiesSerializer">
+          <constructor-arg ref="org.apache.jetspeed.capabilities.Capabilities" />
+        </bean>
+        <bean class="org.apache.jetspeed.serializer.JetspeedSecuritySerializer">
+          <constructor-arg index="0" ref="org.apache.jetspeed.security.GroupManager" />
+          <constructor-arg index="1" ref="org.apache.jetspeed.security.RoleManager" />
+          <constructor-arg index="2" ref="org.apache.jetspeed.security.UserManager" />
+          <constructor-arg index="3" ref="org.apache.jetspeed.security.spi.PasswordCredentialProvider"
/>
+          <constructor-arg index="4" ref="org.apache.jetspeed.security.PermissionManager"
/>
+        </bean>
+        <bean class="org.apache.jetspeed.serializer.JetspeedProfilerSerializer">
+          <constructor-arg index="0" ref="org.apache.jetspeed.profiler.Profiler" />
+          <constructor-arg index="1" ref="org.apache.jetspeed.security.UserManager" />
+        </bean>
+      </list>
+    </constructor-arg>
+    <constructor-arg index="1">
+      <map>
+        <entry key="process_capabilities">
+          <value type="java.lang.Boolean">true</value>
+        </entry>
+        <entry key="process_users">
+          <value type="java.lang.Boolean">true</value>
+        </entry>
+        <entry key="process_profiler">
+          <value type="java.lang.Boolean">true</value>
+        </entry>
+        <!--  following serializers are not yet implemented/available -->
+        <entry key="process_user_preferences">
+          <value type="java.lang.Boolean">false</value>
+        </entry>
+        <entry key="process_portal_preferences">
+          <value type="java.lang.Boolean">false</value>
+        </entry>
+        <entry key="process_entities">
+          <value type="java.lang.Boolean">false</value>
+        </entry>
+        <entry key="process_preferences">
+          <value type="java.lang.Boolean">false</value>
+        </entry>
+      </map>
+    </constructor-arg>
+  </bean>
+
+</beans>

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/serializer.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/serializer.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/serializer.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain



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