com.github.dynamicextensionsalfresco.webscripts.arguments.ExceptionArgumentResolver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of annotations-runtime Show documentation
Show all versions of annotations-runtime Show documentation
Adds an OSGi container to alfresco repository supporting dynamic code reloading, classpath isolation and a bunch of other useful features
package com.github.dynamicextensionsalfresco.webscripts.arguments;
import java.lang.annotation.Annotation;
import com.github.dynamicextensionsalfresco.webscripts.AnnotationWebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;
public class ExceptionArgumentResolver implements ArgumentResolver {
@Override
public final boolean supports(final Class> parameterType, final Class extends Annotation> annotationType) {
return Throwable.class.isAssignableFrom(parameterType);
}
@Override
public Throwable resolveArgument(final Class> argumentType, final Annotation annotation, final String name,
final WebScriptRequest request, final WebScriptResponse response) {
return ((AnnotationWebScriptRequest) request).getThrownException();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy