public abstract class AbstractResponseBuilder<RESOURCE,REQUEST,RESPONSE> extends java.lang.Object implements YResponseBuilder
| Modifier and Type | Field and Description |
|---|---|
protected de.hybris.platform.webservices.AbstractResponseBuilder.Operation |
operation |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractResponseBuilder(AbstractResource resource,
de.hybris.platform.webservices.AbstractResponseBuilder.Operation operation) |
protected |
AbstractResponseBuilder(de.hybris.platform.webservices.AbstractResponseBuilder.Operation operation) |
| Modifier and Type | Method and Description |
|---|---|
Response |
build()
Delegates to
ResponseBuilder#build() but sets appropriate response entity first. |
Response |
build(java.lang.Class<?> wrapperType)
Same as
YResponseBuilder.build() but wraps response entity into an instance of passed class first. |
protected abstract RESPONSE |
createResponseEntity(RESOURCE resourceEntity,
REQUEST requestEntity) |
REQUEST |
getRequestValue() |
AbstractResource |
getResource() |
RESOURCE |
getResourceValue() |
RESPONSE |
getRespEntity() |
ResponseBuilder |
getResponse()
Returns the wrapped
ResponseBuilder which is taken for building a Response |
ServiceLocator |
getServiceLocator() |
protected void |
processException(java.lang.String msg,
java.lang.Exception exception)
Throws a
WebApplicationException which interrupts any current processing and gives full control to jersey. |
void |
processRequest() |
void |
processRequest(boolean suppressNotFound) |
void |
setRequestValue(REQUEST requestEntity) |
void |
setResource(AbstractResource resource) |
protected de.hybris.platform.webservices.AbstractResponseBuilder.Operation operation
protected AbstractResponseBuilder(de.hybris.platform.webservices.AbstractResponseBuilder.Operation operation)
protected AbstractResponseBuilder(AbstractResource resource, de.hybris.platform.webservices.AbstractResponseBuilder.Operation operation)
public AbstractResource getResource()
public void setResource(AbstractResource resource)
public ServiceLocator getServiceLocator()
public RESOURCE getResourceValue()
public void setRequestValue(REQUEST requestEntity)
public REQUEST getRequestValue()
public void processRequest()
public void processRequest(boolean suppressNotFound)
protected abstract RESPONSE createResponseEntity(RESOURCE resourceEntity, REQUEST requestEntity) throws java.lang.Exception
java.lang.Exceptionpublic ResponseBuilder getResponse()
ResponseBuilder which is taken for building a ResponseResponseBuilderprotected void processException(java.lang.String msg,
java.lang.Exception exception)
throws WebApplicationException
WebApplicationException which interrupts any current processing and gives full control to jersey.
But before passed Exception gets evaluated and used to produce nice client output and notify loggers.msg - a message which shall be given to client as headlineexception - the exception which is taken to produce a short client error messageWebApplicationExceptionpublic Response build()
YResponseBuilderResponseBuilder#build() but sets appropriate response entity first.build in interface YResponseBuilderResponsepublic Response build(java.lang.Class<?> wrapperType)
YResponseBuilderYResponseBuilder.build() but wraps response entity into an instance of passed class first. Passed class is
constructed by taking the first appropriate COnstructor whose parameter type is assignable to entity type.build in interface YResponseBuilderwrapperType - type of wrapper classResponsepublic RESPONSE getRespEntity()
Copyright © 2018 SAP SE. All Rights Reserved.