@Deprecated
public class HtmlResponse
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PN_CHANGE_LOG
Deprecated.
human readable changelog
|
static java.lang.String |
PN_ERROR
Deprecated.
The Throwable caught while processing the request.
|
static java.lang.String |
PN_IS_CREATED
Deprecated.
Indicating whether request processing created new data.
|
static java.lang.String |
PN_LOCATION
Deprecated.
externally mapped location url of the modified path
|
static java.lang.String |
PN_PARENT_LOCATION
Deprecated.
externally mapped location url of the parent of the modified path
|
static java.lang.String |
PN_PATH
Deprecated.
the path of the modified item.
|
static java.lang.String |
PN_REFERER
Deprecated.
the referrer of the request
|
static java.lang.String |
PN_STATUS_CODE
Deprecated.
status code.
|
static java.lang.String |
PN_STATUS_MESSAGE
Deprecated.
some human readable status message
|
static java.lang.String |
PN_TITLE
Deprecated.
some human readable title like: 200 Created /foo/bar
|
Constructor and Description |
---|
HtmlResponse()
Deprecated.
Creates a new html response with default settings, which is
null for almost all properties except the
isCreateRequest() which defaults to false . |
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
getError()
Deprecated.
Returns any recorded error or
null |
java.lang.String |
getLocation()
Deprecated.
Returns the location of the modification.
|
java.lang.String |
getParentLocation()
Deprecated.
Returns the parent location of the modification.
|
java.lang.String |
getPath()
Deprecated.
Returns the absolute path of the item upon which the request operated.
|
java.lang.Object |
getProperty(java.lang.String name)
Deprecated.
Returns the generic response property with the given name and type or
null if no such property exists. |
<Type> Type |
getProperty(java.lang.String name,
java.lang.Class<Type> type)
Deprecated.
Returns the generic response property with the given name and type or
null if no such property exists or the property is not of
the requested type. |
java.lang.String |
getReferer()
Deprecated.
Returns the referer as from the 'referer' request header.
|
int |
getStatusCode()
Deprecated.
Returns the status code of this instance.
|
java.lang.String |
getStatusMessage()
Deprecated.
Get the status message
|
boolean |
isCreateRequest()
Deprecated.
Returns
true if this was a create request. |
boolean |
isSuccessful()
Deprecated.
|
void |
onChange(java.lang.String type,
java.lang.String... arguments)
Deprecated.
Records a generic change of the given
type . |
void |
onCopied(java.lang.String srcPath,
java.lang.String dstPath)
Deprecated.
Records a 'copied' change.
|
void |
onCreated(java.lang.String path)
Deprecated.
Records a 'created' change
|
void |
onDeleted(java.lang.String path)
Deprecated.
Records a 'deleted' change
|
void |
onModified(java.lang.String path)
Deprecated.
Records a 'modified' change
|
void |
onMoved(java.lang.String srcPath,
java.lang.String dstPath)
Deprecated.
Records a 'moved' change.
|
void |
send(HttpServletResponse response,
boolean setStatus)
Deprecated.
Writes the response to the given writer and replaces all ${var} patterns
by the value of the respective property.
|
void |
setCreateRequest(boolean isCreateRequest)
Deprecated.
Sets whether the request was a create request or not.
|
void |
setError(java.lang.Throwable error)
Deprecated.
Set the error
|
void |
setLocation(java.lang.String location)
Deprecated.
Set the location
|
void |
setParentLocation(java.lang.String parentLocation)
Deprecated.
Set the parent location
|
void |
setPath(java.lang.String path)
Deprecated.
Sets the absolute path of the item upon which the request operated.
|
void |
setProperty(java.lang.String name,
java.lang.Object value)
Deprecated.
Sets a generic response property with the given
|
void |
setReferer(java.lang.String referer)
Deprecated.
Sets the referer property
|
void |
setStatus(int code,
java.lang.String message)
Deprecated.
sets the response status code properties
|
void |
setTitle(java.lang.String title)
Deprecated.
Sets the title of the response message
|
public static final java.lang.String PN_TITLE
public static final java.lang.String PN_STATUS_CODE
public static final java.lang.String PN_STATUS_MESSAGE
public static final java.lang.String PN_LOCATION
public static final java.lang.String PN_PARENT_LOCATION
public static final java.lang.String PN_PATH
public static final java.lang.String PN_REFERER
public static final java.lang.String PN_IS_CREATED
false
and may be changed by calling
the setCreateRequest(boolean)
method.public static final java.lang.String PN_CHANGE_LOG
public static final java.lang.String PN_ERROR
setError(Throwable)
method is called.public HtmlResponse()
null
for almost all properties except the
isCreateRequest()
which defaults to false
.public java.lang.String getReferer()
public void setReferer(java.lang.String referer)
referer
- The referrer to setpublic java.lang.String getPath()
If the setPath(String)
method has not been called yet, this
method returns null
.
null
.public void setPath(java.lang.String path)
path
- The pathpublic boolean isCreateRequest()
true
if this was a create request.
Before calling the setCreateRequest(boolean)
method, this method
always returns false
.
true
if this is a create requestpublic void setCreateRequest(boolean isCreateRequest)
isCreateRequest
- flag for the create requestpublic java.lang.String getLocation()
public void setLocation(java.lang.String location)
location
- The locationpublic java.lang.String getParentLocation()
public void setParentLocation(java.lang.String parentLocation)
parentLocation
- The parent locationpublic void setTitle(java.lang.String title)
title
- the titlepublic void setStatus(int code, java.lang.String message)
code
- the codemessage
- the messagepublic int getStatusCode()
setStatus(int, String)
method, the
status code is determined by checking if there was an error. If there
was an error, the response is assumed to be unsuccessful and 500 is returned.
If there is no error, the response is assumed to be successful and 200 is returned.public java.lang.String getStatusMessage()
public java.lang.Throwable getError()
null
null
public void setError(java.lang.Throwable error)
error
- The errorpublic boolean isSuccessful()
true
if successfulpublic void onModified(java.lang.String path)
path
- path of the item that was modifiedpublic void onCreated(java.lang.String path)
path
- path of the item that was createdpublic void onDeleted(java.lang.String path)
path
- path of the item that was deletedpublic void onMoved(java.lang.String srcPath, java.lang.String dstPath)
Note: the moved change only records the basic move command. the implied changes on the moved properties and sub nodes are not recorded.
srcPath
- source path of the node that was moveddstPath
- destination path of the node that was moved.public void onCopied(java.lang.String srcPath, java.lang.String dstPath)
Note: the copy change only records the basic copy command. the implied changes on the copied properties and sub nodes are not recorded.
srcPath
- source path of the node that was copieddstPath
- destination path of the node that was copied.public void onChange(java.lang.String type, java.lang.String... arguments)
type
.
The change is added to the internal list of changes with the syntax of a
method call, where the type
is the method name and the
arguments
are the string arguments to the method enclosed in
double quotes. For example, the the call
onChange("sameple", "arg1", "arg2");is aded as
sample("arg1", "arg2")to the internal list of changes.
type
- The type of the modificationarguments
- The arguments to the modificationspublic void setProperty(java.lang.String name, java.lang.Object value)
name
- name of the propertyvalue
- value of the propertypublic <Type> Type getProperty(java.lang.String name, java.lang.Class<Type> type)
null
if no such property exists or the property is not of
the requested type.Type
- The type to getname
- The property nametype
- The type to getnull
.public java.lang.Object getProperty(java.lang.String name)
null
if no such property exists.name
- The property namenull
.public void send(HttpServletResponse response, boolean setStatus) throws java.io.IOException
response
- to send tosetStatus
- whether to set the status code on the responsejava.io.IOException
- if an i/o exception occurs"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"