org.apache.sling.jcr.jackrabbit.server.impl
Class SlingServerRepository

java.lang.Object
  extended by org.apache.sling.jcr.base.AbstractSlingRepository
      extended by org.apache.sling.jcr.jackrabbit.server.impl.SlingServerRepository
All Implemented Interfaces:
Runnable, javax.jcr.Repository, org.apache.jackrabbit.api.management.RepositoryManager, org.apache.sling.jcr.api.SlingRepository

@Properties(value={@Property(name="service.vendor",value="The Apache Software Foundation"),@Property(name="service.description",value="Factory for embedded Jackrabbit Repository Instances")})
public class SlingServerRepository
extends org.apache.sling.jcr.base.AbstractSlingRepository
implements javax.jcr.Repository, org.apache.sling.jcr.api.SlingRepository, org.apache.jackrabbit.api.management.RepositoryManager

The SlingServerRepository TODO


Field Summary
static String REPOSITORY_CONFIG_URL
          The name of the configuration property defining the URL to the repository configuration file (value is "config").
static String REPOSITORY_HOME_DIR
          The name of the configuration property defining the file system directory where the repository files are located (value is "home").
static String REPOSITORY_REGISTRATION_NAME
           
 
Fields inherited from class org.apache.sling.jcr.base.AbstractSlingRepository
DEFAULT_ADMIN_PASS, DEFAULT_ADMIN_USER, DEFAULT_ANONYMOUS_PASS, DEFAULT_ANONYMOUS_USER, DEFAULT_POLL_ACTIVE, DEFAULT_POLL_INACTIVE, MIN_POLL, PROPERTY_ADMIN_PASS, PROPERTY_ADMIN_USER, PROPERTY_ANONYMOUS_PASS, PROPERTY_ANONYMOUS_USER, PROPERTY_DEFAULT_WORKSPACE, PROPERTY_POLL_ACTIVE, PROPERTY_POLL_INACTIVE
 
Fields inherited from interface javax.jcr.Repository
IDENTIFIER_STABILITY, IDENTIFIER_STABILITY_INDEFINITE_DURATION, IDENTIFIER_STABILITY_METHOD_DURATION, IDENTIFIER_STABILITY_SAVE_DURATION, IDENTIFIER_STABILITY_SESSION_DURATION, LEVEL_1_SUPPORTED, LEVEL_2_SUPPORTED, NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED, NODE_TYPE_MANAGEMENT_INHERITANCE, NODE_TYPE_MANAGEMENT_INHERITANCE_MINIMAL, NODE_TYPE_MANAGEMENT_INHERITANCE_MULTIPLE, NODE_TYPE_MANAGEMENT_INHERITANCE_SINGLE, NODE_TYPE_MANAGEMENT_MULTIPLE_BINARY_PROPERTIES_SUPPORTED, NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED, NODE_TYPE_MANAGEMENT_ORDERABLE_CHILD_NODES_SUPPORTED, NODE_TYPE_MANAGEMENT_OVERRIDES_SUPPORTED, NODE_TYPE_MANAGEMENT_PRIMARY_ITEM_NAME_SUPPORTED, NODE_TYPE_MANAGEMENT_PROPERTY_TYPES, NODE_TYPE_MANAGEMENT_RESIDUAL_DEFINITIONS_SUPPORTED, NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED, NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED, NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED, OPTION_ACCESS_CONTROL_SUPPORTED, OPTION_ACTIVITIES_SUPPORTED, OPTION_BASELINES_SUPPORTED, OPTION_JOURNALED_OBSERVATION_SUPPORTED, OPTION_LIFECYCLE_SUPPORTED, OPTION_LOCKING_SUPPORTED, OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED, OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED, OPTION_OBSERVATION_SUPPORTED, OPTION_QUERY_SQL_SUPPORTED, OPTION_RETENTION_SUPPORTED, OPTION_SHAREABLE_NODES_SUPPORTED, OPTION_SIMPLE_VERSIONING_SUPPORTED, OPTION_TRANSACTIONS_SUPPORTED, OPTION_UNFILED_CONTENT_SUPPORTED, OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED, OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED, OPTION_VERSIONING_SUPPORTED, OPTION_WORKSPACE_MANAGEMENT_SUPPORTED, OPTION_XML_EXPORT_SUPPORTED, OPTION_XML_IMPORT_SUPPORTED, QUERY_FULL_TEXT_SEARCH_SUPPORTED, QUERY_JOINS, QUERY_JOINS_INNER, QUERY_JOINS_INNER_OUTER, QUERY_JOINS_NONE, QUERY_LANGUAGES, QUERY_STORED_QUERIES_SUPPORTED, QUERY_XPATH_DOC_ORDER, QUERY_XPATH_POS_INDEX, REP_NAME_DESC, REP_VENDOR_DESC, REP_VENDOR_URL_DESC, REP_VERSION_DESC, SPEC_NAME_DESC, SPEC_VERSION_DESC, WRITE_SUPPORTED
 
