You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2008/07/04 00:05:58 UTC

svn commit: r673838 - in /myfaces/orchestra/trunk: examples/src/main/java/org/apache/myfaces/examples/ballot/dto/ sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/ sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/versionin...

Author: skitching
Date: Thu Jul  3 15:05:57 2008
New Revision: 673838

URL: http://svn.apache.org/viewvc?rev=673838&view=rev
Log:
Set eol-style to native

Modified:
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dto/AddressDto.java   (contents, props changed)
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dto/CompanyDto.java   (contents, props changed)
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dto/PersonDto.java   (contents, props changed)
    myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationDataHolder.java   (contents, props changed)
    myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/SerializingConversationDataHolder.java   (contents, props changed)
    myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/versioning/SavePoint.java   (contents, props changed)
    myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/versioning/spring/SpringVersioningScope.java   (contents, props changed)

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dto/AddressDto.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dto/AddressDto.java?rev=673838&r1=673837&r2=673838&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dto/AddressDto.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dto/AddressDto.java Thu Jul  3 15:05:57 2008
@@ -1,90 +1,90 @@
-/*
- * 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.myfaces.examples.ballot.dto;
-
-import java.io.Serializable;
-
-public class AddressDto implements Serializable
-{
-    public AddressDto(String street, String number, String zip, String city)
-    {
-        this.street = street;
-        this.number = number;
-        this.zip = zip;
-        this.city = city;
-    }
-
-    private String street;
-    private String number;
-    private String zip;
-    private String city;
-
-    private boolean editing;
-
-    public String getStreet()
-    {
-        return street;
-    }
-
-    public void setStreet(String street)
-    {
-        this.street = street;
-    }
-
-    public String getNumber()
-    {
-        return number;
-    }
-
-    public void setNumber(String number)
-    {
-        this.number = number;
-    }
-
-    public String getZip()
-    {
-        return zip;
-    }
-
-    public void setZip(String zip)
-    {
-        this.zip = zip;
-    }
-
-    public String getCity()
-    {
-        return city;
-    }
-
-    public void setCity(String city)
-    {
-        this.city = city;
-    }
-
-    public boolean isEditing()
-    {
-        return editing;
-    }
-
-    public void setEditing(boolean editing)
-    {
-        this.editing = editing;
-    }
-}
+/*
+ * 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.myfaces.examples.ballot.dto;
+
+import java.io.Serializable;
+
+public class AddressDto implements Serializable
+{
+    public AddressDto(String street, String number, String zip, String city)
+    {
+        this.street = street;
+        this.number = number;
+        this.zip = zip;
+        this.city = city;
+    }
+
+    private String street;
+    private String number;
+    private String zip;
+    private String city;
+
+    private boolean editing;
+
+    public String getStreet()
+    {
+        return street;
+    }
+
+    public void setStreet(String street)
+    {
+        this.street = street;
+    }
+
+    public String getNumber()
+    {
+        return number;
+    }
+
+    public void setNumber(String number)
+    {
+        this.number = number;
+    }
+
+    public String getZip()
+    {
+        return zip;
+    }
+
+    public void setZip(String zip)
+    {
+        this.zip = zip;
+    }
+
+    public String getCity()
+    {
+        return city;
+    }
+
+    public void setCity(String city)
+    {
+        this.city = city;
+    }
+
+    public boolean isEditing()
+    {
+        return editing;
+    }
+
+    public void setEditing(boolean editing)
+    {
+        this.editing = editing;
+    }
+}

Propchange: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dto/AddressDto.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dto/CompanyDto.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dto/CompanyDto.java?rev=673838&r1=673837&r2=673838&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dto/CompanyDto.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dto/CompanyDto.java Thu Jul  3 15:05:57 2008
@@ -1,67 +1,67 @@
-/*
- * 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.myfaces.examples.ballot.dto;
-
-import java.io.Serializable;
-import java.util.List;
-
-public class CompanyDto implements Serializable
-{
-    public CompanyDto(String companyName, String street)
-    {
-        this.companyName = companyName;
-        this.street = street;
-    }
-
-    private List<PersonDto> persons;
-
-    private String companyName;
-    private String street;
-
-    public List<PersonDto> getPersons()
-    {
-        return persons;
-    }
-
-    public void setPersons(List<PersonDto> persons)
-    {
-        this.persons = persons;
-    }
-
-    public String getCompanyName()
-    {
-        return companyName;
-    }
-
-    public void setCompanyName(String companyName)
-    {
-        this.companyName = companyName;
-    }
-
-    public String getStreet()
-    {
-        return street;
-    }
-
-    public void setStreet(String street)
-    {
-        this.street = street;
-    }
-}
+/*
+ * 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.myfaces.examples.ballot.dto;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class CompanyDto implements Serializable
+{
+    public CompanyDto(String companyName, String street)
+    {
+        this.companyName = companyName;
+        this.street = street;
+    }
+
+    private List<PersonDto> persons;
+
+    private String companyName;
+    private String street;
+
+    public List<PersonDto> getPersons()
+    {
+        return persons;
+    }
+
+    public void setPersons(List<PersonDto> persons)
+    {
+        this.persons = persons;
+    }
+
+    public String getCompanyName()
+    {
+        return companyName;
+    }
+
+    public void setCompanyName(String companyName)
+    {
+        this.companyName = companyName;
+    }
+
+    public String getStreet()
+    {
+        return street;
+    }
+
+    public void setStreet(String street)
+    {
+        this.street = street;
+    }
+}

Propchange: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dto/CompanyDto.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dto/PersonDto.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dto/PersonDto.java?rev=673838&r1=673837&r2=673838&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dto/PersonDto.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dto/PersonDto.java Thu Jul  3 15:05:57 2008
@@ -1,96 +1,96 @@
-/*
- * 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.myfaces.examples.ballot.dto;
-
-import java.util.List;
-import java.io.Serializable;
-
-/**
- * User: Gerald Müllan
- * Date: 06.05.2008
- * Time: 13:18:16
- */
-public class PersonDto implements Serializable
-{
-    public PersonDto(String firstName, String lastName, String title)
-    {
-        this.firstName = firstName;
-        this.lastName = lastName;
-        this.title = title;
-    }
-
-    private List<AddressDto> addresses;
-
-    private String firstName;
-    private String lastName;
-    private String title;
-
-    private boolean editing;
-
-    public List<AddressDto> getAddresses()
-    {
-        return addresses;
-    }
-
-    public void setAddresses(List<AddressDto> addresses)
-    {
-        this.addresses = addresses;
-    }
-
-    public String getFirstName()
-    {
-        return firstName;
-    }
-
-    public void setFirstName(String firstName)
-    {
-        this.firstName = firstName;
-    }
-
-    public String getLastName()
-    {
-        return lastName;
-    }
-
-    public void setLastName(String lastName)
-    {
-        this.lastName = lastName;
-    }
-
-    public String getTitle()
-    {
-        return title;
-    }
-
-    public void setTitle(String title)
-    {
-        this.title = title;
-    }
-
-    public boolean isEditing()
-    {
-        return editing;
-    }
-
-    public void setEditing(boolean editing)
-    {
-        this.editing = editing;
-    }
-}
+/*
+ * 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.myfaces.examples.ballot.dto;
+
+import java.util.List;
+import java.io.Serializable;
+
+/**
+ * User: Gerald Müllan
+ * Date: 06.05.2008
+ * Time: 13:18:16
+ */
+public class PersonDto implements Serializable
+{
+    public PersonDto(String firstName, String lastName, String title)
+    {
+        this.firstName = firstName;
+        this.lastName = lastName;
+        this.title = title;
+    }
+
+    private List<AddressDto> addresses;
+
+    private String firstName;
+    private String lastName;
+    private String title;
+
+    private boolean editing;
+
+    public List<AddressDto> getAddresses()
+    {
+        return addresses;
+    }
+
+    public void setAddresses(List<AddressDto> addresses)
+    {
+        this.addresses = addresses;
+    }
+
+    public String getFirstName()
+    {
+        return firstName;
+    }
+
+    public void setFirstName(String firstName)
+    {
+        this.firstName = firstName;
+    }
+
+    public String getLastName()
+    {
+        return lastName;
+    }
+
+    public void setLastName(String lastName)
+    {
+        this.lastName = lastName;
+    }
+
+    public String getTitle()
+    {
+        return title;
+    }
+
+    public void setTitle(String title)
+    {
+        this.title = title;
+    }
+
+    public boolean isEditing()
+    {
+        return editing;
+    }
+
+    public void setEditing(boolean editing)
+    {
+        this.editing = editing;
+    }
+}

