Interface RestResponse
-
- All Superinterfaces:
CustomTransformer
- All Known Implementing Classes:
AbstractRestResponse
,DefaultRestResponse
public interface RestResponse extends CustomTransformer
Base class that represents an HTTP response for a REST resource.- Since:
- 6.2.0
-
-
Method Summary
-
Methods inherited from interface com.aspectran.core.activity.response.transform.CustomTransformer
transform
-
-
-
-
Method Detail
-
getName
java.lang.String getName()
-
getData
java.lang.Object getData()
-
setData
void setData(java.lang.Object data)
Specifies response data.- Parameters:
data
- the response data
-
setData
void setData(java.lang.String name, java.lang.Object data)
Specifies response data with a name.- Parameters:
name
- the name of the response datadata
- the response data
-
isPrettyPrint
boolean isPrettyPrint()
-
setPrettyPrint
void setPrettyPrint(boolean prettyPrint)
Sets whether to apply indentations and line breaks when generating response data.- Parameters:
prettyPrint
- true if responding with indentations and line breaks; otherwise false
-
prettyPrint
RestResponse prettyPrint(boolean prettyPrint)
-
isFavorPathExtension
boolean isFavorPathExtension()
-
setFavorPathExtension
void setFavorPathExtension(boolean favorPathExtension)
-
favorPathExtension
RestResponse favorPathExtension(boolean favorPathExtension)
-
isIgnoreUnknownPathExtensions
boolean isIgnoreUnknownPathExtensions()
-
setIgnoreUnknownPathExtensions
void setIgnoreUnknownPathExtensions(boolean ignoreUnknownPathExtensions)
-
ignoreUnknownPathExtensions
RestResponse ignoreUnknownPathExtensions(boolean ignoreUnknownPathExtensions)
-
isIgnoreAcceptHeader
boolean isIgnoreAcceptHeader()
-
setIgnoreAcceptHeader
void setIgnoreAcceptHeader(boolean ignoreAcceptHeader)
-
ignoreAcceptHeader
RestResponse ignoreAcceptHeader(boolean ignoreAcceptHeader)
-
getDefaultContentType
MediaType getDefaultContentType()
-
setDefaultContentType
void setDefaultContentType(MediaType defaultContentType)
-
setDefaultContentType
void setDefaultContentType(java.lang.String defaultContentType)
-
defaultContentType
RestResponse defaultContentType(MediaType defaultContentType)
-
ok
RestResponse ok()
-
created
RestResponse created()
-
created
RestResponse created(java.lang.String location)
-
accepted
RestResponse accepted()
-
noContent
RestResponse noContent()
-
movedPermanently
RestResponse movedPermanently()
-
seeOther
RestResponse seeOther()
-
notModified
RestResponse notModified()
-
temporaryRedirect
RestResponse temporaryRedirect()
-
badRequest
RestResponse badRequest()
-
unauthorized
RestResponse unauthorized()
-
forbidden
RestResponse forbidden()
-
notFound
RestResponse notFound()
-
methodNotAllowed
RestResponse methodNotAllowed()
-
notAcceptable
RestResponse notAcceptable()
-
conflict
RestResponse conflict()
-
preconditionFailed
RestResponse preconditionFailed()
-
unsupportedMediaType
RestResponse unsupportedMediaType()
-
internalServerError
RestResponse internalServerError()
-
getStatus
int getStatus()
-
setStatus
void setStatus(int status)
-
setStatus
void setStatus(HttpStatus status)
-
getLocation
java.lang.String getLocation()
-
-