com.github.dynamicextensionsalfresco.webscripts.resolutions.ErrorResolution Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of webscripts Show documentation
Show all versions of webscripts 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.resolutions;
import com.github.dynamicextensionsalfresco.webscripts.AnnotationWebScriptRequest;
import com.github.dynamicextensionsalfresco.webscripts.AnnotationWebscriptResponse;
import java.io.IOException;
/**
* @author Laurent Van der Linden
*
* @deprecated replaced with @see {@link StatusResolution}
*/
public class ErrorResolution implements Resolution {
private int status;
private String message;
public ErrorResolution(int status) {
this.status = status;
}
public ErrorResolution(int status, String message) {
this.status = status;
this.message = message;
}
@Override
public void resolve(AnnotationWebScriptRequest request, AnnotationWebscriptResponse response, ResolutionParameters params) throws IOException {
response.setStatus(status);
if (message != null) {
response.getWriter().append(message);
}
}
public int getStatus() {
return status;
}
public String getMessage() {
return message;
}
public void setStatus(int status) {
this.status = status;
}
public void setMessage(String message) {
this.message = message;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy