info.magnolia.repository
Interface Provider

All Known Implementing Classes:
ProviderImpl

public interface Provider

Repository provider. This interface is intended to be implemented by all repository implementations that can be used by Magnolia.

Version:
$Id: Provider.java 41137 2011-01-06 18:19:25Z gjoseph $
Author:
Sameer Charles, Fabrizio Giustina

Method Summary
 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(String prefix, 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 stream)
          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.
 

Method Detail

init

void init(RepositoryMapping repositoryMapping)
          throws RepositoryNotInitializedException
Initializes repository, this depends on the underlying repository implementation. Use any available method to get the instance of Repository.

Parameters:
repositoryMapping - key value pars as define in repository.xml
Throws:
RepositoryNotInitializedException

getUnderlyingRepository

javax.jcr.Repository getUnderlyingRepository()
                                             throws RepositoryNotInitializedException
Gets the repository instance initialized on init() call.

Throws:
RepositoryNotInitializedException - if init failed to get repository

getUnderlineRepository

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

Throws:
RepositoryNotInitializedException

registerNamespace

void registerNamespace(String prefix,
                       String uri,
                       javax.jcr.Workspace workspace)
                       throws javax.jcr.RepositoryException
Register namespace with the repository. Refer JCR-170 specifications.

Parameters:
prefix - namespace prefix
uri - namespace URI
workspace - session workspace instance
Throws:
javax.jcr.RepositoryException

unregisterNamespace

void unregisterNamespace(String prefix,
                         javax.jcr.Workspace workspace)
                         throws javax.jcr.RepositoryException
Unregister namespace with the repository.

Parameters:
prefix - as registered previously
workspace - session workspace instance
Throws:
javax.jcr.RepositoryException

registerNodeTypes

void registerNodeTypes()
                       throws javax.jcr.RepositoryException
Node type registration is entirely dependent on the implementation. Refer JSR-170 specifications.

Throws:
javax.jcr.RepositoryException

registerNodeTypes

void registerNodeTypes(String configuration)
                       throws javax.jcr.RepositoryException
Node type registration is entirely dependent on the implementation. Refer JSR-170 specifications.

Throws:
javax.jcr.RepositoryException

registerNodeTypes

void registerNodeTypes(InputStream stream)
                       throws javax.jcr.RepositoryException
Node type registration is entirely dependent on the implementation. Refer JSR-170 specifications.

Parameters:
stream - , stream type depends on the implementation of this method
Throws:
javax.jcr.RepositoryException

registerWorkspace

boolean registerWorkspace(String workspaceName)
                          throws javax.jcr.RepositoryException
Register a new workspace in the current repository.

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

shutdownRepository

void shutdownRepository()


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