org.apache.chemistry.opencmis.jcr
Class JcrServiceFactory

java.lang.Object
  extended by org.apache.chemistry.opencmis.commons.impl.server.AbstractServiceFactory
      extended by org.apache.chemistry.opencmis.jcr.JcrServiceFactory
All Implemented Interfaces:
CmisServiceFactory

public class JcrServiceFactory
extends org.apache.chemistry.opencmis.commons.impl.server.AbstractServiceFactory

A CmisServiceFactory implementation which returns JcrService instances.


Field Summary
static BigInteger DEFAULT_DEPTH_OBJECTS
           
static BigInteger DEFAULT_DEPTH_TYPES
           
static BigInteger DEFAULT_MAX_ITEMS_OBJECTS
           
static BigInteger DEFAULT_MAX_ITEMS_TYPES
           
static String MOUNT_PATH_CONFIG
           
static String PREFIX_JCR_CONFIG
           
 
Constructor Summary
JcrServiceFactory()
           
 
Method Summary
protected  javax.jcr.Repository acquireJcrRepository(Map<String,String> jcrConfig)
          Acquire the JCR repository given a configuration.
protected  JcrService createJcrService(JcrRepository jcrRepository, CallContext context)
          Create a JcrService from a JcrRepositoryJcrRepository> and CallContext.
 void destroy()
          Cleans up the the factory instance.
 CmisService getService(CallContext context)
          Returns a CmisService object for the given CallContext.
 void init(Map<String,String> parameters)
          Initializes the factory instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MOUNT_PATH_CONFIG

public static final String MOUNT_PATH_CONFIG
See Also:
Constant Field Values

PREFIX_JCR_CONFIG

public static final String PREFIX_JCR_CONFIG
See Also:
Constant Field Values

DEFAULT_MAX_ITEMS_TYPES

public static final BigInteger DEFAULT_MAX_ITEMS_TYPES

DEFAULT_DEPTH_TYPES

public static final BigInteger DEFAULT_DEPTH_TYPES

DEFAULT_MAX_ITEMS_OBJECTS

public static final BigInteger DEFAULT_MAX_ITEMS_OBJECTS

DEFAULT_DEPTH_OBJECTS

public static final BigInteger DEFAULT_DEPTH_OBJECTS
Constructor Detail

JcrServiceFactory

public JcrServiceFactory()
Method Detail

init

public void init(Map<String,String> parameters)
Description copied from interface: CmisServiceFactory
Initializes the factory instance.

Specified by:
init in interface CmisServiceFactory
Overrides:
init in class org.apache.chemistry.opencmis.commons.impl.server.AbstractServiceFactory

destroy

public void destroy()
Description copied from interface: CmisServiceFactory
Cleans up the the factory instance.

Specified by:
destroy in interface CmisServiceFactory
Overrides:
destroy in class org.apache.chemistry.opencmis.commons.impl.server.AbstractServiceFactory

getService

public CmisService getService(CallContext context)
Description copied from interface: CmisServiceFactory
Returns a CmisService object for the given CallContext. When the CmisService object is not longer needed CmisService.close() will be called.

Specified by:
getService in interface CmisServiceFactory
Specified by:
getService in class org.apache.chemistry.opencmis.commons.impl.server.AbstractServiceFactory

acquireJcrRepository

protected javax.jcr.Repository acquireJcrRepository(Map<String,String> jcrConfig)
Acquire the JCR repository given a configuration. This implementation used ServiceRegistry.lookupProviders(Class) for locating RepositoryFactory instances. The first instance which can handle the jcrConfig parameters is used to acquire the repository.

Parameters:
jcrConfig - configuration determining the JCR repository to be returned
Returns:
Throws:
javax.jcr.RepositoryException

createJcrService

protected JcrService createJcrService(JcrRepository jcrRepository,
                                      CallContext context)
Create a JcrService from a JcrRepositoryJcrRepository> and CallContext.

Parameters:
jcrRepository -
context -
Returns:


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.