public class ERXResponse extends WOResponse
Modifier and Type | Class and Description |
---|---|
static class |
ERXResponse.Context |
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessor
Modifier and Type | Field and Description |
---|---|
static String |
ContentDispositionHeaderKey |
static String |
ContentTypeHeaderKey |
static String |
DisablePageCachingKey |
_channelCount, _channelPosition, _contentInputStream, _contentInputStreamBufferSize, _contentInputStreamLength, _fileChannel, _lastDitchErrorResponse
_content, _contentData, _contentEncoding, _cookies, _headerEncoding, _httpHeaders, _httpVersion, _storePageInBacktrackCache, _TheCookieKey, _TheSetCookieKey, _userInfo, HTTP_STATUS_FORBIDDEN, HTTP_STATUS_FOUND, HTTP_STATUS_INTERNAL_ERROR, HTTP_STATUS_MOVED_PERMANENTLY, HTTP_STATUS_NO_CONTENT, HTTP_STATUS_NOT_FOUND, HTTP_STATUS_OK, map, TheDefaultResponseEncoding
_CLASS
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
NullValue
Constructor and Description |
---|
ERXResponse() |
ERXResponse(int status)
Convenience constructor for direct actions.
|
ERXResponse(String content)
Convenience constructor for direct actions.
|
ERXResponse(String content,
int status)
Convenience constructor for direct actions.
|
ERXResponse(WOContext context) |
Modifier and Type | Method and Description |
---|---|
protected void |
__setContent(Object appendable) |
void |
_finalizeInContext(WOContext originalContext)
Overridden to insert the partials in the respective area.
|
boolean |
allowClientCaching() |
String |
contentDisposition() |
String |
contentType() |
void |
disableClientCaching()
Overridden to not call super if trying to download an attachment
to IE or if allowClientCaching is
true . |
boolean |
isAttachment() |
boolean |
isHTML() |
boolean |
isIE() |
boolean |
isPageCachingDisabled() |
static boolean |
isXHTML(WOResponse response)
Returns whether or not XHTML is turned on for the given response.
|
void |
mark(String key)
Call this to mark the place where a partial should get rendered.
|
void |
popContent(boolean append)
Pops the last _content off the stack, optionally appending the current
content to it.
|
static ERXResponse |
popPartial()
Returns the top-most response after this one has been pulled from the
stack.
|
void |
pushContent()
Pushes a new _content onto the stack, so you can write to this response
and capture the output.
|
static ERXResponse |
pushPartial(String key)
Returns the associated response for the supplied key.
|
void |
setAllowClientCaching(boolean allowClientCaching)
Can be used to enable client-side caching of the response content,
for example if the response contains a static image.
|
void |
setUserInfoForKey(Object value,
String key)
WO 5.4 API Sets the value for key in the user info dictionary.
|
static void |
setXHTML(WOResponse response,
boolean xhtml)
Sets whether the given response should turn on XHTML tag rendering.
|
Object |
userInfoForKey(String key)
WO 5.4 API
|
_appendTagAttributeAndValue, _isClientCachingDisabled, _redirectionResponseForAbsoluteURL, _redirectResponse, clone, contentInputStream, contentInputStreamBufferSize, contentInputStreamLength, generateResponse, setContentStream, setContentStream, setStatus, status, toString
_appendContentAsciiString, _contentLength, _finalizeCookies, _initCookies, _setHeaders, _stringByEscapingString, addCookie, appendContentCharacter, appendContentData, appendContentDOMDocumentFragment, appendContentHTMLAttributeValue, appendContentHTMLString, appendContentString, appendHeader, appendHeaders, canAccessFieldsDirectly, content, contentAsDOMDocument, contentEncoding, contentString, cookies, defaultEncoding, defaultHeaderEncoding, defaultURLEncoding, equals, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasHeaderForKey, headerForKey, headerForKey, headerKeys, headers, headersForKey, httpVersion, removeCookie, removeHeadersForKey, requiresHTMLEscaping, setContent, setContent, setContent, setContent, setContentDOMDocument, setContentEncoding, setDefaultEncoding, setDefaultHeaderEncoding, setDefaultURLEncoding, setHeader, setHeaders, setHeaders, setHTTPVersion, setStorePageInBacktrackCache, setUserInfo, storePageInBacktrackCache, stringByEscapingHTMLAttributeValue, stringByEscapingHTMLString, takeValueForKey, takeValueForKeyPath, unableToSetNullForKey, userInfo, valueForKey, valueForKeyPath
public static final String ContentDispositionHeaderKey
public static final String ContentTypeHeaderKey
public static final String DisablePageCachingKey
public ERXResponse()
public ERXResponse(String content, int status)
content
- text content of the responsestatus
- HTTP status code of the responsepublic ERXResponse(String content)
content
- text content of the responsepublic ERXResponse(int status)
status
- HTTP status code of the responsepublic ERXResponse(WOContext context)
protected void __setContent(Object appendable)
public void pushContent()
public void popContent(boolean append)
append
- public void mark(String key)
key
- public void _finalizeInContext(WOContext originalContext)
_finalizeInContext
in class WOResponse
originalContext
- contextpublic static ERXResponse pushPartial(String key)
key
- the key to push the partial aspublic static ERXResponse popPartial()
public void disableClientCaching()
true
.disableClientCaching
in class WOResponse
WOResponse.disableClientCaching()
public void setAllowClientCaching(boolean allowClientCaching)
disableClientCaching()
.
Note that additionally you might need to set the cache-control header.allowClientCaching
- true
prevents calling disableClientCaching()
public boolean allowClientCaching()
true
if client-side caching shall be allowedpublic boolean isPageCachingDisabled()
true
if disablePageCaching() has been called for
this responseDisablePageCachingKey
public void setUserInfoForKey(Object value, String key)
setUserInfoForKey
in class WOMessage
value
- value to add to userInfo()key
- key to add value underpublic Object userInfoForKey(String key)
userInfoForKey
in class WOMessage
key
- key to return value from userInfo() forWOMessage.userInfo()
for key, or null
if not availablepublic boolean isAttachment()
public boolean isHTML()
true
if the content type of this response indicates
HTMLpublic String contentDisposition()
public String contentType()
public boolean isIE()
true
if the Request this Response is for has a user
agent that indicates and IE browserpublic static void setXHTML(WOResponse response, boolean xhtml)
response
- the response to turn XHTML on forxhtml
- whether or not XHTML should be turned onpublic static boolean isXHTML(WOResponse response)
response
- the response to check XHTML forCopyright © 2002 – 2024 Project Wonder.