info.magnolia.context
Class AbstractRepositoryStrategy

java.lang.Object
  extended by info.magnolia.context.AbstractRepositoryStrategy
All Implemented Interfaces:
JCRSessionStrategy
Direct Known Subclasses:
DefaultRepositoryStrategy, SystemRepositoryStrategy

public abstract class AbstractRepositoryStrategy
extends Object
implements JCRSessionStrategy

Basic implementation of the RepositoryAcquiringStrategy providing storage of JCR sessions and hierarchy manager instances to extending classes.

Version:
$Id$

Field Summary
protected  RepositoryManager repositoryManager
           
 
Constructor Summary
protected AbstractRepositoryStrategy(RepositoryManager repositoryManager)
           
 
Method Summary
protected  int getLocalSessionCount()
          Returns the number of sessions managed by this strategy.
 javax.jcr.Session getSession(String workspaceName)
           
protected abstract  javax.jcr.Session internalGetSession(String workspaceName)
           
protected  void release(boolean checkObservation)
           
protected  void releaseSession(javax.jcr.Session session, boolean checkObservation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface info.magnolia.context.JCRSessionStrategy
release
 

Field Detail

repositoryManager

protected final RepositoryManager repositoryManager
Constructor Detail

AbstractRepositoryStrategy

@Inject
protected AbstractRepositoryStrategy(RepositoryManager repositoryManager)
Method Detail

getSession

public javax.jcr.Session getSession(String workspaceName)
                             throws javax.jcr.LoginException,
                                    javax.jcr.RepositoryException
Specified by:
getSession in interface JCRSessionStrategy
Throws:
javax.jcr.LoginException
javax.jcr.RepositoryException

internalGetSession

protected abstract javax.jcr.Session internalGetSession(String workspaceName)
                                                 throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

release

protected void release(boolean checkObservation)

releaseSession

protected void releaseSession(javax.jcr.Session session,
                              boolean checkObservation)

getLocalSessionCount

protected int getLocalSessionCount()
Returns the number of sessions managed by this strategy.



Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.