public abstract class AbstractJaxrsService extends Object implements JAXRSService
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractJaxrsService.PathsAdjustedHttpServletRequestWrapper |
protected static class |
AbstractJaxrsService.ServletConfigImpl |
REQUEST_CONTENT_PATH_KEY
Modifier | Constructor and Description |
---|---|
protected |
AbstractJaxrsService(String serviceName,
Map<String,String> jaxrsConfigParameters) |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
protected List<Class<? extends HippoBean>> |
getAnnotatedClasses(HstRequestContext requestContext)
Deprecated.
since 2.28.00 not used any more. If custom annotated classes are needed, inject a
custom object converter in the HstRequestContext through ContentBeansTool. This method does not do
anything any more
|
String |
getAnnotatedClassesResourcePath()
Deprecated.
since 2.28.00 not used any more. If custom annotated classes are needed, inject a
custom object converter in the HstRequestContext through ContentBeansTool. This method does not do
anything any more
|
protected javax.jcr.Node |
getContentNode(javax.jcr.Session session,
String path) |
protected abstract String |
getJaxrsPathInfo(HstRequestContext requestContext,
javax.servlet.http.HttpServletRequest request)
Concrete implementations must implement this method to get the jaxrs pathInfo.
|
protected javax.servlet.http.HttpServletRequest |
getJaxrsRequest(HstRequestContext requestContext,
javax.servlet.http.HttpServletRequest request) |
protected javax.servlet.ServletConfig |
getJaxrsServletConfig(javax.servlet.ServletContext servletContext) |
protected String |
getJaxrsServletPath(HstRequestContext requestContext) |
protected String |
getMountContentPath(HstRequestContext requestContext) |
protected ObjectConverter |
getObjectConverter(HstRequestContext requestContext) |
HippoBean |
getRequestContentBean(HstRequestContext requestContext)
Returns the content HippoBean for the current request.
|
<T extends HippoBean> |
getRequestContentBean(HstRequestContext requestContext,
Class<T> beanMappingClass)
Returns the content HippoBean of type T for the current request.
|
String |
getServletPath() |
HippoFolderBean |
getSiteContentBaseBean(HstRequestContext requestContext) |
void |
initialize() |
abstract void |
invoke(HstRequestContext requestContext,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
setAnnotatedClasses(List<Class<? extends HippoBean>> annotatedClasses)
Deprecated.
since 2.28.00 not used any more. If custom annotated classes are needed, inject a
custom object converter in the HstRequestContext through ContentBeansTool. This method does not do
anything any more
|
void |
setAnnotatedClassesResourcePath(String annotatedClassesResourcePath)
Deprecated.
since 2.28.00 not used any more. If custom annotated classes are needed, inject a
custom object converter in the HstRequestContext through ContentBeansTool. This method does not do
anything any more
|
void |
setObjectConverter(ObjectConverter objectConverter)
Deprecated.
since 2.28.00 not used any more. If custom object converter is needed, inject a
custom object converter in the HstRequestContext through ContentBeansTool. This method does not do
anything any more
|
void |
setServletPath(String servletPath) |
public String getServletPath()
public void setServletPath(String servletPath)
@Deprecated public String getAnnotatedClassesResourcePath()
@Deprecated public void setAnnotatedClassesResourcePath(String annotatedClassesResourcePath)
@Deprecated public void setAnnotatedClasses(List<Class<? extends HippoBean>> annotatedClasses)
@Deprecated public void setObjectConverter(ObjectConverter objectConverter)
@Deprecated protected List<Class<? extends HippoBean>> getAnnotatedClasses(HstRequestContext requestContext)
protected ObjectConverter getObjectConverter(HstRequestContext requestContext)
public void initialize() throws ContainerException
initialize
in interface JAXRSService
ContainerException
public abstract void invoke(HstRequestContext requestContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws ContainerException
invoke
in interface JAXRSService
ContainerException
public void destroy()
destroy
in interface JAXRSService
protected javax.servlet.ServletConfig getJaxrsServletConfig(javax.servlet.ServletContext servletContext)
protected String getJaxrsServletPath(HstRequestContext requestContext) throws ContainerException
ContainerException
protected abstract String getJaxrsPathInfo(HstRequestContext requestContext, javax.servlet.http.HttpServletRequest request) throws ContainerException
HstRequestContext#getBaseURL()#getPathInfo()
because the baseURL has a pathInfo which has been stripped from matrix parametersrequestContext
- request
- ContainerException
protected javax.servlet.http.HttpServletRequest getJaxrsRequest(HstRequestContext requestContext, javax.servlet.http.HttpServletRequest request) throws ContainerException
ContainerException
protected String getMountContentPath(HstRequestContext requestContext)
protected javax.jcr.Node getContentNode(javax.jcr.Session session, String path) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public <T extends HippoBean> T getRequestContentBean(HstRequestContext requestContext, Class<T> beanMappingClass)
beanMappingClass for the relative content path of the
resolved sitemap item, null
is returned.
If there is no resolved sitemap item, null
is returned.
T
- requestContext
- beanMappingClass
- null
if there cannot be found a content bean for the requestContext or when the bean is not of type beanMappingClass
public HippoBean getRequestContentBean(HstRequestContext requestContext)
requestContext
- null
when not found, or no relative content path is present, or no resolved sitemap itempublic HippoFolderBean getSiteContentBaseBean(HstRequestContext requestContext)
requestContext
- null
otherwiseCopyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.