public class SessionFactory extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
SessionFactory.Prefix |
Constructor and Description |
---|
SessionFactory()
Default constructor
|
SessionFactory(FedoraRepository repo,
BatchService batchService)
Initialize a session factory for the given Repository
|
Modifier and Type | Method and Description |
---|---|
protected HttpSession |
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
|
FedoraSession |
getInternalSession()
Get a new JCR Session
|
HttpSession |
getSession(javax.servlet.http.HttpServletRequest servletRequest)
Get a JCR session for the given HTTP servlet request with a
SecurityContext attached
|
protected HttpSession |
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(FedoraRepository repo, BatchService batchService)
repo
- the repositorybatchService
- the transaction service@PostConstruct public void init()
public FedoraSession getInternalSession()
public HttpSession getSession(javax.servlet.http.HttpServletRequest servletRequest)
servletRequest
- the servlet requestRuntimeException
- if the transaction could not be foundprotected HttpSession createSession(javax.servlet.http.HttpServletRequest servletRequest)
servletRequest
- the servlet requestprotected HttpSession getSessionFromTransaction(javax.servlet.http.HttpServletRequest servletRequest, String txId)
servletRequest
- the servlet requesttxId
- the transaction idprotected String getEmbeddedId(javax.servlet.http.HttpServletRequest servletRequest, SessionFactory.Prefix prefix)
servletRequest
- the servlet requestprefix
- the prefix for the idCopyright © 2013–2017 DuraSpace, Inc.. All rights reserved.