|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hippoecm.hst.jaxrs.services.AbstractResource
public abstract class AbstractResource
Field Summary | |
---|---|
static String |
BEANS_ANNOTATED_CLASSES_CONF_PARAM
|
static String |
HST_MOUNT_REL_PREFIX
|
static String |
HST_REST_RELATIONS_BASE_URI
|
static String |
MOUNT_ALIAS_ASSETS
|
static String |
MOUNT_ALIAS_GALLERY
|
static String |
MOUNT_ALIAS_REST
|
static String |
MOUNT_ALIAS_SITE
|
Constructor Summary | |
---|---|
AbstractResource()
|
Method Summary | ||
---|---|---|
protected String |
deleteHippoBean(javax.servlet.http.HttpServletRequest servletRequest,
HippoBean hippoBean)
|
|
List<Class<? extends HippoBean>> |
getAnnotatedClasses(HstRequestContext requestContext)
|
|
String |
getAnnotatedClassesResourcePath()
|
|
protected HippoBean |
getChildBeanByRelPathOrPrimaryNodeType(HippoBean hippoBean,
String relPath,
String primaryNodeType)
|
|
protected ObjectBeanPersistenceManager |
getContentPersistenceManager(HstRequestContext requestContext)
Deprecated. Use getPersistableSession(HstRequestContext) with Persistable annotation on the method, or
getPersistenceManager(HstRequestContext, Session) with getPersistableSession(HstRequestContext) argument instead. |
|
ContentRewriter<String> |
getContentRewriter()
|
|
protected String |
getHstQualifiedLinkRel(String simpleRel)
|
|
HstQueryManager |
getHstQueryManager(HstRequestContext requestContext)
|
|
HstQueryManager |
getHstQueryManager(javax.jcr.Session session,
HstRequestContext requestContext)
|
|
protected String |
getLinkMountRelation(String mountName)
|
|
HippoFolderBean |
getMountContentBaseBean(HstRequestContext requestContext)
|
|
protected Link |
getMountLink(HstRequestContext requestContext,
HippoBean hippoBean,
String mountAliasName,
String subPath)
|
|
protected Link |
getNodeLink(HstRequestContext requestContext,
HippoBean hippoBean)
|
|
ObjectConverter |
getObjectConverter(HstRequestContext requestContext)
|
|
protected javax.jcr.Session |
getPersistableSession(HstRequestContext requestContext)
Creates a persistable JCR session with the default credentials |
|
protected javax.jcr.Session |
getPersistableSession(HstRequestContext requestContext,
javax.jcr.Credentials credentials)
Creates a persistable JCR session with provided credentials. |
|
protected ObjectBeanPersistenceManager |
getPersistenceManager(HstRequestContext requestContext)
Creates and returns a persistence manager with the default session of the requestContext. |
|
protected ObjectBeanPersistenceManager |
getPersistenceManager(HstRequestContext requestContext,
javax.jcr.Session persistableSession)
Creates and returns a persistence manager with the specified session. |
|
protected String |
getQualifiedLinkRel(String simpleRel)
|
|
protected String |
getQualifiedLinkRel(String iri,
String simpleRel)
|
|
protected HippoBean |
getRequestContentBean(HstRequestContext requestContext)
Returns the content HippoBean for the current request. |
|
protected
|
getRequestContentBean(HstRequestContext requestContext,
Class<T> beanMappingClass)
Returns the content HippoBean of type T for the current request. |
|
protected HstRequestContext |
getRequestContext(javax.servlet.http.HttpServletRequest servletRequest)
|
|
protected Link |
getRestLink(HstRequestContext requestContext,
HippoBean hippoBean,
String subPath)
|
|
String |
getRestRelationsBaseUri()
|
|
protected Link |
getSiteLink(HstRequestContext requestContext,
HippoBean hippoBean)
|
|
boolean |
isPageLinksExternal()
|
|
void |
setAnnotatedClasses(List<Class<? extends HippoBean>> annotatedClasses)
|
|
void |
setAnnotatedClassesResourcePath(String annotatedClassesResourcePath)
|
|
void |
setContentRewriter(ContentRewriter<String> contentRewriter)
|
|
void |
setHstQueryManagerFactory(HstQueryManagerFactory hstQueryManagerFactory)
|
|
void |
setObjectConverter(ObjectConverter objectConverter)
|
|
void |
setPageLinksExternal(boolean pageLinksExternal)
|
|
void |
setRestRelationsBaseUri(String restRelationsBaseUri)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String BEANS_ANNOTATED_CLASSES_CONF_PARAM
public static final String MOUNT_ALIAS_REST
public static final String MOUNT_ALIAS_SITE
public static final String MOUNT_ALIAS_GALLERY
public static final String MOUNT_ALIAS_ASSETS
public static final String HST_REST_RELATIONS_BASE_URI
public static final String HST_MOUNT_REL_PREFIX
Constructor Detail |
---|
public AbstractResource()
Method Detail |
---|
public String getAnnotatedClassesResourcePath()
public void setAnnotatedClassesResourcePath(String annotatedClassesResourcePath)
public List<Class<? extends HippoBean>> getAnnotatedClasses(HstRequestContext requestContext)
public void setAnnotatedClasses(List<Class<? extends HippoBean>> annotatedClasses)
public ObjectConverter getObjectConverter(HstRequestContext requestContext)
public void setObjectConverter(ObjectConverter objectConverter)
public HstQueryManager getHstQueryManager(HstRequestContext requestContext)
requestContext
-
public HstQueryManager getHstQueryManager(javax.jcr.Session session, HstRequestContext requestContext)
public void setHstQueryManagerFactory(HstQueryManagerFactory hstQueryManagerFactory)
public String getRestRelationsBaseUri()
public void setRestRelationsBaseUri(String restRelationsBaseUri)
public boolean isPageLinksExternal()
public void setPageLinksExternal(boolean pageLinksExternal)
public ContentRewriter<String> getContentRewriter()
public void setContentRewriter(ContentRewriter<String> contentRewriter)
protected ObjectBeanPersistenceManager getContentPersistenceManager(HstRequestContext requestContext) throws javax.jcr.RepositoryException
getPersistableSession(HstRequestContext)
with Persistable
annotation on the method, or
getPersistenceManager(HstRequestContext, Session)
with getPersistableSession(HstRequestContext)
argument instead.
requestContext
-
javax.jcr.RepositoryException
protected ObjectBeanPersistenceManager getPersistenceManager(HstRequestContext requestContext) throws javax.jcr.RepositoryException
Note: when the operation is annotated with Persistable
, the default session of the requestContext
should already be a persistable (writable) session.
requestContext
-
javax.jcr.RepositoryException
protected ObjectBeanPersistenceManager getPersistenceManager(HstRequestContext requestContext, javax.jcr.Session persistableSession) throws javax.jcr.RepositoryException
requestContext
- persistableSession
-
javax.jcr.RepositoryException
protected HstRequestContext getRequestContext(javax.servlet.http.HttpServletRequest servletRequest)
protected <T extends HippoBean> T getRequestContentBean(HstRequestContext requestContext, Class<T> beanMappingClass) throws ObjectBeanManagerException
beanMappingClass for the relative content path of the
resolved sitemap item a ObjectBeanManagerException is thrown
If there is no resolved sitemap item, null
is returned.
- Type Parameters:
T
- - Parameters:
requestContext
- beanMappingClass
-
- Returns:
- a bean of type T
- Throws:
ObjectBeanManagerException
- when there cannot be returned a bean
protected HippoBean getRequestContentBean(HstRequestContext requestContext) throws ObjectBeanManagerException
requestContext
- beanMappingClass
-
ObjectBeanManagerException
- when there cannot be returned a beanpublic HippoFolderBean getMountContentBaseBean(HstRequestContext requestContext) throws ObjectBeanManagerException
requestContext
-
ObjectBeanManagerException
- when there cannot be returned a site content base beanprotected String deleteHippoBean(javax.servlet.http.HttpServletRequest servletRequest, HippoBean hippoBean) throws javax.jcr.RepositoryException, ObjectBeanPersistenceException
javax.jcr.RepositoryException
ObjectBeanPersistenceException
protected HippoBean getChildBeanByRelPathOrPrimaryNodeType(HippoBean hippoBean, String relPath, String primaryNodeType)
protected String getQualifiedLinkRel(String iri, String simpleRel)
protected String getQualifiedLinkRel(String simpleRel)
protected String getHstQualifiedLinkRel(String simpleRel)
protected String getLinkMountRelation(String mountName)
protected Link getNodeLink(HstRequestContext requestContext, HippoBean hippoBean)
protected Link getRestLink(HstRequestContext requestContext, HippoBean hippoBean, String subPath)
protected Link getSiteLink(HstRequestContext requestContext, HippoBean hippoBean)
protected Link getMountLink(HstRequestContext requestContext, HippoBean hippoBean, String mountAliasName, String subPath)
protected javax.jcr.Session getPersistableSession(HstRequestContext requestContext) throws javax.jcr.RepositoryException
Note: The client should invoke logout()
method on the session after use.
Internally, Session.impersonate(Credentials)
method will be used to create a
persistable JCR session. The method is invoked on the session from the session pooling repository.
requestContext
-
javax.jcr.RepositoryException
protected javax.jcr.Session getPersistableSession(HstRequestContext requestContext, javax.jcr.Credentials credentials) throws javax.jcr.RepositoryException
Note: The client should invoke logout()
method on the session after use.
Internally, Session.impersonate(Credentials)
method will be used to create a
persistable JCR session. The method is invoked on the session from the session pooling repository.
requestContext
-
javax.jcr.RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |