eXo JCR :: Component :: Extension Service 1.15.0-CR2

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

java.lang.Object
  extended by org.exoplatform.services.jcr.ext.registry.Registry
      extended by org.exoplatform.services.jcr.ext.registry.RegistryService
All Implemented Interfaces:
org.picocontainer.Startable

public class RegistryService
extends Registry
implements org.picocontainer.Startable

Created by The eXo Platform SAS .
Centralized collector for JCR based entities (services, apps, users) It contains info about the whole system, i.e. for all repositories used by system. All operations performed in context of "current" repository, i.e. RepositoryService.getCurrentRepository() Each repository has own Registry storage which is placed in workspace configured in "locations" entry like: locations registry locations The implementation hides storage details from end user

Version:
$Id: RegistryService.java 34445 2009-07-24 07:51:18Z dkatayev $
Author:
Gennady Azarenkov

Nested Class Summary
 
Nested classes/interfaces inherited from class org.exoplatform.services.jcr.ext.registry.Registry
Registry.RegistryNode
 
Field Summary
static String EXO_APPLICATIONS
           
static String EXO_GROUPS
           
protected static String EXO_REGISTRY
           
protected static String EXO_REGISTRY_NT
           
protected static String EXO_REGISTRYENTRY
           
protected static String EXO_REGISTRYENTRY_NT
           
protected static String EXO_REGISTRYGROUP_NT
           
static String EXO_SERVICES
           
static String EXO_USERS
           
protected  List<String> mixinNames
           
protected static String NT_FILE
           
protected  Map<String,String> regWorkspaces
           
protected  RepositoryService repositoryService
           
protected  boolean started
           
 
Constructor Summary
RegistryService(org.exoplatform.container.xml.InitParams params, RepositoryService repositoryService)
           
 
Method Summary
 void addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
           
 void addRegistryLocation(String repositoryName, String workspaceName)
           
 void createEntry(SessionProvider sessionProvider, String groupPath, RegistryEntry entry)
          creates an entry in the group.
 RegistryEntry getEntry(SessionProvider sessionProvider, String entryPath)
          Returns existed RegistryEntry which wraps Node of "exo:registryEntry" type
 boolean getForceXMLConfigurationValue(org.exoplatform.container.xml.InitParams initParams)
          Get value of force-xml-configuration param.
 Registry.RegistryNode getRegistry(SessionProvider sessionProvider)
          Returns Registry node object which wraps Node of "exo:registry" type (the whole registry tree)
 RepositoryService getRepositoryService()
           
 void initRegistryEntry(String groupName, String entryName)
           
 void initStorage(boolean replace)
           
 boolean isStarted()
           
 void recreateEntry(SessionProvider sessionProvider, String groupPath, RegistryEntry entry)
          updates an entry in the group
 void removeEntry(SessionProvider sessionProvider, String entryPath)
          removes entry located on entryPath (concatenation of group path / entry name)
 void removeRegistryLocation(String repositoryName)
           
 void start()
          
 void stop()
          
 void updateEntry(SessionProvider sessionProvider, String groupPath, RegistryEntry entry)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXO_REGISTRY_NT

protected static final String EXO_REGISTRY_NT
See Also:
Constant Field Values

EXO_REGISTRYENTRY_NT

protected static final String EXO_REGISTRYENTRY_NT
See Also:
Constant Field Values

EXO_REGISTRYGROUP_NT

protected static final String EXO_REGISTRYGROUP_NT
See Also:
Constant Field Values

NT_FILE

protected static final String NT_FILE
See Also:
Constant Field Values

EXO_REGISTRY

protected static final String EXO_REGISTRY
See Also:
Constant Field Values

EXO_REGISTRYENTRY

protected static final String EXO_REGISTRYENTRY
See Also:
Constant Field Values

EXO_SERVICES

public static final String EXO_SERVICES
See Also:
Constant Field Values

EXO_APPLICATIONS

public static final String EXO_APPLICATIONS
See Also:
Constant Field Values

EXO_USERS

public static final String EXO_USERS
See Also:
Constant Field Values

EXO_GROUPS

public static final String EXO_GROUPS
See Also:
Constant Field Values

regWorkspaces

protected final Map<String,String> regWorkspaces

repositoryService

protected final RepositoryService repositoryService

mixinNames

protected final List<String> mixinNames

started

protected boolean started
Constructor Detail

RegistryService

public RegistryService(org.exoplatform.container.xml.InitParams params,
                       RepositoryService repositoryService)
                throws RepositoryConfigurationException
Parameters:
params - accepts "locations" properties param
repositoryService -
Throws:
RepositoryConfigurationException
javax.jcr.RepositoryException
Method Detail

getEntry

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

Specified by:
getEntry in class Registry
Returns:
existed RegistryEntry
Throws:
javax.jcr.PathNotFoundException - if entry not found
javax.jcr.RepositoryException

createEntry

public void createEntry(SessionProvider sessionProvider,
                        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

Specified by:
createEntry in class Registry
groupPath - related path (w/o leading slash) to group
Throws:
javax.jcr.RepositoryException

removeEntry

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

Specified by:
removeEntry in class Registry
entryPath - related path (w/o leading slash) to entry
Throws:
javax.jcr.RepositoryException

recreateEntry

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

Specified by:
recreateEntry in class Registry
groupPath - related path (w/o leading slash) to group
Throws:
javax.jcr.RepositoryException

updateEntry

public void updateEntry(SessionProvider sessionProvider,
                        String groupPath,
                        RegistryEntry entry)
                 throws javax.jcr.RepositoryException

Throws:
javax.jcr.RepositoryException

getRegistry

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

Specified by:
getRegistry in class Registry
Returns:
egistry node object
Throws:
javax.jcr.RepositoryException

isStarted

public boolean isStarted()

start

public void start()

Specified by:
start in interface org.picocontainer.Startable

stop

public void stop()

Specified by:
stop in interface org.picocontainer.Startable

initStorage

public void initStorage(boolean replace)
                 throws RepositoryConfigurationException,
                        javax.jcr.RepositoryException
Parameters:
replace -
Throws:
RepositoryConfigurationException
javax.jcr.RepositoryException

addRegistryLocation

public void addRegistryLocation(String repositoryName,
                                String workspaceName)
Parameters:
repositoryName -
workspaceName -

removeRegistryLocation

public void removeRegistryLocation(String repositoryName)
Parameters:
repositoryName -

initRegistryEntry

public void initRegistryEntry(String groupName,
                              String entryName)
                       throws javax.jcr.RepositoryException,
                              RepositoryConfigurationException
Parameters:
sessionProvider -
groupName -
entryName -
repositoryName -
Throws:
javax.jcr.RepositoryException
RepositoryConfigurationException

getRepositoryService

public RepositoryService getRepositoryService()
Returns:
repository service

getForceXMLConfigurationValue

public boolean getForceXMLConfigurationValue(org.exoplatform.container.xml.InitParams initParams)
Get value of force-xml-configuration param.

Parameters:
initParams - The InitParams
Returns:
force-xml-configuration value if present and false in other case

addPlugin

public void addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)

eXo JCR :: Component :: Extension Service 1.15.0-CR2

Copyright © 2012 eXo Platform SAS. All Rights Reserved.