public class SessionFactory extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
SessionFactory.Prefix |
Constructor and Description |
---|
SessionFactory()
initialize an empty session factory
|
SessionFactory(javax.jcr.Repository repo,
TransactionService transactionService)
Initialize a session factory for the given Repository
|
Modifier and Type | Method and Description |
---|---|
protected javax.jcr.Session |
createSession(javax.servlet.http.HttpServletRequest servletRequest)
Create a JCR session for the given HTTP servlet request with a
SecurityContext attached.
|
protected String |
getEmbeddedId(javax.servlet.http.HttpServletRequest servletRequest,
SessionFactory.Prefix prefix)
Extract the id embedded at the beginning of a request path
|
javax.jcr.Session |
getInternalSession()
Get a new JCR Session
|
javax.jcr.Session |
getSession(javax.servlet.http.HttpServletRequest servletRequest)
Get a JCR session for the given HTTP servlet request with a
SecurityContext attached
|
protected javax.jcr.Session |
getSessionFromTransaction(javax.servlet.http.HttpServletRequest servletRequest,
String txId)
Retrieve a JCR session from an active transaction
|
void |
init()
Validate the spring wiring
|
public SessionFactory()
public SessionFactory(javax.jcr.Repository repo, TransactionService transactionService)
repo
- transactionService
- @PostConstruct public void init()
public javax.jcr.Session getInternalSession()
javax.jcr.RepositoryException
public javax.jcr.Session getSession(javax.servlet.http.HttpServletRequest servletRequest)
servletRequest
- RuntimeException
- if the transaction could not be foundprotected javax.jcr.Session createSession(javax.servlet.http.HttpServletRequest servletRequest) throws javax.jcr.RepositoryException
servletRequest
- javax.jcr.RepositoryException
- if the session could not be createdprotected javax.jcr.Session getSessionFromTransaction(javax.servlet.http.HttpServletRequest servletRequest, String txId)
servletRequest
- protected String getEmbeddedId(javax.servlet.http.HttpServletRequest servletRequest, SessionFactory.Prefix prefix)
servletRequest
- prefix
- the prefix for the idCopyright © 2013-2014 DuraSpace, Inc.. All Rights Reserved.