working on document rendering
This commit is contained in:
@@ -5,7 +5,6 @@ import static de.srsoftware.tools.Optionals.nullable;
|
||||
import static java.lang.System.Logger.Level.DEBUG;
|
||||
import static java.lang.System.Logger.Level.WARNING;
|
||||
import static java.net.HttpURLConnection.*;
|
||||
import static java.text.MessageFormat.format;
|
||||
|
||||
import com.sun.net.httpserver.HttpExchange;
|
||||
import de.srsoftware.tools.Path;
|
||||
@@ -72,7 +71,5 @@ public abstract class BaseHandler extends PathHandler {
|
||||
return sendEmptyResponse(HTTP_UNAUTHORIZED,ex);
|
||||
}
|
||||
|
||||
public boolean notImplemented(HttpExchange ex,String method,Object clazz) throws IOException{
|
||||
return sendContent(ex,HTTP_NOT_IMPLEMENTED,format("{0}.{1} not implemented",clazz.getClass().getSimpleName(),method));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* © SRSoftware 2025 */
|
||||
package de.srsoftware.umbrella.core;
|
||||
|
||||
import de.srsoftware.umbrella.core.model.Company;
|
||||
|
||||
public class Tuple<A,B>{
|
||||
public final A a;
|
||||
|
||||
@@ -7,6 +7,7 @@ import static de.srsoftware.umbrella.core.ResponseCode.HTTP_UNPROCESSABLE;
|
||||
import static java.lang.System.Logger.Level.ERROR;
|
||||
import static java.lang.System.Logger.Level.WARNING;
|
||||
import static java.net.HttpURLConnection.HTTP_FORBIDDEN;
|
||||
import static java.net.HttpURLConnection.HTTP_NOT_FOUND;
|
||||
import static java.text.MessageFormat.format;
|
||||
|
||||
|
||||
@@ -51,6 +52,10 @@ public class UmbrellaException extends Exception{
|
||||
return new UmbrellaException(HTTP_UNPROCESSABLE, ERROR_MISSING_FIELD, field);
|
||||
}
|
||||
|
||||
public static UmbrellaException notFound(String message, Object... fills) {
|
||||
return new UmbrellaException(HTTP_NOT_FOUND,message,fills);
|
||||
}
|
||||
|
||||
public int statusCode(){
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user