info.magnolia.context
Class AbstractRepositoryStrategy

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

public abstract class AbstractRepositoryStrategy
extends Object
implements RepositoryAcquiringStrategy

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

Version:
$Id: AbstractRepositoryStrategy.java 41137 2011-01-06 18:19:25Z gjoseph $
Author:
philipp

Constructor Summary
AbstractRepositoryStrategy()
           
 
Method Summary
protected  void decSessionCount(String workspaceName)
           
 HierarchyManager getHierarchyManager(String repositoryId, String workspaceId)
           
protected  int getLocalSessionCount()
          Returns the number of sessions managed by this strategy.
 QueryManager getQueryManager(String repositoryId, String workspaceId)
           
protected  javax.jcr.Session getRepositorySession(String repositoryName, String workspaceName)
           
protected abstract  String getUserId()
           
protected  void incSessionCount(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.RepositoryAcquiringStrategy
getAccessManager, release
 

Constructor Detail

AbstractRepositoryStrategy

public AbstractRepositoryStrategy()
Method Detail

getHierarchyManager

public HierarchyManager getHierarchyManager(String repositoryId,
                                            String workspaceId)
Specified by:
getHierarchyManager in interface RepositoryAcquiringStrategy

getUserId

protected abstract String getUserId()

getQueryManager

public QueryManager getQueryManager(String repositoryId,
                                    String workspaceId)
Specified by:
getQueryManager in interface RepositoryAcquiringStrategy

getRepositorySession

protected javax.jcr.Session getRepositorySession(String repositoryName,
                                                 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)

incSessionCount

protected void incSessionCount(String workspaceName)

decSessionCount

protected void decSessionCount(String workspaceName)

getLocalSessionCount

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



Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.