public class HtmlResponse extends AbstractPostResponse
PN_ERROR, PN_IS_CREATED, PN_LOCATION, PN_PARENT_LOCATION, PN_PATH, PN_REFERER, PN_STATUS_CODE, PN_STATUS_MESSAGE, PN_TITLE
Constructor and Description |
---|
HtmlResponse(XSSAPI xss,
I18n i18n,
java.util.Locale locale) |
Modifier and Type | Method and Description |
---|---|
void |
addLink(java.lang.String rel,
java.lang.String href,
java.lang.String text)
Adds a link to the response.
|
void |
addRedirectLink(java.lang.String href,
java.lang.String text)
Adds a redirect link to indicate where the client should go after the post.
|
void |
onChange(java.lang.String type,
java.lang.String... arguments)
Records a generic change of the given
type with arguments. |
void |
onCopied(java.lang.String srcPath,
java.lang.String dstPath)
Records a 'copied' change.
|
void |
onCreated(java.lang.String path)
Records a 'created' change
|
void |
onDeleted(java.lang.String path)
Records a 'deleted' change
|
void |
onModified(java.lang.String path)
Records a 'modified' change
|
void |
onMoved(java.lang.String srcPath,
java.lang.String dstPath)
Records a 'moved' change.
|
void |
setDescription(java.lang.String description) |
void |
setGeneralError(int code)
Sets the general purpose error message using the given status code.
|
getError, getLocation, getParentLocation, getPath, getReferer, getStatusCode, getStatusMessage, isCreateRequest, isSuccessful, send, setCreateRequest, setError, setLocation, setParentLocation, setPath, setReferer, setStatus, setTitle
public void onModified(java.lang.String path)
AbstractPostResponse
onModified
in interface PostResponse
onModified
in class AbstractPostResponse
path
- path of the item that was modifiedpublic void onCreated(java.lang.String path)
AbstractPostResponse
onCreated
in interface PostResponse
onCreated
in class AbstractPostResponse
path
- path of the item that was createdpublic void onDeleted(java.lang.String path)
AbstractPostResponse
onDeleted
in interface PostResponse
onDeleted
in class AbstractPostResponse
path
- path of the item that was deletedpublic void onMoved(java.lang.String srcPath, java.lang.String dstPath)
AbstractPostResponse
Note: the moved change only records the basic move command. the implied changes on the moved properties and sub nodes are not recorded.
onMoved
in interface PostResponse
onMoved
in class AbstractPostResponse
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)
AbstractPostResponse
Note: the copy change only records the basic copy command. the implied changes on the copied properties and sub nodes are not recorded.
onCopied
in interface PostResponse
onCopied
in class AbstractPostResponse
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)
PostResponse
type
with arguments.type
- The type of the modificationarguments
- The arguments to the modificationspublic void setDescription(@CheckForNull java.lang.String description)
public void setGeneralError(int code)
code
- the status codepublic void addRedirectLink(@Nonnull java.lang.String href, @Nonnull java.lang.String text)
href
- the linktext
- the link textpublic void addLink(@Nonnull java.lang.String rel, @Nonnull java.lang.String href, @Nonnull java.lang.String text)
rel
- relationship attributehref
- the linktext
- the link textCopyright © 2010 - 2020 Adobe. All Rights Reserved