// Path: webscripts/src/main/java/com/github/dynamicextensionsalfresco/webscripts/AnnotationWebScriptRequest.java
// public class AnnotationWebScriptRequest extends DelegatingWebScriptRequest implements WrappingWebScriptRequest {
// 
//     private final Map<String, Object> model = new LinkedHashMap<>();
//     private Throwable thrownException = null;
// 
//     public AnnotationWebScriptRequest(WebScriptRequest request) {
//         super(request);
// 
//     }
// 
//     public WebScriptRequest getWebScriptRequest() {
//         return this.getNext();
//     }
// 
// 
//     public Map<String, Object> getModel() {
//         return model;
//     }
// 
//     public Throwable getThrownException() {
//         return thrownException;
//     }
// 
//     public void setThrownException(Throwable thrownException) {
//         this.thrownException = thrownException;
//     }
// 
// }


import java.lang.annotation.Annotation;
import java.util.Map;
import com.github.dynamicextensionsalfresco.webscripts.AnnotationWebScriptRequest;
import com.github.dynamicextensionsalfresco.webscripts.annotations.Attribute;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;
import org.springframework.util.StringUtils;
package com.github.dynamicextensionsalfresco.webscripts.arguments;




public class AttributeArgumentResolver implements ArgumentResolver<Object, Attribute> {

	@Override
	public boolean supports(final Class<?> parameterType, final Class<? extends Annotation> annotationType) {
		return Attribute.class.equals(annotationType);
	}

	@Override
	public Object resolveArgument(final Class<?> argumentType, final Attribute attribute, String name,
			final WebScriptRequest request, final WebScriptResponse response) {
		Object value;
// Path: webscripts/src/main/java/com/github/dynamicextensionsalfresco/webscripts/AnnotationWebScriptRequest.java
// public class AnnotationWebScriptRequest extends DelegatingWebScriptRequest implements WrappingWebScriptRequest {
// 
//     private final Map<String, Object> model = new LinkedHashMap<>();
//     private Throwable thrownException = null;
// 
//     public AnnotationWebScriptRequest(WebScriptRequest request) {
//         super(request);
// 
//     }
// 
//     public WebScriptRequest getWebScriptRequest() {
//         return this.getNext();
//     }
// 
// 
//     public Map<String, Object> getModel() {
//         return model;
//     }
// 
//     public Throwable getThrownException() {
//         return thrownException;
//     }
// 
//     public void setThrownException(Throwable thrownException) {
//         this.thrownException = thrownException;
//     }
// 
// }


// Path: annotations-runtime/src/main/java/com/github/dynamicextensionsalfresco/webscripts/arguments/AttributeArgumentResolver.java
import java.lang.annotation.Annotation;
import java.util.Map;
import com.github.dynamicextensionsalfresco.webscripts.AnnotationWebScriptRequest;
import com.github.dynamicextensionsalfresco.webscripts.annotations.Attribute;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;
import org.springframework.util.StringUtils;

package com.github.dynamicextensionsalfresco.webscripts.arguments;




public class AttributeArgumentResolver implements ArgumentResolver<Object, Attribute> {

	@Override
	public boolean supports(final Class<?> parameterType, final Class<? extends Annotation> annotationType) {
		return Attribute.class.equals(annotationType);
	}

	@Override
	public Object resolveArgument(final Class<?> argumentType, final Attribute attribute, String name,
			final WebScriptRequest request, final WebScriptResponse response) {
		Object value;
		final Map<String, Object> attributesByName = ((AnnotationWebScriptRequest) request).getModel();