Package com.day.cq.commons.servlets
Class HtmlStatusResponseFactory
- java.lang.Object
-
- com.day.cq.commons.servlets.HtmlStatusResponseFactory
-
public final class HtmlStatusResponseFactory extends Object
Factory for creating status responses for html requests.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static HtmlResponsecreateStatusResponse(boolean success, String message)Create a html status responsestatic HtmlResponsecreateStatusResponse(boolean success, String[] messages, String[] paths)Create a html status responsestatic HtmlResponsecreateStatusResponse(boolean success, String message, String path)Create a html status responsestatic HtmlResponsecreateStatusResponse(int status, String message)Create a html status responsestatic HtmlResponsecreateStatusResponse(int status, String message, String path)Create a html status response
-
-
-
Method Detail
-
createStatusResponse
public static HtmlResponse createStatusResponse(boolean success, String message, String path)
Create a html status response- Parameters:
success-trueif action succeededmessage- Action/error messagepath- path of the "modified" page- Returns:
- the html response
-
createStatusResponse
public static HtmlResponse createStatusResponse(int status, String message, String path)
Create a html status response- Parameters:
status- status codemessage- Action/error messagepath- path of the "modified" page- Returns:
- the html response
-
createStatusResponse
public static HtmlResponse createStatusResponse(boolean success, String message)
Create a html status response- Parameters:
success-trueif action succeededmessage- Action/error message- Returns:
- the html response
-
createStatusResponse
public static HtmlResponse createStatusResponse(int status, String message)
Create a html status response- Parameters:
status- http status codemessage- Action/error message- Returns:
- the html response
-
createStatusResponse
public static HtmlResponse createStatusResponse(boolean success, String[] messages, String[] paths)
Create a html status response- Parameters:
success-trueif action succeededmessages- Action/error messagespaths- paths of the "modified" page- Returns:
- the html response
-
-