Author: ate
Date: Thu Jul  5 10:20:25 2012
New Revision: 1357536

URL: http://svn.apache.org/viewvc?rev=1357536&view=rev
Log:
RAVE-698: adding a HandlerMethod extension tracking nested/child HandlerMethod 
(Controllers)

Added:
    
rave/sandbox/content-services/rave-web-hmvc/src/main/java/org/apache/rave/portal/web/hmvc/HmvcHandlerMethod.java
   (with props)

Added: 
rave/sandbox/content-services/rave-web-hmvc/src/main/java/org/apache/rave/portal/web/hmvc/HmvcHandlerMethod.java
URL: 
http://svn.apache.org/viewvc/rave/sandbox/content-services/rave-web-hmvc/src/main/java/org/apache/rave/portal/web/hmvc/HmvcHandlerMethod.java?rev=1357536&view=auto
==============================================================================
--- 
rave/sandbox/content-services/rave-web-hmvc/src/main/java/org/apache/rave/portal/web/hmvc/HmvcHandlerMethod.java
 (added)
+++ 
rave/sandbox/content-services/rave-web-hmvc/src/main/java/org/apache/rave/portal/web/hmvc/HmvcHandlerMethod.java
 Thu Jul  5 10:20:25 2012
@@ -0,0 +1,55 @@
+/*
+ * 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.rave.portal.web.hmvc;
+
+import java.lang.reflect.Method;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.beans.factory.BeanFactory;
+import org.springframework.web.method.HandlerMethod;
+
+public class HmvcHandlerMethod extends HandlerMethod {
+
+    protected Map<String, HandlerMethod> children = new LinkedHashMap<String, 
HandlerMethod>();
+
+    protected HmvcHandlerMethod(Object bean, Method method) {
+        super(bean, method);
+    }
+
+    protected HmvcHandlerMethod(Object bean, String methodName, Class<?>... 
parameterTypes)
+            throws NoSuchMethodException {
+        super(bean, methodName, parameterTypes);
+    }
+
+    protected HmvcHandlerMethod(String beanName, BeanFactory beanFactory, 
Method method) {
+        super(beanName, beanFactory, method);
+    }
+    
+    public void addChildHandlerMethod(String name, HandlerMethod child) {
+        children.put(name, child);
+    }
+    
+    public HandlerMethod getChildHandlerMethod(String name) {
+        return children.get(name);
+    }
+    
+    public Set<String> getChildHandlerMethodNames() {
+        return children.keySet();
+    }
+}

Propchange: 
rave/sandbox/content-services/rave-web-hmvc/src/main/java/org/apache/rave/portal/web/hmvc/HmvcHandlerMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
rave/sandbox/content-services/rave-web-hmvc/src/main/java/org/apache/rave/portal/web/hmvc/HmvcHandlerMethod.java
------------------------------------------------------------------------------
    svn:keywords = Id


Reply via email to