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
ConstructorDescriptionErrorResponseData
(String p_strTitle, String p_strDescription, String p_strType, boolean p_bEmbedded, String p_strRedirectUrl, long p_lDelay) -
Method Summary
Modifier and TypeMethodDescriptionGet the description of this error response.long
Get the redirect delay of this error response.Get the redirect URL of this error response.getTitle()
Get the title of this error response.getType()
Get the type of this error response.boolean
hasData()
Same ashasTitle() || hasRedirectUrl()
.boolean
Check if this error response has a description.boolean
Check if this error response has a redirect delay.boolean
Check if this error response has a redirect URL.boolean
hasTitle()
Check if this error response has a title.boolean
hasType()
Check if this error response has a type.boolean
Same as!
boolean
Get theshowEmbedded
flag of this error response.static ErrorResponseData
noData()
Create an empty error response object.void
setDescription
(String p_strDescription) Set the description of this error response.void
setRedirectDelay
(long p_lRedirectDelay) Set the redirect delay of this error response.void
setRedirectUrl
(String p_strRedirectUrl) Set the redirect URL of this error response.void
setShowEmbedded
(boolean p_bShowEmbedded) Set theshowEmbedded
flag of this error response.void
Set the title of this error response.void
Set the type of this error response.toJSON()
<T extends Appendable>
TwriteJSON
(T p_appendable) Write this object as a JSON object to the given character stream.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.uplanet.json.IJSONAppendableAware
writeJSON
-
Constructor Details
-
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 Details
-
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:
true
if this error response has a title, orfalse
otherwise.
-
getTitle
Get the title of this error response.- Returns:
- The title of this error response.
-
setTitle
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:
true
if this error response has a description, orfalse
otherwise.
-
getDescription
Get the description of this error response.- Returns:
- The description of this error response.
-
setDescription
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:
true
if this error response has a type, orfalse
otherwise.
-
getType
Get the type of this error response.- Returns:
- The type of this error response.
-
setType
Set the type of this error response.- Parameters:
p_strType
- The type.
-
isShowEmbedded
public boolean isShowEmbedded()Get theshowEmbedded
flag of this error response.- Returns:
- The
showEmbedded
flag of this error response.
-
setShowEmbedded
public void setShowEmbedded(boolean p_bShowEmbedded) Set theshowEmbedded
flag of this error response.- Parameters:
p_bShowEmbedded
- TheshowEmbedded
flag.
-
isShowBare
public boolean isShowBare()Same as!isShowEmbedded()
. -
hasRedirectUrl
public boolean hasRedirectUrl()Check if this error response has a redirect URL.- Returns:
true
if this error response has a redirect URL, orfalse
otherwise.
-
getRedirectUrl
Get the redirect URL of this error response.- Returns:
- The redirect URL of this error response.
-
setRedirectUrl
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:
true
if this error response has a redirect delay, orfalse
otherwise.
-
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
Write this object as a JSON object to the given character stream.- Specified by:
writeJSON
in interfacede.uplanet.json.IJSONAppendableAware
- Throws:
IOException
- If an I/O error occurred while writing to the given output stream.
-
toJSON
- Specified by:
toJSON
in interfacede.uplanet.json.IJSONAware
-