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$
Author:
Sameer Charles, Fabrizio Giustina

Method Summary
 javax.jcr.Session getSystemSession(String workspaceName)
           
 javax.jcr.Repository getUnderlineRepository()
          Deprecated. since 4.0 - typo - use get #getUnderlyingRepository() instead
 javax.jcr.Repository getUnderlyingRepository()
          Gets the repository instance initialized on init() call.
 void init(RepositoryDefinition repositoryDefinition)
          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(RepositoryDefinition repositoryDefinition)
          throws RepositoryNotInitializedException
Initializes repository, this depends on the underlying repository implementation. Use any available method to get the instance of Repository.

Parameters:
repositoryDefinition - 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. since 4.0 - typo - use get #getUnderlyingRepository() instead

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()

getSystemSession

javax.jcr.Session getSystemSession(String workspaceName)
                                   throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.