public class RegistryService extends Registry implements org.picocontainer.Startable
<properties-param>
<name>locations</name>
<description>registry locations</description>
<property name="repository1" value="workspace1"/>
<property name="repository2" value="workspace2"/>
</properties-param>
The implementation hides storage details from end userRegistry.RegistryNode| Modifier and Type | Field and Description |
|---|---|
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 org.exoplatform.services.jcr.RepositoryService |
repositoryService |
protected boolean |
started |
| Constructor and Description |
|---|
RegistryService(org.exoplatform.container.xml.InitParams params,
org.exoplatform.services.jcr.RepositoryService repositoryService) |
| Modifier and Type | Method and Description |
|---|---|
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)
|
org.exoplatform.services.jcr.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.
|
protected static final String EXO_REGISTRY_NT
protected static final String EXO_REGISTRYENTRY_NT
protected static final String EXO_REGISTRYGROUP_NT
protected static final String NT_FILE
protected static final String EXO_REGISTRY
protected static final String EXO_REGISTRYENTRY
public static final String EXO_SERVICES
public static final String EXO_APPLICATIONS
public static final String EXO_USERS
public static final String EXO_GROUPS
protected final org.exoplatform.services.jcr.RepositoryService repositoryService
protected boolean started
public RegistryService(org.exoplatform.container.xml.InitParams params,
org.exoplatform.services.jcr.RepositoryService repositoryService)
throws org.exoplatform.services.jcr.config.RepositoryConfigurationException
params - accepts locations properties param and mixin-names values param.repositoryService - the repository serviceorg.exoplatform.services.jcr.config.RepositoryConfigurationException - if no InitParams are providedpublic RegistryEntry getEntry(SessionProvider sessionProvider, String entryPath) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
public void createEntry(SessionProvider sessionProvider, String groupPath, RegistryEntry entry) throws javax.jcr.RepositoryException
createEntry in class RegistrygroupPath - related path (w/o leading slash) to groupjavax.jcr.RepositoryExceptionpublic void removeEntry(SessionProvider sessionProvider, String entryPath) throws javax.jcr.RepositoryException
removeEntry in class RegistryentryPath - related path (w/o leading slash) to entryjavax.jcr.RepositoryExceptionpublic void recreateEntry(SessionProvider sessionProvider, String groupPath, RegistryEntry entry) throws javax.jcr.RepositoryException
recreateEntry in class RegistrysessionProvider - the session providergroupPath - related path (w/o leading slash) to groupjavax.jcr.RepositoryExceptionpublic void updateEntry(SessionProvider sessionProvider, String groupPath, RegistryEntry entry) throws javax.jcr.RepositoryException
sessionProvider - the session providerjavax.jcr.RepositoryExceptionpublic Registry.RegistryNode getRegistry(SessionProvider sessionProvider) throws javax.jcr.RepositoryException
getRegistry in class Registryjavax.jcr.RepositoryExceptionpublic boolean isStarted()
public void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic void initStorage(boolean replace)
throws org.exoplatform.services.jcr.config.RepositoryConfigurationException,
javax.jcr.RepositoryException
replace - true if we want to re-create the exo:registry node, false otherwiseorg.exoplatform.services.jcr.config.RepositoryConfigurationException - if a configuration issue occursjavax.jcr.RepositoryException - if any error occurspublic void addRegistryLocation(String repositoryName, String workspaceName)
repositoryName - the repository nameworkspaceName - the workspace namepublic void removeRegistryLocation(String repositoryName)
repositoryName - the repository namepublic void initRegistryEntry(String groupName, String entryName) throws javax.jcr.RepositoryException, org.exoplatform.services.jcr.config.RepositoryConfigurationException
groupName - the group entry nameentryName - the entry nameorg.exoplatform.services.jcr.config.RepositoryConfigurationException - if a configuration issue occursjavax.jcr.RepositoryException - if any error occurspublic org.exoplatform.services.jcr.RepositoryService getRepositoryService()
public boolean getForceXMLConfigurationValue(org.exoplatform.container.xml.InitParams initParams)
initParams - The InitParamspublic void addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
RegistryInitializationEntryPluginplugin - the plugin from which we extract the configuration that is expected
to be of type RegistryInitializationEntryPluginCopyright © 2003–2021 eXo Platform SAS. All rights reserved.