org.springframework.extensions.jcr
Class RepositoryFactoryBean

java.lang.Object
  extended by org.springframework.extensions.jcr.RepositoryFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
RepositoryFactoryBean

public abstract class RepositoryFactoryBean
extends java.lang.Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean

Base class with common functionality for creating JCR repositories. Subclasses should extend this class for custom configuration.

Author:
Costin Leau, Sergio Bossa, Salvatore Incandela

Field Summary
protected  org.springframework.core.io.Resource configuration
          Repository configuration.
protected  javax.jcr.Repository repository
          The actual repository.
 
Constructor Summary
RepositoryFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
protected abstract  javax.jcr.Repository createRepository()
          Subclasses have to implement this method to allow specific JSR-170 implementation repository creation.
 void destroy()
           
 org.springframework.core.io.Resource getConfiguration()
           
 java.lang.Object getObject()
           
 java.lang.Class getObjectType()
           
 boolean isSingleton()
           
protected abstract  void resolveConfigurationResource()
          Subclasses have to implement this method to allow specific JSR-170 implementation repository configuration.
 void setConfiguration(org.springframework.core.io.Resource configuration)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configuration

protected org.springframework.core.io.Resource configuration
Repository configuration.


repository

protected javax.jcr.Repository repository
The actual repository.

Constructor Detail

RepositoryFactoryBean

public RepositoryFactoryBean()
Method Detail

resolveConfigurationResource

protected abstract void resolveConfigurationResource()
                                              throws java.lang.Exception
Subclasses have to implement this method to allow specific JSR-170 implementation repository configuration.

Throws:
java.lang.Exception

createRepository

protected abstract javax.jcr.Repository createRepository()
                                                  throws java.lang.Exception
Subclasses have to implement this method to allow specific JSR-170 implementation repository creation.

Returns:
Throws:
java.lang.Exception

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception
See Also:
InitializingBean.afterPropertiesSet()

destroy

public void destroy()
             throws java.lang.Exception
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
Throws:
java.lang.Exception
See Also:
DisposableBean.destroy()

getObject

public java.lang.Object getObject()
                           throws java.lang.Exception
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean
Throws:
java.lang.Exception
See Also:
FactoryBean.getObject()

getObjectType

public java.lang.Class getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean
See Also:
FactoryBean.getObjectType()

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean
See Also:
FactoryBean.isSingleton()

getConfiguration

public org.springframework.core.io.Resource getConfiguration()
Returns:
Returns the configuration.

setConfiguration

public void setConfiguration(org.springframework.core.io.Resource configuration)
Parameters:
configuration - The configuration to set.


Copyright © 2009. All Rights Reserved.