package org.analogweb.core.response;

import java.util.Map;

/**
 * @author snowgooseyk
 */
public final class BasicResponses {
    
    private BasicResponses(){
        // nop.
    }
    
    public static Text text(String text){
        return Text.with(text);
    }
    
    public static Html html(String text){
        return Html.with(text);
    }

    public static Html html(String template,Map<String, Object> parameters){
        return Html.as(template, parameters);
    }
    
    public static Redirect redirect(String to){
        return Redirect.to(to);
    }

    public static Json json(String json){
        return Json.with(json);
    }

    public static Json json(Object obj){
        return Json.as(obj);
    }

    public static Xml xml(String xml){
        return Xml.with(xml);
    }

    public static Xml xml(Object obj){
        return Xml.as(obj);
    }

    public static HttpStatus status(int statusCode){
        return HttpStatus.valueOf(statusCode);
    }

    public static HttpStatus status(String status){
        return HttpStatus.valueOf(status);
    }
}

@@ -121,25 +121,18 @@
 onses %7B%0A
-    %0A    
+%0A%09
 private 
@@ -151,41 +151,116 @@
 es()
+ 
 %7B%0A
-        // nop.%0A    %7D%0A    %0A    
+%09%09// nop.%0A%09%7D%0A%0A%09public static Acceptable acceptable(Object object) %7B%0A%09%09return Acceptable.as(object);%0A%09%7D%0A%0A%09
 publ
@@ -287,34 +287,29 @@
 String text)
+ 
 %7B%0A
-        
+%09%09
 return Text.
@@ -320,31 +320,21 @@
 (text);%0A
-    %7D%0A    %0A    
+%09%7D%0A%0A%09
 public s
@@ -340,32 +340,36 @@
 static Html html
+Text
 (String text)%7B%0A 
@@ -365,26 +365,21 @@
 ng text)
+ 
 %7B%0A
-        
+%09%09
 return H
@@ -394,27 +394,21 @@
 (text);%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 public s
@@ -439,16 +439,17 @@
 emplate,
+ 
 Map%3CStri
@@ -471,26 +471,21 @@
 ameters)
+ 
 %7B%0A
-        
+%09%09
 return H
@@ -518,23 +518,89 @@
 s);%0A
-    %7D%0A    %0A    
+%09%7D%0A%0A%09public static Html html(String template) %7B%0A%09%09return Html.as(template);%0A%09%7D%0A%0A%09
 publ
@@ -637,26 +637,21 @@
 ring to)
+ 
 %7B%0A
-        
+%09%09
 return R
@@ -666,27 +666,21 @@
 to(to);%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 public s
@@ -707,26 +707,21 @@
 ng json)
+ 
 %7B%0A
-        
+%09%09
 return J
@@ -736,27 +736,21 @@
 (json);%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 public s
@@ -772,34 +772,29 @@
 (Object obj)
+ 
 %7B%0A
-        
+%09%09
 return Json.
@@ -798,35 +798,29 @@
 on.as(obj);%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 public stati
@@ -840,26 +840,21 @@
 ing xml)
+ 
 %7B%0A
-        
+%09%09
 return X
@@ -867,27 +867,21 @@
 h(xml);%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 public s
@@ -905,26 +905,21 @@
 ect obj)
+ 
 %7B%0A
-        
+%09%09
 return X
@@ -930,27 +930,21 @@
 s(obj);%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 public s
@@ -982,26 +982,21 @@
 tusCode)
+ 
 %7B%0A
-        
+%09%09
 return H
@@ -1030,19 +1030,13 @@
 e);%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 publ
@@ -1081,18 +1081,13 @@
 tus)
+ 
 %7B%0A
-        
+%09%09
 retu
@@ -1121,12 +1121,9 @@
 s);%0A
-    
+%09
 %7D%0A%7D%0A

Add Acceptable to BasicResponses