Class HtmlResponseProxy
- java.lang.Object
-
- org.apache.sling.api.servlets.HtmlResponse
-
- org.apache.sling.servlets.post.impl.helper.HtmlResponseProxy
-
public class HtmlResponseProxy extends org.apache.sling.api.servlets.HtmlResponse
TheHtmlResponseProxy
extends the Sling APIHtmlResponse
overwriting all public methods and redirecting to a proxiedPostResponse
. As a consequence the underlying (extended) Sling APIHtmlResponse
will not be fed with data and thus will remain "empty".This class is mainly used by the deprecated
AbstractSlingPostOperation
for bridging into the newAbstractPostOperation
.
-
-
Constructor Summary
Constructors Constructor Description HtmlResponseProxy(PostResponse postResponse)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Throwable
getError()
String
getLocation()
String
getParentLocation()
String
getPath()
PostResponse
getPostResponse()
Object
getProperty(String name)
<Type> Type
getProperty(String name, Class<Type> type)
String
getReferer()
int
getStatusCode()
String
getStatusMessage()
boolean
isCreateRequest()
boolean
isSuccessful()
void
onChange(String type, String... arguments)
void
onCopied(String srcPath, String dstPath)
void
onCreated(String path)
void
onDeleted(String path)
void
onModified(String path)
void
onMoved(String srcPath, String dstPath)
void
send(javax.servlet.http.HttpServletResponse response, boolean setStatus)
void
setCreateRequest(boolean isCreateRequest)
void
setError(Throwable error)
void
setLocation(String location)
void
setParentLocation(String parentLocation)
void
setPath(String path)
void
setProperty(String name, Object value)
void
setReferer(String referer)
void
setStatus(int code, String message)
void
setTitle(String title)
-
-
-
Constructor Detail
-
HtmlResponseProxy
public HtmlResponseProxy(PostResponse postResponse)
-
-
Method Detail
-
getPostResponse
public PostResponse getPostResponse()
-
getProperty
public <Type> Type getProperty(String name, Class<Type> type)
- Overrides:
getProperty
in classorg.apache.sling.api.servlets.HtmlResponse
-
getProperty
public Object getProperty(String name)
- Overrides:
getProperty
in classorg.apache.sling.api.servlets.HtmlResponse
-
setProperty
public void setProperty(String name, Object value)
- Overrides:
setProperty
in classorg.apache.sling.api.servlets.HtmlResponse
-
getError
public Throwable getError()
- Overrides:
getError
in classorg.apache.sling.api.servlets.HtmlResponse
-
getLocation
public String getLocation()
- Overrides:
getLocation
in classorg.apache.sling.api.servlets.HtmlResponse
-
getParentLocation
public String getParentLocation()
- Overrides:
getParentLocation
in classorg.apache.sling.api.servlets.HtmlResponse
-
getPath
public String getPath()
- Overrides:
getPath
in classorg.apache.sling.api.servlets.HtmlResponse
-
getReferer
public String getReferer()
- Overrides:
getReferer
in classorg.apache.sling.api.servlets.HtmlResponse
-
getStatusCode
public int getStatusCode()
- Overrides:
getStatusCode
in classorg.apache.sling.api.servlets.HtmlResponse
-
getStatusMessage
public String getStatusMessage()
- Overrides:
getStatusMessage
in classorg.apache.sling.api.servlets.HtmlResponse
-
isCreateRequest
public boolean isCreateRequest()
- Overrides:
isCreateRequest
in classorg.apache.sling.api.servlets.HtmlResponse
-
isSuccessful
public boolean isSuccessful()
- Overrides:
isSuccessful
in classorg.apache.sling.api.servlets.HtmlResponse
-
onChange
public void onChange(String type, String... arguments)
- Overrides:
onChange
in classorg.apache.sling.api.servlets.HtmlResponse
-
onCopied
public void onCopied(String srcPath, String dstPath)
- Overrides:
onCopied
in classorg.apache.sling.api.servlets.HtmlResponse
-
onCreated
public void onCreated(String path)
- Overrides:
onCreated
in classorg.apache.sling.api.servlets.HtmlResponse
-
onDeleted
public void onDeleted(String path)
- Overrides:
onDeleted
in classorg.apache.sling.api.servlets.HtmlResponse
-
onModified
public void onModified(String path)
- Overrides:
onModified
in classorg.apache.sling.api.servlets.HtmlResponse
-
onMoved
public void onMoved(String srcPath, String dstPath)
- Overrides:
onMoved
in classorg.apache.sling.api.servlets.HtmlResponse
-
send
public void send(javax.servlet.http.HttpServletResponse response, boolean setStatus) throws IOException
- Overrides:
send
in classorg.apache.sling.api.servlets.HtmlResponse
- Throws:
IOException
-
setCreateRequest
public void setCreateRequest(boolean isCreateRequest)
- Overrides:
setCreateRequest
in classorg.apache.sling.api.servlets.HtmlResponse
-
setError
public void setError(Throwable error)
- Overrides:
setError
in classorg.apache.sling.api.servlets.HtmlResponse
-
setLocation
public void setLocation(String location)
- Overrides:
setLocation
in classorg.apache.sling.api.servlets.HtmlResponse
-
setParentLocation
public void setParentLocation(String parentLocation)
- Overrides:
setParentLocation
in classorg.apache.sling.api.servlets.HtmlResponse
-
setPath
public void setPath(String path)
- Overrides:
setPath
in classorg.apache.sling.api.servlets.HtmlResponse
-
setReferer
public void setReferer(String referer)
- Overrides:
setReferer
in classorg.apache.sling.api.servlets.HtmlResponse
-
setStatus
public void setStatus(int code, String message)
- Overrides:
setStatus
in classorg.apache.sling.api.servlets.HtmlResponse
-
setTitle
public void setTitle(String title)
- Overrides:
setTitle
in classorg.apache.sling.api.servlets.HtmlResponse
-
-