[exo-jcr-commits] exo-jcr SVN: r276 - ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Oct 13 14:38:40 EDT 2009


Author: aparfonov
Date: 2009-10-13 14:38:38 -0400 (Tue, 13 Oct 2009)
New Revision: 276

Added:
   ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/SimpleDependencyInjector.java
Log:
EXOJCR-185 : simple implementation of DependencyInjector

Added: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/SimpleDependencyInjector.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/SimpleDependencyInjector.java	                        (rev 0)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/SimpleDependencyInjector.java	2009-10-13 18:38:38 UTC (rev 276)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * 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.exoplatform.services.rest.impl;
+
+import org.exoplatform.services.rest.DependencyInjector;
+
+import java.lang.reflect.Type;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:andrey.parfonov at exoplatform.com">Andrey Parfonov</a>
+ * @version $Id: SimpleDependencyInjector.java 275 2009-10-13 16:17:02Z aparfonov $
+ */
+public class SimpleDependencyInjector extends HashMap<Class<?>, Object> implements DependencyInjector
+{
+
+   private static final long serialVersionUID = 8212609178539168377L;
+
+   public Object getInjectableParameter(Class<?> type, Type genericType)
+   {
+      return get(type);
+   }
+
+}



More information about the exo-jcr-commits mailing list