Constructor Summary
SlingServerRepository()
           
 
Method Summary
protected  javax.jcr.Repository acquireRepository()
           
static void copyFile(org.osgi.framework.Bundle bundle, String entryPath, File destFile)
           
static void copyStream(InputStream source, File destFile)
           
 org.apache.jackrabbit.api.management.DataStoreGarbageCollector createDataStoreGarbageCollector()
           
protected  void disposeRepository(javax.jcr.Repository repository)
           
protected  javax.jcr.Credentials getAdministrativeCredentials(String adminUser)
          
protected  javax.jcr.Credentials getAnonCredentials(String anonUser)
          
protected  org.osgi.framework.ServiceRegistration registerService()
          Overrides the registerService method of AbstractSlingRepository, in order to register org.apache.jackrabbit.api.management.RepositoryManager Service using the component properties as service registration properties.
 void stop()
           
 
Methods inherited from class org.apache.sling.jcr.base.AbstractSlingRepository
activate, bindLog, deactivate, getComponentContext, getDefaultWorkspace, getDescriptor, getDescriptorKeys, getDescriptorValue, getDescriptorValues, getRepository, getRepositoryAccessor, isSingleValueDescriptor, isStandardDescriptor, log, log, login, login, login, login, loginAdministrative, pingAndCheck, pingRepository, run, setupRepository, tearDown, unbindLog, unregisterService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.sling.jcr.api.SlingRepository
getDefaultWorkspace, loginAdministrative
 
Methods inherited from interface javax.jcr.Repository
getDescriptor, getDescriptorKeys, getDescriptorValue, getDescriptorValues, isSingleValueDescriptor, isStandardDescriptor, login, login, login, login
 

Field Detail

REPOSITORY_CONFIG_URL

@Property(value="")
public static final String REPOSITORY_CONFIG_URL
The name of the configuration property defining the URL to the repository configuration file (value is "config").

If the configuration file is located in the local file system, the "file:" scheme must still be specified.

This parameter is mandatory for this activator to start the repository.

See Also:
Constant Field Values

REPOSITORY_HOME_DIR

@Property(value="")
public static final String REPOSITORY_HOME_DIR
The name of the configuration property defining the file system directory where the repository files are located (value is "home").

This parameter is mandatory for this activator to start the repository.

See Also:
Constant Field Values

REPOSITORY_REGISTRATION_NAME

@Property(value="")
public static final String REPOSITORY_REGISTRATION_NAME
See Also:
Constant Field Values
Constructor Detail

SlingServerRepository

public SlingServerRepository()
Method Detail

acquireRepository

protected javax.jcr.Repository acquireRepository()
Overrides:
acquireRepository in class org.apache.sling.jcr.base.AbstractSlingRepository

disposeRepository

protected void disposeRepository(javax.jcr.Repository repository)
Overrides:
disposeRepository in class org.apache.sling.jcr.base.AbstractSlingRepository

stop

public void stop()
Specified by:
stop in interface org.apache.jackrabbit.api.management.RepositoryManager
Throws:
UnsupportedOperationException - This method is not supported in this context.

createDataStoreGarbageCollector

public org.apache.jackrabbit.api.management.DataStoreGarbageCollector createDataStoreGarbageCollector()
                                                                                               throws javax.jcr.RepositoryException
Specified by:
createDataStoreGarbageCollector in interface org.apache.jackrabbit.api.management.RepositoryManager
Throws:
javax.jcr.RepositoryException

registerService

protected org.osgi.framework.ServiceRegistration registerService()
Overrides the registerService method of AbstractSlingRepository, in order to register org.apache.jackrabbit.api.management.RepositoryManager Service using the component properties as service registration properties.

Overrides:
registerService in class org.apache.sling.jcr.base.AbstractSlingRepository
Returns:
The OSGi ServiceRegistration object representing the registered service.
See Also:
AbstractSlingRepository.registerService()

copyFile

public static void copyFile(org.osgi.framework.Bundle bundle,
                            String entryPath,
                            File destFile)
                     throws FileNotFoundException,
                            IOException
Throws:
FileNotFoundException
IOException

copyStream

public static void copyStream(InputStream source,
                              File destFile)
                       throws FileNotFoundException,
                              IOException
Throws:
FileNotFoundException
IOException

getAdministrativeCredentials

protected javax.jcr.Credentials getAdministrativeCredentials(String adminUser)

Overrides:
getAdministrativeCredentials in class org.apache.sling.jcr.base.AbstractSlingRepository
See Also:
AbstractSlingRepository.getAdministrativeCredentials(java.lang.String)

getAnonCredentials

protected javax.jcr.Credentials getAnonCredentials(String anonUser)

Overrides:
getAnonCredentials in class org.apache.sling.jcr.base.AbstractSlingRepository
See Also:
AbstractSlingRepository.getAnonCredentials(java.lang.String)


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.