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