info.magnolia.jackrabbit
Class ProviderImpl

java.lang.Object
  extended by info.magnolia.jackrabbit.ProviderImpl
All Implemented Interfaces:
Provider

public class ProviderImpl
extends Object
implements Provider

Provider implementation for Apache JackRabbit JCR repository.


Constructor Summary
ProviderImpl()
           
 
Method Summary
protected  void checkXmlSettings()
          WORKAROUND for tomcat 5.0/jdk 1.5 problem tomcat\common\endorsed contains an xml-apis.jar needed by tomcat and loaded before all xmsl stuff present in the jdk (1.4 naming problem).
 javax.jcr.Session getSystemSession(String workspaceName)
           
 javax.jcr.Repository getUnderlyingRepository()
          Gets the repository instance initialized on init() call.
 void init(RepositoryDefinition repositoryMapping)
          Initializes repository, this depends on the underlying repository implementation.
 void registerNamespace(String namespacePrefix, String uri, javax.jcr.Workspace workspace)
          Register namespace with the repository.
 void registerNodeTypes()
          Node type registration is entirely dependent on the implementation.
 void registerNodeTypes(InputStream xmlStream)
          Node type registration is entirely dependent on the implementation.
 void registerNodeTypes(String configuration)
          Node type registration is entirely dependent on the implementation.
 boolean registerWorkspace(String workspaceName)
          Register a new workspace in the current repository.
 void shutdownRepository()
           
 void unregisterNamespace(String prefix, javax.jcr.Workspace workspace)
          Unregister namespace with the repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProviderImpl

public ProviderImpl()
Method Detail

init

public void init(RepositoryDefinition repositoryMapping)
          throws RepositoryNotInitializedException
Description copied from interface: Provider
Initializes repository, this depends on the underlying repository implementation. Use any available method to get the instance of Repository.

Specified by:
init in interface Provider
Parameters:
repositoryMapping - key value pars as define in repository.xml
Throws:
RepositoryNotInitializedException
See Also:
Provider.init(info.magnolia.repository.definition.RepositoryDefinition)

shutdownRepository

public void shutdownRepository()
Specified by:
shutdownRepository in interface Provider

getUnderlyingRepository

public javax.jcr.Repository getUnderlyingRepository()
                                             throws RepositoryNotInitializedException
Description copied from interface: Provider
Gets the repository instance initialized on init() call.

Specified by:
getUnderlyingRepository in interface Provider
Throws:
RepositoryNotInitializedException - if init failed to get repository

registerNamespace

public void registerNamespace(String namespacePrefix,
                              String uri,
                              javax.jcr.Workspace workspace)
                       throws javax.jcr.RepositoryException
Description copied from interface: Provider
Register namespace with the repository. Refer JCR-170 specifications.

Specified by:
registerNamespace in interface Provider
Parameters:
namespacePrefix - namespace prefix
uri - namespace URI
workspace - session workspace instance
Throws:
javax.jcr.RepositoryException
See Also:
Provider.registerNamespace(java.lang.String, java.lang.String, javax.jcr.Workspace)

unregisterNamespace

public void unregisterNamespace(String prefix,
                                javax.jcr.Workspace workspace)
                         throws javax.jcr.RepositoryException
Description copied from interface: Provider
Unregister namespace with the repository.

Specified by:
unregisterNamespace in interface Provider
Parameters:
prefix - as registered previously
workspace - session workspace instance
Throws:
javax.jcr.RepositoryException
See Also:
Provider.unregisterNamespace(java.lang.String, javax.jcr.Workspace)

registerNodeTypes

public void registerNodeTypes()
                       throws javax.jcr.RepositoryException
Description copied from interface: Provider
Node type registration is entirely dependent on the implementation. Refer JSR-170 specifications.

Specified by:
registerNodeTypes in interface Provider
Throws:
javax.jcr.RepositoryException
See Also:
Provider.registerNodeTypes(String)

registerNodeTypes

public void registerNodeTypes(String configuration)
                       throws javax.jcr.RepositoryException
Description copied from interface: Provider
Node type registration is entirely dependent on the implementation. Refer JSR-170 specifications.

Specified by:
registerNodeTypes in interface Provider
Throws:
javax.jcr.RepositoryException
See Also:
Provider.registerNodeTypes(java.lang.String)

registerNodeTypes

public void registerNodeTypes(InputStream xmlStream)
                       throws javax.jcr.RepositoryException
Description copied from interface: Provider
Node type registration is entirely dependent on the implementation. Refer JSR-170 specifications.

Specified by:
registerNodeTypes in interface Provider
Parameters:
xmlStream - , stream type depends on the implementation of this method
Throws:
javax.jcr.RepositoryException
See Also:
Provider.registerNodeTypes(java.io.InputStream)

checkXmlSettings

protected void checkXmlSettings()
WORKAROUND for tomcat 5.0/jdk 1.5 problem tomcat\common\endorsed contains an xml-apis.jar needed by tomcat and loaded before all xmsl stuff present in the jdk (1.4 naming problem). In the xml-apis.jar file the TransformerFactoryImpl is set to "org.apache.xalan.processor.TransformerFactoryImpl" instead of "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl". solution: remove the file xml-apis.jar from the directory OR manually change the javax.xml.transform.TransformerFactory system property


registerWorkspace

public boolean registerWorkspace(String workspaceName)
                          throws javax.jcr.RepositoryException
Description copied from interface: Provider
Register a new workspace in the current repository.

Specified by:
registerWorkspace in interface Provider
Parameters:
workspaceName - workspace name
Returns:
true true if the workspace is registered now of false if it was already registered
Throws:
javax.jcr.RepositoryException - if any exception occours during registration
See Also:
Provider.registerWorkspace(java.lang.String)

getSystemSession

public javax.jcr.Session getSystemSession(String workspaceName)
                                   throws javax.jcr.RepositoryException
Specified by:
getSystemSession in interface Provider
Throws:
javax.jcr.RepositoryException


Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.