com.github.dynamicextensionsalfresco.webscripts.arguments.HttpServletResponseArgumentResolver 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 javax.servlet.http.HttpServletResponse;
import com.github.dynamicextensionsalfresco.webscripts.WebScriptUtil;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;
public class HttpServletResponseArgumentResolver extends AbstractTypeBasedArgumentResolver {
@Override
protected Class> getExpectedArgumentType() {
return HttpServletResponse.class;
}
@Override
protected HttpServletResponse resolveArgument(final WebScriptRequest request, final WebScriptResponse response) {
final HttpServletResponse httpServletResponse = WebScriptUtil.extractHttpServletResponse(response);
if (httpServletResponse == null) {
throw new RuntimeException("Cannot extract HttpServletResponse from WebScriptResponse.");
}
return httpServletResponse;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy