You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by wo...@apache.org on 2008/01/28 12:08:43 UTC
svn commit: r615851 - in /portals/jetspeed-2/trunk: applications/j2-admin/
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/seria...
Author: woonsan
Date: Mon Jan 28 03:08:35 2008
New Revision: 615851
URL: http://svn.apache.org/viewvc?rev=615851&view=rev
Log:
Fixed build errors for j2-admin PA.
A revision for 2.1.3 (http://svn.apache.org/viewvc?view=rev&revision=592266) was not properly integrated into the trunk.
Some classes in j2-admin in the trunk are using new serialization API, but the API and implementation are not in the trunk.
So, just to build j2-admin PA properly, I overwrote the API with 2.1.3 interfaces and modified just a little in JetspeedSerializerImpl.java.
Anyway, j2-admin can now run wicket-based portlet.
For example, you can add a filter/filter mapping in web.xml and wicket portlet in portlet.xml for hello world example with two classes and a html template.
Added:
portals/jetspeed-2/trunk/applications/j2-admin/pom.xml
portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializerFactory.java
Modified:
portals/jetspeed-2/trunk/components/jetspeed-serializer/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializerImpl.java
portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java
portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializer.java
Added: portals/jetspeed-2/trunk/applications/j2-admin/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/pom.xml?rev=615851&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/pom.xml (added)
+++ portals/jetspeed-2/trunk/applications/j2-admin/pom.xml Mon Jan 28 03:08:35 2008
@@ -0,0 +1,397 @@
+<?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.
+
+ $Id:$
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <prerequisites>
+ <maven>2.0.7</maven>
+ </prerequisites>
+ <groupId>org.apache.portals.applications</groupId>
+ <artifactId>j2-admin</artifactId>
+ <packaging>war</packaging>
+ <version>2.2-SNAPSHOT</version>
+ <name>Jetspeed-2 Administration</name>
+
+ <properties>
+
+ <!--
+ <maven.test.skip>false</maven.test.skip>
+ -->
+
+ <!-- Build Dependency Version Properties -->
+ <jetspeed-2.version>2.2-SNAPSHOT</jetspeed-2.version>
+ <jmock.version>1.0.1</jmock.version>
+ <junit.version>3.8.1</junit.version>
+ <mockrunner.version>0.3.8</mockrunner.version>
+ <org.apache.maven.artifact.ant.version>2.0.5</org.apache.maven.artifact.ant.version>
+ <torque.version>3.2-rc3</torque.version>
+ <tyrex.version>1.0.1</tyrex.version>
+
+ <org.apache.portals.bridges.common.version>1.0.4</org.apache.portals.bridges.common.version>
+ <org.apache.portals.bridges.velocity.version>1.0.4</org.apache.portals.bridges.velocity.version>
+ <org.apache.portals.bridges.jsf.version>1.0.4</org.apache.portals.bridges.jsf.version>
+ <org.apache.portals.bridges.frameworks.version>1.0.4</org.apache.portals.bridges.frameworks.version>
+ <org.apache.portals.bridges.groovy.version>1.0.4</org.apache.portals.bridges.groovy.version>
+ <org.apache.portals.bridges.portletfilter.version>1.0.4</org.apache.portals.bridges.portletfilter.version>
+
+ <!-- Project Dependency Version Properties -->
+ <aopalliance.version>1.0</aopalliance.version>
+ <aspectj.version>1.5.3</aspectj.version>
+ <castor.version>1.0</castor.version>
+ <cglib.version>2.1_3</cglib.version>
+ <commons-beanutils.version>1.7.0</commons-beanutils.version>
+ <commons-betwixt.version>1.0-beta-1</commons-betwixt.version>
+ <commons-codec.version>1.3</commons-codec.version>
+ <commons-collections.version>3.2</commons-collections.version>
+ <commons-configuration.version>1.1</commons-configuration.version>
+ <commons-dbcp.version>1.2.2</commons-dbcp.version>
+ <commons-digester.version>1.8</commons-digester.version>
+ <commons-fileupload.version>1.2</commons-fileupload.version>
+ <commons-httpclient.version>3.0.1</commons-httpclient.version>
+ <commons-io.version>0.1</commons-io.version>
+ <commons-lang.version>2.1</commons-lang.version>
+ <commons-logging.version>1.1</commons-logging.version>
+ <commons-pool.version>1.3</commons-pool.version>
+ <ddlutils.version>1.0</ddlutils.version>
+ <ehcache.version>1.2.4</ehcache.version>
+ <hsqldb.version>1.8.0.7</hsqldb.version>
+ <javax.activation.version>1.1</javax.activation.version>
+ <javax.mail.version>1.4</javax.mail.version>
+ <javax.servlet.jstl.version>1.1.2</javax.servlet.jstl.version>
+ <javax.servlet.version>2.3</javax.servlet.version>
+ <javax.transaction.version>1.0.1B</javax.transaction.version>
+ <portlet-api.version>1.0</portlet-api.version>
+ <jaxen.version>1.0-FCS</jaxen.version>
+ <jdom.version>1.0</jdom.version>
+ <log4j.version>1.2.14</log4j.version>
+ <slf4j.version>1.4.3</slf4j.version>
+ <lucene.version>2.2.0</lucene.version>
+ <oro.version>2.0.8</oro.version>
+ <portlet-api.version>1.0</portlet-api.version>
+ <org.apache.pluto.version>1.0.1</org.apache.pluto.version>
+ <regexp.version>1.2</regexp.version>
+ <groovy.version>1.5.1</groovy.version>
+ <saxpath.version>1.0-FCS</saxpath.version>
+ <spring.version>2.0.5</spring.version>
+ <spring.modules.version>2.0-rc2</spring.modules.version>
+ <taglibs-random.version>1.0.2</taglibs-random.version>
+ <taglibs-request.version>1.0.1</taglibs-request.version>
+ <taglibs-standard.version>1.1.2</taglibs-standard.version>
+ <velocity-tools.version>1.3</velocity-tools.version>
+ <velocity.version>1.5</velocity.version>
+ <xalan.version>2.4.1</xalan.version>
+ <xerces.version>2.3.0</xerces.version>
+ <xml-apis.version>1.0.b2</xml-apis.version>
+ <asm.version>2.2</asm.version>
+ <ibatis.version>2.3.0</ibatis.version>
+ <quartz.version>1.5.2</quartz.version>
+ <jcr.version>1.0</jcr.version>
+ <jackrabbit.version>1.4</jackrabbit.version>
+ <myfaces.version>1.1.5</myfaces.version>
+ <wicket.version>1.3.0</wicket.version>
+ <slf4j.version>1.4.3</slf4j.version>
+ </properties>
+
+ <!-- Dependencies -->
+
+ <dependencies>
+
+ <!-- Standard APIs -->
+ <dependency>
+ <groupId>portlet-api</groupId>
+ <artifactId>portlet-api</artifactId>
+ <version>${portlet-api.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>${javax.servlet.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Pluto Container -->
+ <dependency>
+ <groupId>org.apache.pluto</groupId>
+ <artifactId>pluto</artifactId>
+ <version>${org.apache.pluto.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Build Dependencies -->
+ <dependency>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>jetspeed-api</artifactId>
+ <version>${jetspeed-2.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>jetspeed-commons</artifactId>
+ <version>${jetspeed-2.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>jetspeed-serializer</artifactId>
+ <version>${jetspeed-2.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>jetspeed-locator</artifactId>
+ <version>${jetspeed-2.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>portals-gems</artifactId>
+ <version>${jetspeed-2.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>velocity</groupId>
+ <artifactId>velocity</artifactId>
+ <version>${velocity.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.portals.bridges</groupId>
+ <artifactId>portals-bridges-common</artifactId>
+ <version>${org.apache.portals.bridges.common.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.portals.bridges</groupId>
+ <artifactId>portals-bridges-velocity</artifactId>
+ <version>${org.apache.portals.bridges.velocity.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.portals.bridges</groupId>
+ <artifactId>portals-bridges-frameworks</artifactId>
+ <version>${org.apache.portals.bridges.frameworks.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.portals.bridges</groupId>
+ <artifactId>portals-bridges-jsf</artifactId>
+ <version>${org.apache.portals.bridges.jsf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.portals.bridges</groupId>
+ <artifactId>portals-bridges-portletfilter</artifactId>
+ <version>${org.apache.portals.bridges.portletfilter.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>jetspeed2-taglib-treecontrol</artifactId>
+ <version>${jetspeed-2.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>myfaces</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <version>${myfaces.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>${commons-logging.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>${commons-fileupload.version}</version>
+ </dependency>
+
+ <!-- Runtime Dependencies -->
+ <dependency>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>jetspeed-webapp-logging</artifactId>
+ <version>${jetspeed-2.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>${javax.servlet.jstl.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>taglibs</groupId>
+ <artifactId>standard</artifactId>
+ <version>${taglibs-standard.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>taglibs</groupId>
+ <artifactId>request</artifactId>
+ <version>${taglibs-request.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>myfaces</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <version>${myfaces.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>myfaces</groupId>
+ <artifactId>tomahawk</artifactId>
+ <version>${myfaces.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>velocity-tools</groupId>
+ <artifactId>velocity-tools</artifactId>
+ <version>${velocity-tools.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-digester</groupId>
+ <artifactId>commons-digester</artifactId>
+ <version>${commons-digester.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>${log4j.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>${xml-apis.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>${xerces.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-portlet</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-mock</artifactId>
+ <version>${spring.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-support</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wicket</groupId>
+ <artifactId>wicket</artifactId>
+ <version>${wicket.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ </dependencies>
+
+ <!-- Build Configuration -->
+
+ <build>
+ <sourceDirectory>${basedir}/src/java</sourceDirectory>
+ <resources>
+ <resource>
+ <directory>${basedir}/src/java</directory>
+ <includes>
+ <include>**/*.properties</include>
+ <include>**/*.html</include>
+ </includes>
+ </resource>
+ </resources>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <debug>true</debug>
+ <showDeprecation>true</showDeprecation>
+ <showWarnings>true</showWarnings>
+ <optimize>false</optimize>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.0</version>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>${basedir}/src/webapp</directory>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <!-- Project Information -->
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/portals/jetspeed-2/trunk/applications/j2-admin</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/portals/jetspeed-2/trunk/applications/j2-admin</developerConnection>
+ <url>http://svn.apache.org/viewcvs.cgi/portals/jetspeed-2/trunk/applications/j2-admin/</url>
+ </scm>
+
+</project>
Modified: portals/jetspeed-2/trunk/components/jetspeed-serializer/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/jetspeed-serializer/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializerImpl.java?rev=615851&r1=615850&r2=615851&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/jetspeed-serializer/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializerImpl.java (original)
+++ portals/jetspeed-2/trunk/components/jetspeed-serializer/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializerImpl.java Mon Jan 28 03:08:35 2008
@@ -27,6 +27,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.components.ComponentManager;
import org.apache.jetspeed.serializer.objects.JSApplication;
import org.apache.jetspeed.serializer.objects.JSApplications;
import org.apache.jetspeed.serializer.objects.JSCapabilities;
@@ -182,6 +183,19 @@
}
}
+ 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)
{
Modified: portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java?rev=615851&r1=615850&r2=615851&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java (original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java Mon Jan 28 03:08:35 2008
@@ -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/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializer.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializer.java?rev=615851&r1=615850&r2=615851&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializer.java (original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializer.java Mon Jan 28 03:08:35 2008
@@ -16,9 +16,10 @@
*/
package org.apache.jetspeed.serializer;
-import java.util.List;
import java.util.Map;
+import org.apache.jetspeed.components.ComponentManager;
+
/**
* Jetspeed Serializer
* <p>
@@ -42,54 +43,86 @@
/** Password handling */
/** Error in determening correct password handling */
- short ERROR_DECODING = -1;
+ public final static short ERROR_DECODING = -1;
/** the passwords are in clear text */
- short NO_DECODING = 0;
+ public final static short NO_DECODING = 0;
/**
* the passwords are encoded and the provider is the same as the data
* source, but is a 1-way algorithm
*/
- short PASSTHRU_REQUIRED = 1;
+ public final static 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
*/
- short DECODING_SUPPORTED = 2;
+ public final static short DECODING_SUPPORTED = 2;
/** the passwords are encoded and the current provider is DIFFERENT.... */
- short INVALID_PASSWORDS = 3;
+ public final static short INVALID_PASSWORDS = 3;
/** export/import instructions */
- 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";
+ 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();
+
- /**<p> the main tag in the XML file */
- String TAG_SNAPSHOT = "Snapshot";
- List getSerializers();
- Map getDefaultSettings();
+ /**<p> the main tag in the XML file */
+ public final static String TAG_SNAPSHOT = "Snapshot";
+ public final static String TAG_SECONDARYSNAPSHOT = "SecondaryData";
/**
- * Main routine to export the set of data elements and write them to the
- * named XML file.
+ * hand the serializer an existing component manager to access the
+ * environment
*
- * @param name
- * of the snapshot
- * @param exportFileName
+ * @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
+ *
+ * @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
*/
- void exportData(String name, String exportFileName) throws SerializerException;
+ public void initializeComponentManager(String appRoot, String[] bootConfig,
+ String[] appConfig) throws SerializerException;
/**
* Main routine to export the set of data elements and write them to the
@@ -112,22 +145,13 @@
* @param settings
* optional Map overwriting default export behavior
*/
- void exportData(String name, String exportFileName, Map settings) throws SerializerException;
+ public 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.
- *
- * @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.
+ * current environment. The default behavior of the serializer is that all
+ * available data is read and written to the current environment.
* <p>
* Existing entries (like users) etc. will be overwritten with the provided
* data.
@@ -148,22 +172,27 @@
* optional Map overwriting default import behavior
* @return
*/
- void importData(String importFileName, Map settings) throws SerializerException;
-
- void deleteData() throws SerializerException;
- void deleteData(Map settings) throws SerializerException;
+ public void importData(String importFileName, Map settings)
+ throws SerializerException;
/**
* Set the default indent for the XML output
*
* @param indent
*/
- void setDefaultIndent(String indent);
+ public void setDefaultIndent(String indent);
/**
* Get the current indent setting for XML files
*
* @return the current indent setting
*/
- String getDefaultIndent();
+ public String getDefaultIndent();
+
+ /**
+ * release the resources etc.
+ *
+ */
+ public void closeUp();
+
}
Added: portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializerFactory.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializerFactory.java?rev=615851&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializerFactory.java (added)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/serializer/JetspeedSerializerFactory.java Mon Jan 28 03:08:35 2008
@@ -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);
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org