public class JcrSessionFactory extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, SessionFactory
| Constructor and Description |
|---|
JcrSessionFactory(javax.jcr.Repository repository,
String workspaceName,
javax.jcr.Credentials credentials)
Constructor with all the required fields.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
destroy() |
javax.jcr.Session |
getSession()
Returns a JCR Session using the credentials and workspace on this JcrSessionFactory.
|
SessionHolder |
getSessionHolder(javax.jcr.Session session) |
String |
toString() |
public JcrSessionFactory(@NotNull
javax.jcr.Repository repository,
@Nullable
String workspaceName,
@NotNull
javax.jcr.Credentials credentials)
repository - JCR repositoryworkspaceName - optional workspace name, can by nullcredentials - mandatory credentials for connect to JCR repositorypublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanExceptionDisposableBean.destroy()public javax.jcr.Session getSession()
throws javax.jcr.RepositoryException
SessionFactory" Each Session object is associated one-to-one with a Workspace object. The Workspace object represents a `view` of an actual repository workspace entity as seen through the authorization settings of its associated Session." (quote from javax.jcr.Session javadoc).
getSession in interface SessionFactoryjavax.jcr.RepositoryExceptionSessionFactory.getSession()public String toString()
toString in class ObjectObject.toString()public SessionHolder getSessionHolder(@NotNull javax.jcr.Session session)
getSessionHolder in interface SessionFactoryCopyright © 2021. All rights reserved.