test_class.declarator: providerManager
test_class.modifier: private
test_class.original_string: private AbstractSessionHolderProviderManager providerManager;
test_class.type: AbstractSessionHolderProviderManager
test_class.var_name: providerManager
test_class.declarator: providers
test_class.modifier: private
test_class.original_string: private List<SessionHolderProvider> providers;
test_class.type: List<SessionHolderProvider>
test_class.var_name: providers
test_class.declarator: repositoryName
test_class.modifier: private
test_class.original_string: private String repositoryName;
test_class.type: String
test_class.var_name: repositoryName
test_class.declarator: session
test_class.modifier: private
test_class.original_string: private Session session;
test_class.type: Session
test_class.var_name: session
test_class.declarator: repository
test_class.modifier: private
test_class.original_string: private Repository repository;
test_class.type: Repository
test_class.var_name: repository
test_class.declarator: sessionfactory
test_class.modifier: private
test_class.original_string: private SessionFactory sessionfactory;
test_class.type: SessionFactory
test_class.var_name: sessionfactory
test_class.declarator: customProvider
test_class.modifier: private
test_class.original_string: private SessionHolderProvider customProvider;
test_class.type: SessionHolderProvider
test_class.var_name: customProvider
test_class.file: se-jcr-commons/src/test/java/org/springframework/extensions/jcr/support/AbstractSessionHolderProviderManagerTest.java
test_class.identifier: AbstractSessionHolderProviderManagerTest
test_case.body: @Test
      public void testCustomSessionProvider() {
          // sanity check
          providers = new ArrayList<SessionHolderProvider>();
          providers.add(customProvider);
  
          replay(sessionfactory, session, repository);
  
          assertSame(customProvider, providerManager.getSessionProvider(repository));
      }
test_case.class_method_signature: AbstractSessionHolderProviderManagerTest.testCustomSessionProvider()
test_case.full_signature: @Test public void testCustomSessionProvider()
test_case.identifier: testCustomSessionProvider
test_case.invocations: add replay assertSame getSessionProvider
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCustomSessionProvider()
focal_class.declarator: LOG = LoggerFactory.getLogger(AbstractSessionHolderProviderManager.class)
focal_class.modifier: protected static final
focal_class.original_string: protected static final Logger LOG = LoggerFactory.getLogger(AbstractSessionHolderProviderManager.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: defaultProvider = new GenericSessionHolderProvider()
focal_class.modifier: protected
focal_class.original_string: protected SessionHolderProvider defaultProvider = new GenericSessionHolderProvider();
focal_class.type: SessionHolderProvider
focal_class.var_name: defaultProvider
focal_class.file: se-jcr-commons/src/main/java/org/springframework/extensions/jcr/support/AbstractSessionHolderProviderManager.java
focal_class.identifier: AbstractSessionHolderProviderManager
focal_class.interfaces: implements SessionHolderProviderManager
focal_class.class_method_signature: AbstractSessionHolderProviderManager.getProviders()
focal_class.full_signature: public abstract List<SessionHolderProvider> getProviders()
focal_class.identifier: getProviders
focal_class.modifiers: public abstract
focal_class.parameters: ()
focal_class.return: List<SessionHolderProvider>
focal_class.signature: List<SessionHolderProvider> getProviders()
focal_class.class_method_signature: AbstractSessionHolderProviderManager.getSessionProvider(Repository repository)
focal_class.full_signature: public SessionHolderProvider getSessionProvider(Repository repository)
focal_class.identifier: getSessionProvider
focal_class.modifiers: public
focal_class.parameters: (Repository repository)
focal_class.return: SessionHolderProvider
focal_class.signature: SessionHolderProvider getSessionProvider(Repository repository)
focal_method.body: public SessionHolderProvider getSessionProvider(Repository repository) {
          // graceful fallback
          if (repository == null)
              return defaultProvider;
  
          String key = repository.getDescriptor(Repository.REP_NAME_DESC);
          List<SessionHolderProvider> providers = getProviders();
  
          // search the provider
          for (int i = 0; i < providers.size(); i++) {
              SessionHolderProvider provider = providers.get(i);
              if (provider.acceptsRepository(key)) {
                  if (LOG.isDebugEnabled())
                      LOG.debug("specific SessionHolderProvider found for repository " + key);
                  return provider;
              }
          }
  
          // no provider found - return the default one
          if (LOG.isDebugEnabled())
              LOG.debug("no specific SessionHolderProvider found for repository " + key + "; using the default one");
          return defaultProvider;
      }
focal_method.class_method_signature: AbstractSessionHolderProviderManager.getSessionProvider(Repository repository)
focal_method.full_signature: public SessionHolderProvider getSessionProvider(Repository repository)
focal_method.identifier: getSessionProvider
focal_method.invocations: getDescriptor getProviders size get acceptsRepository isDebugEnabled debug isDebugEnabled debug
focal_method.modifiers: public
focal_method.parameters: (Repository repository)
focal_method.return: SessionHolderProvider
focal_method.signature: SessionHolderProvider getSessionProvider(Repository repository)