org.exoplatform.services.jcr.ext.registry
Class Registry

java.lang.Object
  extended by org.exoplatform.services.jcr.ext.registry.Registry
Direct Known Subclasses:
RegistryService

public abstract class Registry
extends java.lang.Object

Created by The eXo Platform SAS .
JCR based Services Registry abstraction. As interchange object all the methods use Nodes' wrappers to not to let using an arbitrary Type of Node. There is 2 phase modification of RegistryEntry (1) get or create RegistryEntry retrieves or creates new object in memory and (2) register/unregister stores the object permanently

Version:
$Id: Registry.java 35186 2009-08-07 14:23:43Z pnedonosko $
Author:
Gennady Azarenkov

Nested Class Summary
 class Registry.RegistryNode
          Internal Node wrapper which ensures the node of "exo:registry" type inside
 
Constructor Summary
Registry()
           
 
Method Summary
abstract  void createEntry(SessionProvider sessionProvider, java.lang.String groupPath, RegistryEntry entry)
          creates an entry in the group.
abstract  RegistryEntry getEntry(SessionProvider sessionProvider, java.lang.String entryPath)
          Returns existed RegistryEntry which wraps Node of "exo:registryEntry" type
abstract  Registry.RegistryNode getRegistry(SessionProvider sessionProvider)
          Returns Registry node object which wraps Node of "exo:registry" type (the whole registry tree)
abstract  void recreateEntry(SessionProvider sessionProvider, java.lang.String groupPath, RegistryEntry entry)
          updates an entry in the group
abstract  void removeEntry(SessionProvider sessionProvider, java.lang.String entryPath)
          removes entry located on entryPath (concatenation of group path / entry name)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Registry

public Registry()
Method Detail

getRegistry

public abstract Registry.RegistryNode getRegistry(SessionProvider sessionProvider)
                                           throws RepositoryConfigurationException,
                                                  javax.jcr.RepositoryException
Returns Registry node object which wraps Node of "exo:registry" type (the whole registry tree)

Parameters:
sessionProvider -
repository -
Returns:
egistry node object
Throws:
javax.jcr.RepositoryException
RepositoryConfigurationException

getEntry

public abstract RegistryEntry getEntry(SessionProvider sessionProvider,
                                       java.lang.String entryPath)
                                throws javax.jcr.PathNotFoundException,
                                       javax.jcr.RepositoryException
Returns existed RegistryEntry which wraps Node of "exo:registryEntry" type

Parameters:
sessionProvider -
entryPath -
Returns:
existed RegistryEntry
Throws:
javax.jcr.PathNotFoundException - if entry not found
javax.jcr.RepositoryException

createEntry

public abstract void createEntry(SessionProvider sessionProvider,
                                 java.lang.String groupPath,
                                 RegistryEntry entry)
                          throws javax.jcr.RepositoryException
creates an entry in the group. In a case if the group does not exist it will be silently created as well

Parameters:
sessionProvider -
groupPath - related path (w/o leading slash) to group
entry -
Throws:
RepositoryConfigurationException
javax.jcr.RepositoryException

recreateEntry

public abstract void recreateEntry(SessionProvider sessionProvider,
                                   java.lang.String groupPath,
                                   RegistryEntry entry)
                            throws javax.jcr.RepositoryException
updates an entry in the group

Parameters:
sessionProvider -
groupPath - related path (w/o leading slash) to group
entry -
Throws:
RepositoryConfigurationException
javax.jcr.RepositoryException

removeEntry

public abstract void removeEntry(SessionProvider sessionProvider,
                                 java.lang.String entryPath)
                          throws javax.jcr.RepositoryException
removes entry located on entryPath (concatenation of group path / entry name)

Parameters:
sessionProvider -
entryPath - related path (w/o leading slash) to entry
Throws:
RepositoryConfigurationException
javax.jcr.RepositoryException


Copyright © 2010 eXo Platform SAS. All Rights Reserved.