info.magnolia.jackrabbit
Class ProviderImpl

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

public class ProviderImpl
extends java.lang.Object
implements Provider

Version:
$Id: ProviderImpl.java 34499 2010-05-17 08:38:02Z had $
Author:
Sameer Charles, Fabrizio Giustina

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.Repository getUnderlineRepository()
          Deprecated. typo - use get #getUnderlyingRepository() - since 4.0
 javax.jcr.Repository getUnderlyingRepository()
          Gets the repository instance initialized on init() call.
 void init(RepositoryMapping repositoryMapping)
          Initializes repository, this depends on the underlying repository implementation.
 void registerNamespace(java.lang.String namespacePrefix, java.lang.String uri, javax.jcr.Workspace workspace)
          Register namespace with the repository.
 void registerNodeTypes()
          Node type registration is entirely dependent on the implementation.
 void registerNodeTypes(java.io.InputStream xmlStream)
          Node type registration is entirely dependent on the implementation.
 void registerNodeTypes(java.lang.String configuration)
          Node type registration is entirely dependent on the implementation.
 boolean registerWorkspace(java.lang.String workspaceName)
          Register a new workspace in the current repository
 void shutdownRepository()
           
 void unregisterNamespace(java.lang.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(RepositoryMapping 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.RepositoryMapping)

shutdownRepository

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

getUnderlineRepository

public javax.jcr.Repository getUnderlineRepository()
                                            throws RepositoryNotInitializedException
Deprecated. typo - use get #getUnderlyingRepository() - since 4.0

Specified by:
getUnderlineRepository in interface Provider
Throws:
RepositoryNotInitializedException

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(java.lang.String namespacePrefix,
                              java.lang.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(java.lang.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(java.lang.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(java.io.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(java.lang.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)


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