Propchange: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dto/PersonDto.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationDataHolder.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationDataHolder.java?rev=673838&r1=673837&r2=673838&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationDataHolder.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationDataHolder.java Thu Jul  3 15:05:57 2008
@@ -1,32 +1,32 @@
-/*
- * 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.myfaces.orchestra.conversation;
-
-import java.util.Map;
-
-/**
- * Defines a DataHolder wrapper around the beans held by a conversation.
- * There is no special storing meachanism defined by this interface which may
- * be done by an implementing class.
- */
-public interface ConversationDataHolder
-{
-    Map getConversationBeans();
-}
+/*
+ * 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.myfaces.orchestra.conversation;
+
+import java.util.Map;
+
+/**
+ * Defines a DataHolder wrapper around the beans held by a conversation.
+ * There is no special storing meachanism defined by this interface which may
+ * be done by an implementing class.
+ */
+public interface ConversationDataHolder
+{
+    Map getConversationBeans();
+}

Propchange: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationDataHolder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/SerializingConversationDataHolder.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/SerializingConversationDataHolder.java?rev=673838&r1=673837&r2=673838&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/SerializingConversationDataHolder.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/SerializingConversationDataHolder.java Thu Jul  3 15:05:57 2008
@@ -1,99 +1,99 @@
-/*
- * 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.myfaces.orchestra.conversation;
-
-import java.io.*;
-import java.util.Map;
-
-/**
- * A wrapper around the beans hold by a conversation.
- * This is one option in order to "copy" conversational data and keep it for subsequent requests.
- * Another possibility would be cloning the whole tree of objects.
- * <p/>
- * The holder serializes the conversation beans on creation and
- * deserializes them when getting the beans.
- */
-public class SerializingConversationDataHolder implements ConversationDataHolder
-{
-    //private final Log log = LogFactory.getLog(SerializingConversationDataHolder.class);
-
-    private byte[] serializedConversationBeans;
-
-    public SerializingConversationDataHolder(Map conversationBeans)
-    {
-        if(conversationBeans != null)
-        {
-            serializedConversationBeans = serializeConversationBeans(conversationBeans);
-        }
-        else
-        {
-            throw new IllegalArgumentException("ConversationBeans must not be null!");
-        }
-    }
-
-    /**
-     * @return The map of beans stored before
-     */
-    public Map getConversationBeans()
-    {
-        Map conversationBeans = deserializeConversationBeans(serializedConversationBeans);
-        return conversationBeans;
-    }
-
-    /**
-     * Serializes conversational data (beans)
-     */
-    private byte[] serializeConversationBeans(Map beans)
-    {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try
-        {
-            ObjectOutputStream out = new ObjectOutputStream(baos);
-            out.writeObject(beans);
-            out.close();
-            baos.close();
-        }
-        catch(IOException e)
-        {
-            throw new RuntimeException("An error has been occured during serialization of conversation beans!", e);
-        }
-        return baos.toByteArray();
-    }
-
-    /**
-     * Deserializes conversational data (beans)
-     */
-    private Map deserializeConversationBeans(byte[] serializedBeans)
-    {
-        ByteArrayInputStream bais = new ByteArrayInputStream(serializedBeans);
-        Map deserializedBeans;
-        try
-        {
-            ObjectInputStream in = new ObjectInputStream(bais);
-            deserializedBeans = (Map) in.readObject();
-            in.close();
-            bais.close();
-        }
-        catch(Exception e)
-        {
-            throw new RuntimeException("An error has been occured during deserialization of conversation beans!", e);
-        }
-        return deserializedBeans;
-    }
-}
+/*
+ * 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.myfaces.orchestra.conversation;
+
+import java.io.*;
+import java.util.Map;
+
+/**
+ * A wrapper around the beans hold by a conversation.
+ * This is one option in order to "copy" conversational data and keep it for subsequent requests.
+ * Another possibility would be cloning the whole tree of objects.
+ * <p/>
+ * The holder serializes the conversation beans on creation and
+ * deserializes them when getting the beans.
+ */
+public class SerializingConversationDataHolder implements ConversationDataHolder
+{
+    //private final Log log = LogFactory.getLog(SerializingConversationDataHolder.class);
+
+    private byte[] serializedConversationBeans;
+
+    public SerializingConversationDataHolder(Map conversationBeans)
+    {
+        if(conversationBeans != null)
+        {
+            serializedConversationBeans = serializeConversationBeans(conversationBeans);
+        }
+        else
+        {
+            throw new IllegalArgumentException("ConversationBeans must not be null!");
+        }
+    }
+
+    /**
+     * @return The map of beans stored before
+     */
+    public Map getConversationBeans()
+    {
+        Map conversationBeans = deserializeConversationBeans(serializedConversationBeans);
+        return conversationBeans;
+    }
+
+    /**
+     * Serializes conversational data (beans)
+     */
+    private byte[] serializeConversationBeans(Map beans)
+    {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try
+        {
+            ObjectOutputStream out = new ObjectOutputStream(baos);
+            out.writeObject(beans);
+            out.close();
+            baos.close();
+        }
+        catch(IOException e)
+        {
+            throw new RuntimeException("An error has been occured during serialization of conversation beans!", e);
+        }
+        return baos.toByteArray();
+    }
+
+    /**
+     * Deserializes conversational data (beans)
+     */
+    private Map deserializeConversationBeans(byte[] serializedBeans)
+    {
+        ByteArrayInputStream bais = new ByteArrayInputStream(serializedBeans);
+        Map deserializedBeans;
+        try
+        {
+            ObjectInputStream in = new ObjectInputStream(bais);
+            deserializedBeans = (Map) in.readObject();
+            in.close();
+            bais.close();
+        }
+        catch(Exception e)
+        {
+            throw new RuntimeException("An error has been occured during deserialization of conversation beans!", e);
+        }
+        return deserializedBeans;
+    }
+}

