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, SlingRepository

public class SlingServerRepository
extends AbstractSlingRepository
implements javax.jcr.Repository, SlingRepository

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()
          Acquires the repository by calling the RepositoryAccessor.getRepositoryFromURL(String) with the value of the RepositoryAccessor.REPOSITORY_URL_OVERRIDE_PROPERTY framework or configuration property.
static void copyFile(org.osgi.framework.Bundle bundle, String entryPath, File destFile)
           
static void copyStream(InputStream source, File destFile)
           
protected  void disposeRepository(javax.jcr.Repository repository)
          Disposes off the given repository.
protected  javax.jcr.Credentials getAdministrativeCredentials(String adminUser)
          
protected  javax.jcr.Credentials getAnonCredentials(String anonUser)
          
 
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, registerService, 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

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

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

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()
Description copied from class: AbstractSlingRepository
Acquires the repository by calling the RepositoryAccessor.getRepositoryFromURL(String) with the value of the RepositoryAccessor.REPOSITORY_URL_OVERRIDE_PROPERTY framework or configuration property. If the property exists and a repository can be accessed using this property, that repository is returned. Otherwise null is returned.

Extensions of this class may overwrite this method with implementation specific acquisition semantics and may call this base class method or not as the implementation sees fit.

This method does not throw any Throwable but instead just returns null if not repository is available. Any problems trying to acquire the repository must be caught and logged as appropriate.

Overrides:
acquireRepository in class AbstractSlingRepository
Returns:
The acquired JCR Repository or null if not repository can be acquired.

disposeRepository

protected void disposeRepository(javax.jcr.Repository repository)
Description copied from class: AbstractSlingRepository
Disposes off the given repository. This base class implementation does nothing. Extensions should overwrite if any special disposal operation is required.

Overrides:
disposeRepository in class AbstractSlingRepository

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 AbstractSlingRepository
Parameters:
adminUser - the name of the administrative user.
Returns:
a Credentials implementation that represents the administrative user.
See Also:
AbstractSlingRepository.getAdministrativeCredentials(java.lang.String)

getAnonCredentials

protected javax.jcr.Credentials getAnonCredentials(String anonUser)

Overrides:
getAnonCredentials in class AbstractSlingRepository
Parameters:
anonUser - the user name of the anon user.
Returns:
a Credentials implementation that represents the anon user.
See Also:
AbstractSlingRepository.getAnonCredentials(java.lang.String)


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