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
|
Method Summary |
void |
addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
Defines the configuration of the service thanks to the provided plugin if and
only if the plugin is of type RegistryInitializationEntryPlugin |
void |
addRegistryLocation(String repositoryName,
String workspaceName)
Adds a new registry entry |
void |
createEntry(SessionProvider sessionProvider,
String groupPath,
RegistryEntry entry)
Creates an entry in the group. |
RegistryEntry |
getEntry(SessionProvider sessionProvider,
String entryPath)
Returns the corresponding registry entry which wraps a node of type "exo:registryEntry" |
boolean |
getForceXMLConfigurationValue(org.exoplatform.container.xml.InitParams initParams)
Get value of force-xml-configuration param. |
Registry.RegistryNode |
getRegistry(SessionProvider sessionProvider)
Returns the registry node which wraps a node of type "exo:registry" (the whole registry tree) |
RepositoryService |
getRepositoryService()
|
void |
initRegistryEntry(String groupName,
String entryName)
Initializes the registry entry |
void |
initStorage(boolean replace)
Initializes the registry storage |
boolean |
isStarted()
Indicates whether the service is started or not |
void |
recreateEntry(SessionProvider sessionProvider,
String groupPath,
RegistryEntry entry)
Re-creates an entry in the group. |
void |
removeEntry(SessionProvider sessionProvider,
String entryPath)
Removes the entry at the given absolute path (concatenation of group path / entry name) |
void |
removeRegistryLocation(String repositoryName)
|
void |
start()
|
void |
stop()
|
void |
updateEntry(SessionProvider sessionProvider,
String groupPath,
RegistryEntry entry)
Update an entry in the group. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
RegistryService
public RegistryService(org.exoplatform.container.xml.InitParams params,
RepositoryService repositoryService)
throws RepositoryConfigurationException
- Parameters:
params - accepts locations properties param and mixin-names values param.repositoryService - the repository service
- Throws:
RepositoryConfigurationException - if no InitParams are provided
getEntry
public RegistryEntry getEntry(SessionProvider sessionProvider,
String entryPath)
throws javax.jcr.PathNotFoundException,
javax.jcr.RepositoryException
- Returns the corresponding registry entry which wraps a node of type "exo:registryEntry"
- Specified by:
getEntry in class Registry
- Returns:
- the corresponding 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 the group does not exist already it will be automatically
created.
- 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 the entry at the given absolute path (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
- Re-creates an entry in the group.
- Specified by:
recreateEntry in class Registry
- Parameters:
sessionProvider - the session providergroupPath - 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
- Update an entry in the group.
- Parameters:
sessionProvider - the session provider
- Throws:
javax.jcr.RepositoryException
getRegistry
public Registry.RegistryNode getRegistry(SessionProvider sessionProvider)
throws javax.jcr.RepositoryException
- Returns the registry node which wraps a node of type "exo:registry" (the whole registry tree)
- Specified by:
getRegistry in class Registry
- Returns:
- registry node object
- Throws:
javax.jcr.RepositoryException
isStarted
public boolean isStarted()
- Indicates whether the service is started or not
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
- Initializes the registry storage
- Parameters:
replace - true if we want to re-create the exo:registry node, false otherwise
- Throws:
RepositoryConfigurationException - if a configuration issue occurs
javax.jcr.RepositoryException - if any error occurs
addRegistryLocation
public void addRegistryLocation(String repositoryName,
String workspaceName)
- Adds a new registry entry
- Parameters:
repositoryName - the repository nameworkspaceName - the workspace name
removeRegistryLocation
public void removeRegistryLocation(String repositoryName)
- Parameters:
repositoryName - the repository name
initRegistryEntry
public void initRegistryEntry(String groupName,
String entryName)
throws javax.jcr.RepositoryException,
RepositoryConfigurationException
- Initializes the registry entry
- Parameters:
groupName - the group entry nameentryName - the entry name
- Throws:
RepositoryConfigurationException - if a configuration issue occurs
javax.jcr.RepositoryException - if any error occurs
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)
- Defines the configuration of the service thanks to the provided plugin if and
only if the plugin is of type
RegistryInitializationEntryPlugin
- Parameters:
plugin - the plugin from which we extract the configuration that is expected
to be of type RegistryInitializationEntryPlugin
Copyright © 2014 eXo Platform SAS. All Rights Reserved.