Author: taylor
Date: Mon Jan 2 13:26:20 2006
New Revision: 365440
URL: http://svn.apache.org/viewcvs?rev=365440&view=rev
Log:
http://issues.apache.org/jira/browse/JS2-461
Just getting started here.
Will probably move the Importer out of here, since it will bring in a large
number
of dependencies
Added:
portals/jetspeed-2/trunk/components/serializer/
portals/jetspeed-2/trunk/components/serializer/jetspeed-import.xml
portals/jetspeed-2/trunk/components/serializer/maven.xml
portals/jetspeed-2/trunk/components/serializer/project.properties
portals/jetspeed-2/trunk/components/serializer/project.xml
portals/jetspeed-2/trunk/components/serializer/src/
portals/jetspeed-2/trunk/components/serializer/src/java/
portals/jetspeed-2/trunk/components/serializer/src/java/org/
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/JSImportData.java
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedImporter.java
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSCriterion.java
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSNameValuePair.java
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSPermission.java
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSProfilingRule.java
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSUser.java
Added: portals/jetspeed-2/trunk/components/serializer/jetspeed-import.xml
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/serializer/jetspeed-import.xml?rev=365440&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/components/serializer/jetspeed-import.xml (added)
+++ portals/jetspeed-2/trunk/components/serializer/jetspeed-import.xml Mon Jan
2 13:26:20 2006
@@ -0,0 +1,107 @@
+<import-data>
+ <!-- import information -->
+ <version>1.0</version>
+ <name>Import Test</name>
+ <date>2005-12-18 15:16:04.0 PST</date>
+ <locale>en_US</locale>
+
+ <!-- roles -->
+ <roles>
+ <role>ra</role>
+ <role>rb</role>
+ <role>rc</role>
+ <role>rd</role>
+ </roles>
+
+ <!-- groups -->
+ <groups>
+ <group>ga</group>
+ <group>gb</group>
+ <group>gc</group>
+ <group>gd</group>
+ </groups>
+
+ <!-- permissions -->
+ <permissions>
+ <permission>
+ <type>folder</type>
+ <resource>/</resource>
+ <actions>view, edit</actions>
+ <roles>admin, user</roles>
+ <groups>dev</groups>
+ <users>joe</users>
+ </permission>
+ <permission>
+ <type>page</type>
+ <resource>/default-page.psml</resource>
+ <actions>view</actions>
+ <roles>admin, user</roles>
+ <groups>dev</groups>
+ <users>joe</users>
+ </permission>
+ </permissions>
+
+ <!-- profiling rules -->
+ <profilingRules>
+ <profilingRule>
+ <name>j2</name>
+
<className>org.apache.jetspeed.profile.RuleImpl</className>
+ <description>whatever</description>
+ <criteria>
+ <criterion>
+ <order>0</order>
+ <type>user</type>
+ <name>user</name>
+ <value>*</value>
+ <fallback>continue</fallback>
+ </criterion>
+ <criterion>
+ <order>1</order>
+ <type>path.session</type>
+ <name>path</name>
+ <value>default-page.psml</value>
+ <fallback>continue</fallback>
+ </criterion>
+ </criteria>
+ </profilingRule>
+ </profilingRules>
+
+ <!-- users -->
+ <users>
+ <user>
+ <name>joe</name>
+ <password>xxx</password>
+ <template>/_user/template/</template>
+
+ <roles>admin, user</roles>
+ <groups>dev,groupa, groupb</groups>
+ <userInfo>
+ <info>
+ <name>user.first.name</name>
+ <value>John</value>
+ </info>
+ <info>
+ <name>user.last.name</name>
+ <value>Smith</value>
+ </info>
+ </userInfo>
+
+<!-- <preferences/> -->
+
+ <profileRules>
+ <rule>
+ <name>page</name>
+ <value>userrolefallback</value>
+ </rule>
+ <rule>
+ <name>menu</name>
+ <value>j2</value>
+ </rule>
+ </profileRules>
+ </user>
+ </users>
+
+ <!-- Capability -->
+
+
+</import-data>
\ No newline at end of file
Added: portals/jetspeed-2/trunk/components/serializer/maven.xml
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/serializer/maven.xml?rev=365440&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/components/serializer/maven.xml (added)
+++ portals/jetspeed-2/trunk/components/serializer/maven.xml Mon Jan 2
13:26:20 2006
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+<project default="java:jar" xmlns:j="jelly:core" xmlns:define="jelly:define">
+
+ <!-- Target of maven test:single test -->
+ <property name='testcase'
value='org.apache.jetspeed.idgenerator.TestIdGenerator' />
+
+ <goal name='importer'>
+ <java classname="org.apache.jetspeed.serializer.JetspeedImporter"
fork="yes">
+ <classpath>
+ <path refid="maven.dependency.classpath"/>
+ <pathelement path="${maven.build.dest}"/>
+ <pathelement
path="${org.apache.jetspeed.production.jdbc.drivers.path}"/>
+ </classpath>
+ </java>
+ </goal>
+ <preGoal name='importer'>
+ <attainGoal name="java:compile" />
+ </preGoal>
+</project>
Added: portals/jetspeed-2/trunk/components/serializer/project.properties
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/serializer/project.properties?rev=365440&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/components/serializer/project.properties (added)
+++ portals/jetspeed-2/trunk/components/serializer/project.properties Mon Jan
2 13:26:20 2006
@@ -0,0 +1,20 @@
+# Copyright 2004 The Apache Software Foundation
+#
+# Licensed 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.properties 187000 2004-07-11 03:32:22Z paulsp $
+#
+
+maven.multiproject.type=jar
+maven.license.licenseFile=${basedir}/../../LICENSE.TXT
+
Added: portals/jetspeed-2/trunk/components/serializer/project.xml
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/serializer/project.xml?rev=365440&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/components/serializer/project.xml (added)
+++ portals/jetspeed-2/trunk/components/serializer/project.xml Mon Jan 2
13:26:20 2006
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright 2004 The Apache Software Foundation
+
+Licensed 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.xml 355198 2005-12-08 20:44:03Z rogerrut $
+-->
+<project>
+<extend>${basedir}/../../core-build.xml</extend>
+ <pomVersion>3</pomVersion>
+ <id>jetspeed-importer</id>
+ <name>Jetspeed-2 Importer</name>
+
+ <package>org.apache.jetspeed</package>
+ <description>Jetspeed Importer</description>
+ <shortDescription>Importer</shortDescription>
+
+ <repository>
+ <connection>
+
scm:svn:http://svn.apache.org/repos/asf/portals/jetspeed-2/trunk/components/importer
+ </connection>
+ <developerConnection>
+
scm:svn:https://svn.apache.org/repos/asf/portals/jetspeed-2/trunk/components/importer
+ </developerConnection>
+
<url>http://svn.apache.org/viewcvs.cgi/portals/jetspeed-2/trunk/components/importer/</url>
+ </repository>
+
+ <dependencies>
+ <dependency>
+ <id>xstream</id>
+ <version>1.1.2</version>
+ </dependency>
+ <dependency>
+ <id>org.apache.portals.jetspeed-2:jetspeed-commons</id>
+ <version>${jetspeed.version}</version>
+ </dependency>
+ <dependency>
+ <id>org.apache.portals.jetspeed-2:jetspeed-api</id>
+ <version>${jetspeed.version}</version>
+ </dependency>
+ </dependencies>
+
+</project>
Added:
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/JSImportData.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/JSImportData.java?rev=365440&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/JSImportData.java
(added)
+++
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/JSImportData.java
Mon Jan 2 13:26:20 2006
@@ -0,0 +1,175 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ *
+ * Licensed 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;
+
+import java.io.PrintStream;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.jetspeed.serializer.objects.JSCriterion;
+import org.apache.jetspeed.serializer.objects.JSNameValuePair;
+import org.apache.jetspeed.serializer.objects.JSPermission;
+import org.apache.jetspeed.serializer.objects.JSProfilingRule;
+import org.apache.jetspeed.serializer.objects.JSUser;
+
+/**
+ * Jetspeed Importer
+ *
+ * @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
+ * @version $Id: $
+ */
+public class JSImportData
+{
+ private String version;
+ private String name;
+ private Date date;
+ private String locale;
+ private List roles = new ArrayList();
+ private List groups = new ArrayList();
+ private List permissions = new ArrayList();
+ private List profilingRules = new ArrayList();
+ private List users = new ArrayList();
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getVersion()
+ {
+ return version;
+ }
+
+ public void setVersion(String version)
+ {
+ this.version = version;
+ }
+
+ public void debug(PrintStream out)
+ {
+ out.println("name = " + getName());
+ out.println("version = " + getVersion());
+ out.println("date = " + getDate());
+ out.println("locale = " + getLocale());
+
+ Iterator it = roles.iterator();
+ while (it.hasNext())
+ {
+ out.println("role = " + (String)it.next());
+ }
+ it = groups.iterator();
+ while (it.hasNext())
+ {
+ out.println("groups = " + (String)it.next());
+ }
+ it = permissions.iterator();
+ while (it.hasNext())
+ {
+ JSPermission permission = (JSPermission)it.next();
+ out.println("permission = " + permission.getType() + ", " +
permission.getResource());
+ }
+ it = profilingRules.iterator();
+ while (it.hasNext())
+ {
+ JSProfilingRule rule = (JSProfilingRule)it.next();
+ out.println("rule = " + rule.getName() + ", " +
rule.getClassName());
+ Iterator criteria = rule.getCriteria().iterator();
+ while (criteria.hasNext())
+ {
+ JSCriterion c = (JSCriterion)criteria.next();
+ out.println("criterion = " + c.getName() + ", " + c.getOrder()
+ ", " + c.getValue());
+ }
+ }
+
+ it = users.iterator();
+ while (it.hasNext())
+ {
+ JSUser user = (JSUser)it.next();
+ out.println("user = " + user.getName() + ", " +
user.getPassword());
+ out.println("user roles = " + user.getRoles() + ", " +
user.getGroups());
+ Iterator infos = user.getUserInfo().iterator();
+ while (infos.hasNext())
+ {
+ JSNameValuePair pair = (JSNameValuePair)infos.next();
+ out.println("info = " + pair.getName() + ", " +
pair.getValue());
+ }
+ Iterator profiles = user.getProfileRules().iterator();
+ while (profiles.hasNext())
+ {
+ JSNameValuePair pair = (JSNameValuePair)profiles.next();
+ out.println("user profile = " + pair.getName() + ", " +
pair.getValue());
+ }
+
+
+ }
+
+ }
+
+
+ public List getGroups()
+ {
+ return groups;
+ }
+
+
+ public List getRoles()
+ {
+ return roles;
+ }
+
+
+ public Date getDate()
+ {
+ return date;
+ }
+
+
+ public void setDate(Date date)
+ {
+ this.date = date;
+ }
+
+
+ public String getLocale()
+ {
+ return locale;
+ }
+
+
+ public void setLocale(String locale)
+ {
+ this.locale = locale;
+ }
+
+
+ public List getUsers()
+ {
+ return users;
+ }
+
+
+ public void setUsers(List users)
+ {
+ this.users = users;
+ }
+}
\ No newline at end of file
Added:
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedImporter.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedImporter.java?rev=365440&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedImporter.java
(added)
+++
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedImporter.java
Mon Jan 2 13:26:20 2006
@@ -0,0 +1,147 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ *
+ * Licensed 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;
+
+import org.apache.commons.configuration.PropertiesConfiguration;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.serializer.objects.JSCriterion;
+import org.apache.jetspeed.serializer.objects.JSPermission;
+import org.apache.jetspeed.serializer.objects.JSProfilingRule;
+import org.apache.jetspeed.serializer.objects.JSUser;
+import org.apache.jetspeed.serializer.objects.JSNameValuePair;
+
+import java.io.FileInputStream;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.Iterator;
+import java.util.List;
+
+import com.thoughtworks.xstream.XStream;
+import com.thoughtworks.xstream.io.xml.DomDriver;
+
+
+/**
+ * Jetspeed Importer
+ *
+ * @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
+ * @version $Id: $
+ */
+public class JetspeedImporter
+{
+ //private final static Log log = LogFactory.getLog(JetspeedImporter.class);
+
+ public JetspeedImporter()
+ {
+ }
+
+ public static void main(String[] args)
+ {
+ String fileName =
System.getProperty("org.apache.jetspeed.xml.importer.configuration",
"xml-import.properties");
+ PropertiesConfiguration configuration = new PropertiesConfiguration();
+ try
+ {
+// configuration.load(fileName);
+// String [] bootAssemblies =
configuration.getStringArray("boot.assemblies");
+// String [] assemblies =
configuration.getStringArray("assemblies");
+// ClassPathXmlApplicationContext ctx;
+//
+// if (bootAssemblies != null)
+// {
+// ApplicationContext bootContext = new
ClassPathXmlApplicationContext(bootAssemblies, true);
+// ctx = new ClassPathXmlApplicationContext(assemblies, true,
bootContext);
+// }
+// else
+// {
+// ctx = new ClassPathXmlApplicationContext(assemblies, true);
+// }
+//
+// String rootFolder = configuration.getString("root.folder", "/");
+
+
+ JetspeedImporter importer = new JetspeedImporter();
+ JSImportData data = importer.importData("jetspeed-import.xml");
+ data.debug(System.out);
+ }
+ catch (Exception e)
+ {
+ System.err.println("Failed to XML import: " + e);
+ e.printStackTrace();
+ }
+
+ }
+
+ public JSImportData importData(String importFileName)
+ {
+ JSImportData importData = null;
+ try
+ {
+ XStream xstream = new XStream(new DomDriver());
+ setupAliases(xstream);
+ //Reader reader = new
InputStreamReader(this.getClass().getResourceAsStream(importFileName));
+ Reader reader = new InputStreamReader(new
FileInputStream(importFileName), "UTF-8");
+
+ importData = (JSImportData)xstream.fromXML(reader);
+
+ addRoles(importData.getRoles());
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ return importData;
+ }
+
+ public void setupAliases(XStream xstream)
+ {
+ xstream.alias("import-data", JSImportData.class);
+ xstream.alias("role", String.class);
+ xstream.alias("group", String.class);
+ xstream.alias("permission", JSPermission.class);
+ xstream.alias("profilingRule", JSProfilingRule.class);
+ xstream.alias("user", JSUser.class);
+ xstream.alias("info", JSNameValuePair.class);
+ xstream.alias("criterion", JSCriterion.class);
+ xstream.alias("rule", JSNameValuePair.class);
+ xstream.alias("info", JSNameValuePair.class);
+ //xstream.registerConverter()
+ }
+
+ public void start()
+ {
+// log.info( "Start Jetspeed Importer");
+ }
+
+ public void stop()
+ {
+ // log.info( "Stop Jetspeed Importer");
+ }
+
+ public void addRoles(List roles)
+ {
+ Iterator list = roles.iterator();
+ while (list.hasNext())
+ {
+ String role = (String)list.next();
+
+ }
+
+ }
+
+}
Added:
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSCriterion.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSCriterion.java?rev=365440&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSCriterion.java
(added)
+++
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSCriterion.java
Mon Jan 2 13:26:20 2006
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.objects;
+
+/**
+ * Serialized Profiler Criterion
+ * <criterion>
+ * <order>0</order>
+ * <type>user</type>
+ * <name>user</name>
+ * <value>*</value>
+ * <fallback>continue</fallback>
+ * </criterion>
+ *
+ * @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
+ * @version $Id: $
+ */
+public class JSCriterion
+{
+ private int order;
+ private String type;
+ private String name;
+ private String value;
+ private String fallback;
+
+ public JSCriterion()
+ {
+ }
+
+
+ public String getFallback()
+ {
+ return fallback;
+ }
+
+
+ public void setFallback(String fallback)
+ {
+ this.fallback = fallback;
+ }
+
+
+ public String getName()
+ {
+ return name;
+ }
+
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+
+ public int getOrder()
+ {
+ return order;
+ }
+
+
+ public void setOrder(int order)
+ {
+ this.order = order;
+ }
+
+
+ public String getType()
+ {
+ return type;
+ }
+
+
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+
+ public String getValue()
+ {
+ return value;
+ }
+
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+}
\ No newline at end of file
Added:
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSNameValuePair.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSNameValuePair.java?rev=365440&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSNameValuePair.java
(added)
+++
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSNameValuePair.java
Mon Jan 2 13:26:20 2006
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.objects;
+
+/**
+ * Serialized Name Value Pairs
+ * <info>
+ * <name>user.first.name</name>
+ * <value>David</value>
+ * </info>
+ *
+ * @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
+ * @version $Id: $
+ */
+public class JSNameValuePair
+{
+ private String name;
+ private String value;
+
+ public JSNameValuePair()
+ {
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getValue()
+ {
+ return value;
+ }
+
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+}
\ No newline at end of file
Added:
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSPermission.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSPermission.java?rev=365440&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSPermission.java
(added)
+++
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSPermission.java
Mon Jan 2 13:26:20 2006
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.objects;
+
+/**
+ * Serialized Permission
+ * <permission type='folder' resource='/' actions='view, edit'>
+ * <roles>admin, user</roles>
+ * <groups>dev</groups>
+ * <users>joe</users>
+ * </permission>
+ *
+ * @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
+ * @version $Id: $
+ */
+public class JSPermission
+{
+ private String type;
+ private String resource;
+ private String actions;
+ private String roles;
+ private String groups;
+ private String users;
+
+ public JSPermission()
+ {
+ }
+
+
+ public String getActions()
+ {
+ return actions;
+ }
+
+
+ public void setActions(String actions)
+ {
+ this.actions = actions;
+ }
+
+
+ public String getGroups()
+ {
+ return groups;
+ }
+
+
+ public void setGroups(String groups)
+ {
+ this.groups = groups;
+ }
+
+
+ public String getResource()
+ {
+ return resource;
+ }
+
+
+ public void setResource(String resource)
+ {
+ this.resource = resource;
+ }
+
+
+ public String getRoles()
+ {
+ return roles;
+ }
+
+
+ public void setRoles(String roles)
+ {
+ this.roles = roles;
+ }
+
+
+ public String getType()
+ {
+ return type;
+ }
+
+
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+
+ public String getUsers()
+ {
+ return users;
+ }
+
+
+ public void setUsers(String users)
+ {
+ this.users = users;
+ }
+
+}
\ No newline at end of file
Added:
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSProfilingRule.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSProfilingRule.java?rev=365440&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSProfilingRule.java
(added)
+++
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSProfilingRule.java
Mon Jan 2 13:26:20 2006
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.objects;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Import ProfilingRule
+ *
+ * <profilingRule>
+ * <name>j2</name>
+ * <className>org.apache.jetspeed.profile.RuleImpl</className>
+ * <description>whatever</description>
+ * <criteria>
+ * ...
+ * </criteria>
+ * </profilingRule>
+ *
+ * @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
+ * @version $Id: $
+ */
+public class JSProfilingRule
+{
+ private List criteria = new ArrayList();
+ private String name;
+ private String className;
+ private String description;
+
+ public JSProfilingRule()
+ {
+ }
+
+
+ public String getClassName()
+ {
+ return className;
+ }
+
+
+ public void setClassName(String className)
+ {
+ this.className = className;
+ }
+
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+
+ public String getName()
+ {
+ return name;
+ }
+
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+
+ public List getCriteria()
+ {
+ return criteria;
+ }
+
+
+
+}
\ No newline at end of file
Added:
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSUser.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSUser.java?rev=365440&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSUser.java
(added)
+++
portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSUser.java
Mon Jan 2 13:26:20 2006
@@ -0,0 +1,131 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.objects;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Jetspeed Serialized (JS) User
+ *
+ * @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
+ * @version $Id: $
+ */
+public class JSUser
+{
+ private String name;
+ private String password;
+ private String template;
+ private String roles;
+ private String groups;
+ private List userInfo = new ArrayList();
+ private List profileRules = new ArrayList();
+
+ public JSUser()
+ {
+ }
+
+
+ public String getGroups()
+ {
+ return groups;
+ }
+
+
+ public void setGroups(String groups)
+ {
+ this.groups = groups;
+ }
+
+
+ public String getPassword()
+ {
+ return password;
+ }
+
+
+ public void setPassword(String password)
+ {
+ this.password = password;
+ }
+
+
+ public String getRoles()
+ {
+ return roles;
+ }
+
+
+ public void setRoles(String roles)
+ {
+ this.roles = roles;
+ }
+
+
+ public String getTemplate()
+ {
+ return template;
+ }
+
+
+ public void setTemplate(String template)
+ {
+ this.template = template;
+ }
+
+
+ public String getName()
+ {
+ return name;
+ }
+
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+
+ public List getUserInfo()
+ {
+ return userInfo;
+ }
+
+
+ public void setUserInfo(List userInfo)
+ {
+ this.userInfo = userInfo;
+ }
+
+
+
+ public List getProfileRules()
+ {
+ return profileRules;
+ }
+
+
+
+ public void setProfileRules(List profileRules)
+ {
+ this.profileRules = profileRules;
+ }
+
+
+
+
+
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]