Package de.uplanet.lucy.server.scripting
Class ErrorResponseData
- java.lang.Object
-
- de.uplanet.lucy.server.scripting.ErrorResponseData
-
- All Implemented Interfaces:
de.uplanet.json.IJSONAppendableAware,de.uplanet.json.IJSONAware
public final class ErrorResponseData extends Object implements de.uplanet.json.IJSONAware, de.uplanet.json.IJSONAppendableAware
-
-
Constructor Summary
Constructors Constructor Description ErrorResponseData()ErrorResponseData(String p_strTitle, String p_strDescription, String p_strType, boolean p_bEmbedded, String p_strRedirectUrl, long p_lDelay)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescription()Get the description of this error response.longgetRedirectDelay()Get the redirect delay of this error response.StringgetRedirectUrl()Get the redirect URL of this error response.StringgetTitle()Get the title of this error response.StringgetType()Get the type of this error response.booleanhasData()Same ashasTitle() || hasRedirectUrl().booleanhasDescription()Check if this error response has a description.booleanhasRedirectDelay()Check if this error response has a redirect delay.booleanhasRedirectUrl()Check if this error response has a redirect URL.booleanhasTitle()Check if this error response has a title.booleanhasType()Check if this error response has a type.booleanisShowBare()Same as!isShowEmbedded().booleanisShowEmbedded()Get theshowEmbeddedflag of this error response.static ErrorResponseDatanoData()Create an empty error response object.voidsetDescription(String p_strDescription)Set the description of this error response.voidsetRedirectDelay(long p_lRedirectDelay)Set the redirect delay of this error response.voidsetRedirectUrl(String p_strRedirectUrl)Set the redirect URL of this error response.voidsetShowEmbedded(boolean p_bShowEmbedded)Set theshowEmbeddedflag of this error response.voidsetTitle(String p_strTitle)Set the title of this error response.voidsetType(String p_strType)Set the type of this error response.StringtoJSON()<T extends Appendable>
TwriteJSON(T p_appendable)Write this object as a JSON object to the given character stream.
-
-
-
Constructor Detail
-
ErrorResponseData
public ErrorResponseData()
-
ErrorResponseData
@ConstructorProperties({"title","description","type","showEmbedded","redirectUrl","redirectDelay"}) public ErrorResponseData(String p_strTitle, String p_strDescription, String p_strType, boolean p_bEmbedded, String p_strRedirectUrl, long p_lDelay)
-
-
Method Detail
-
noData
public static ErrorResponseData noData()
Create an empty error response object.- Returns:
- An empty error response object.
-
hasData
public boolean hasData()
Same ashasTitle() || hasRedirectUrl().
-
hasTitle
public boolean hasTitle()
Check if this error response has a title.- Returns:
trueif this error response has a title, orfalseotherwise.
-
getTitle
public String getTitle()
Get the title of this error response.- Returns:
- The title of this error response.
-
setTitle
public void setTitle(String p_strTitle)
Set the title of this error response.- Parameters:
p_strTitle- The title.
-
hasDescription
public boolean hasDescription()
Check if this error response has a description.- Returns:
trueif this error response has a description, orfalseotherwise.
-
getDescription
public String getDescription()
Get the description of this error response.- Returns:
- The description of this error response.
-
setDescription
public void setDescription(String p_strDescription)
Set the description of this error response.- Parameters:
p_strDescription- The description.
-
hasType
public boolean hasType()
Check if this error response has a type.- Returns:
trueif this error response has a type, orfalseotherwise.
-
getType
public String getType()
Get the type of this error response.- Returns:
- The type of this error response.
-
setType
public void setType(String p_strType)
Set the type of this error response.- Parameters:
p_strType- The type.
-
isShowEmbedded
public boolean isShowEmbedded()
Get theshowEmbeddedflag of this error response.- Returns:
- The
showEmbeddedflag of this error response.
-
setShowEmbedded
public void setShowEmbedded(boolean p_bShowEmbedded)
Set theshowEmbeddedflag of this error response.- Parameters:
p_bShowEmbedded- TheshowEmbeddedflag.
-
isShowBare
public boolean isShowBare()
Same as!isShowEmbedded().
-
hasRedirectUrl
public boolean hasRedirectUrl()
Check if this error response has a redirect URL.- Returns:
trueif this error response has a redirect URL, orfalseotherwise.
-
getRedirectUrl
public String getRedirectUrl()
Get the redirect URL of this error response.- Returns:
- The redirect URL of this error response.
-
setRedirectUrl
public void setRedirectUrl(String p_strRedirectUrl)
Set the redirect URL of this error response.- Parameters:
p_strRedirectUrl- The redirect URL.
-
hasRedirectDelay
public boolean hasRedirectDelay()
Check if this error response has a redirect delay.- Returns:
trueif this error response has a redirect delay, orfalseotherwise.
-
getRedirectDelay
public long getRedirectDelay()
Get the redirect delay of this error response.- Returns:
- The redirect delay of this error response.
-
setRedirectDelay
public void setRedirectDelay(long p_lRedirectDelay)
Set the redirect delay of this error response.- Parameters:
p_lRedirectDelay- The redirect delay.
-
writeJSON
public <T extends Appendable> T writeJSON(T p_appendable) throws IOException
Write this object as a JSON object to the given character stream.- Specified by:
writeJSONin interfacede.uplanet.json.IJSONAppendableAware- Throws:
IOException- If an I/O error occurred while writing to the given output stream.
-
toJSON
public String toJSON()
- Specified by:
toJSONin interfacede.uplanet.json.IJSONAware
-
-