[seam-commits] Seam SVN: r12879 - modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu May 27 21:37:25 EDT 2010


Author: lincolnthree
Date: 2010-05-27 21:37:24 -0400 (Thu, 27 May 2010)
New Revision: 12879

Added:
   modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashContextImpl.java
Log:
First stab at real FlashScope implementation #3

Added: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashContextImpl.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashContextImpl.java	                        (rev 0)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashContextImpl.java	2010-05-28 01:37:24 UTC (rev 12879)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.seam.faces.context;
+
+import java.io.Serializable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.enterprise.inject.Typed;
+
+/**
+ * @author <a href="mailto:lincolnbaxter at gmail.com>Lincoln Baxter, III</a>
+ * 
+ */
+ at Typed()
+public class FlashContextImpl implements FlashContext, Serializable
+{
+   private static final long serialVersionUID = 7502050909452181348L;
+   private String id = null;
+   private final Map<String, Object> map = new ConcurrentHashMap<String, Object>();
+
+   public Object get(final String key)
+   {
+      return map.get(key);
+   }
+
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(final String id)
+   {
+      this.id = id;
+   }
+
+   public boolean isEmpty()
+   {
+      return map.isEmpty();
+   }
+
+   public void put(final String key, final Object value)
+   {
+      map.put(key, value);
+   }
+
+}



More information about the seam-commits mailing list