Propchange: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/SerializingConversationDataHolder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/versioning/SavePoint.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/versioning/SavePoint.java?rev=673838&r1=673837&r2=673838&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/versioning/SavePoint.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/versioning/SavePoint.java Thu Jul  3 15:05:57 2008
@@ -1,52 +1,52 @@
-/*
- * 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.myfaces.orchestra.conversation.versioning;
-
-import java.io.Serializable;
-
-/**
- * Simple marker object which represents an actual snapshot of version scoped conversational data.
- * It can be referred in the version scoped managed-bean for a later rollback to an expected state.
- * <p/>
- * Alternatively it takes a name to identify the snapshot later on. In this case no reference has to be
- * maintained in the managed-bean which may be somewhat more convenient.
- * <p/>
- * Conversational beans usually may be of large size and therefore not suited for handling in the
- * managed-bean directly. A SavePoint therefore only represents a placeholder for conversational data
- * without any direct reference to it.
- */
-public class SavePoint implements Serializable
-{
-    private String savePointName;
-
-    public SavePoint()
-    {
-    }
-
-    public SavePoint(String savePointName)
-    {
-        this.savePointName = savePointName;
-    }
-
-    public String getSavePointName()
-    {
-        return savePointName;
-    }
+/*
+ * 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.myfaces.orchestra.conversation.versioning;
+
+import java.io.Serializable;
+
+/**
+ * Simple marker object which represents an actual snapshot of version scoped conversational data.
+ * It can be referred in the version scoped managed-bean for a later rollback to an expected state.
+ * <p/>
+ * Alternatively it takes a name to identify the snapshot later on. In this case no reference has to be
+ * maintained in the managed-bean which may be somewhat more convenient.
+ * <p/>
+ * Conversational beans usually may be of large size and therefore not suited for handling in the
+ * managed-bean directly. A SavePoint therefore only represents a placeholder for conversational data
+ * without any direct reference to it.
+ */
+public class SavePoint implements Serializable
+{
+    private String savePointName;
+
+    public SavePoint()
+    {
+    }
+
+    public SavePoint(String savePointName)
+    {
+        this.savePointName = savePointName;
+    }
+
+    public String getSavePointName()
+    {
+        return savePointName;
+    }
 }
\ No newline at end of file

Propchange: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/versioning/SavePoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/versioning/spring/SpringVersioningScope.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/versioning/spring/SpringVersioningScope.java?rev=673838&r1=673837&r2=673838&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/versioning/spring/SpringVersioningScope.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/versioning/spring/SpringVersioningScope.java Thu Jul  3 15:05:57 2008
@@ -1,100 +1,100 @@
-/*
- * 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.myfaces.orchestra.conversation.versioning.spring;
-
-import org.apache.myfaces.orchestra.conversation.Conversation;
-import org.apache.myfaces.orchestra.conversation.ConversationContext;
-import org.apache.myfaces.orchestra.conversation.spring.AbstractSpringOrchestraScope;
-import org.apache.myfaces.orchestra.conversation.versioning.VersioningConversation;
-
-/**
- * <h2>Example</h2>
- * A sample configuration for a versioning conversation scope with serialization (default):
- * <pre>
- * &lt;bean class="org.springframework.beans.factory.config.CustomScopeConfigurer"&gt;
- *   &lt;property name="scopes"&gt;
- *     &lt;map&gt;
- *       &lt;entry key="conversation.versioning"&gt;
- *         &lt;bean class="org.apache.myfaces.orchestra.conversation.versioning.spring.SpringVersioningScope"&gt;
- *           &lt;property name="versioningStrategy" value="serialization"/&gt;
- *         &lt;/bean&gt;
- *       &lt;/entry&gt;
- *     &lt;/map&gt;
- *   &lt;/property&gt;
- * &lt;/bean&gt;
- * </pre>
- * <p/>
- * <p/>
- * <h2>Conversation properties</h2>
- * The following properties can be defined on a scope and then apply to any conversation that is created
- * to hold a bean of this scope:
- * <ul>
- * <li>versioningStrategy: Actually only serialization supported. Defaults to "serialization".</li>
- * </ul>
- */
-public class SpringVersioningScope extends AbstractSpringOrchestraScope
-{
-    public static final String VERSIONING_STRATEGY_SERIALIZATION = "serialization";
-    public static final String VERSIONING_STRATEGY_CLONING = "cloning";
-
-    private String versioningStrategy = VERSIONING_STRATEGY_SERIALIZATION;
-
-    public String getVersioningStrategy()
-    {
-        return versioningStrategy;
-    }
-
-    /**
-     * Must be "serialization" at the moment.
-     * "cloning" will be supported in future versions.
-     * <p/>
-     * Defaults to "serialization".
-     */
-    public void setVersioningStrategy(String strategy)
-    {
-        if(VERSIONING_STRATEGY_SERIALIZATION.equals(strategy))
-        {
-            this.versioningStrategy = VERSIONING_STRATEGY_SERIALIZATION;
-        }
-        else if(VERSIONING_STRATEGY_CLONING.equals(strategy))
-        {
-            throw new UnsupportedOperationException("Cloning not supported at the moment!");
-            //this.versioningStrategy = VERSIONING_STRATEGY_CLONING;
-        }
-        else
-        {
-            throw new IllegalArgumentException("Invalid versioningStrategy:" + strategy);
-        }
-    }
-
-    /**
-     * Implementation of ConversationFactory interface.
-     */
-    public Conversation createConversation(ConversationContext context, String name)
-    {
-        VersioningConversation conversation = new VersioningConversation(context, name, this, versioningStrategy);
-
-        // invoke child scope classes so they can add any aspects they desire.
-        //initAspects(conversation);
-
-        return conversation;
-    }
-
+/*
+ * 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.myfaces.orchestra.conversation.versioning.spring;
+
+import org.apache.myfaces.orchestra.conversation.Conversation;
+import org.apache.myfaces.orchestra.conversation.ConversationContext;
+import org.apache.myfaces.orchestra.conversation.spring.AbstractSpringOrchestraScope;
+import org.apache.myfaces.orchestra.conversation.versioning.VersioningConversation;
+
+/**
+ * <h2>Example</h2>
+ * A sample configuration for a versioning conversation scope with serialization (default):
+ * <pre>
+ * &lt;bean class="org.springframework.beans.factory.config.CustomScopeConfigurer"&gt;
+ *   &lt;property name="scopes"&gt;
+ *     &lt;map&gt;
+ *       &lt;entry key="conversation.versioning"&gt;
+ *         &lt;bean class="org.apache.myfaces.orchestra.conversation.versioning.spring.SpringVersioningScope"&gt;
+ *           &lt;property name="versioningStrategy" value="serialization"/&gt;
+ *         &lt;/bean&gt;
+ *       &lt;/entry&gt;
+ *     &lt;/map&gt;
+ *   &lt;/property&gt;
+ * &lt;/bean&gt;
+ * </pre>
+ * <p/>
+ * <p/>
+ * <h2>Conversation properties</h2>
+ * The following properties can be defined on a scope and then apply to any conversation that is created
+ * to hold a bean of this scope:
+ * <ul>
+ * <li>versioningStrategy: Actually only serialization supported. Defaults to "serialization".</li>
+ * </ul>
+ */
+public class SpringVersioningScope extends AbstractSpringOrchestraScope
+{
+    public static final String VERSIONING_STRATEGY_SERIALIZATION = "serialization";
+    public static final String VERSIONING_STRATEGY_CLONING = "cloning";
+
+    private String versioningStrategy = VERSIONING_STRATEGY_SERIALIZATION;
+
+    public String getVersioningStrategy()
+    {
+        return versioningStrategy;
+    }
+
+    /**
+     * Must be "serialization" at the moment.
+     * "cloning" will be supported in future versions.
+     * <p/>
+     * Defaults to "serialization".
+     */
+    public void setVersioningStrategy(String strategy)
+    {
+        if(VERSIONING_STRATEGY_SERIALIZATION.equals(strategy))
+        {
+            this.versioningStrategy = VERSIONING_STRATEGY_SERIALIZATION;
+        }
+        else if(VERSIONING_STRATEGY_CLONING.equals(strategy))
+        {
+            throw new UnsupportedOperationException("Cloning not supported at the moment!");
+            //this.versioningStrategy = VERSIONING_STRATEGY_CLONING;
+        }
+        else
+        {
+            throw new IllegalArgumentException("Invalid versioningStrategy:" + strategy);
+        }
+    }
+
+    /**
+     * Implementation of ConversationFactory interface.
+     */
+    public Conversation createConversation(ConversationContext context, String name)
+    {
+        VersioningConversation conversation = new VersioningConversation(context, name, this, versioningStrategy);
+
+        // invoke child scope classes so they can add any aspects they desire.
+        //initAspects(conversation);
+
+        return conversation;
+    }
+
 }
\ No newline at end of file

Propchange: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/versioning/spring/SpringVersioningScope.java
------------------------------------------------------------------------------
    svn:eol-style = native