public class RegistryService
extends org.exoplatform.services.jcr.ext.registry.Registry
implements org.picocontainer.Startable
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 RepositoryService |
repositoryService |
protected boolean |
started |
Constructor and Description |
---|
RegistryService(org.exoplatform.container.xml.InitParams params,
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,
org.exoplatform.services.jcr.ext.registry.RegistryEntry entry)
Creates an entry in the group.
|
org.exoplatform.services.jcr.ext.registry.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.
|
org.exoplatform.services.jcr.ext.registry.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,
org.exoplatform.services.jcr.ext.registry.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,
org.exoplatform.services.jcr.ext.registry.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 RepositoryService repositoryService
protected boolean started
public RegistryService(org.exoplatform.container.xml.InitParams params, 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 org.exoplatform.services.jcr.ext.registry.RegistryEntry getEntry(SessionProvider sessionProvider, String entryPath) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
getEntry
in class org.exoplatform.services.jcr.ext.registry.Registry
javax.jcr.PathNotFoundException
- if entry not foundjavax.jcr.RepositoryException
public void createEntry(SessionProvider sessionProvider, String groupPath, org.exoplatform.services.jcr.ext.registry.RegistryEntry entry) throws javax.jcr.RepositoryException
createEntry
in class org.exoplatform.services.jcr.ext.registry.Registry
groupPath
- related path (w/o leading slash) to groupjavax.jcr.RepositoryException
public void removeEntry(SessionProvider sessionProvider, String entryPath) throws javax.jcr.RepositoryException
removeEntry
in class org.exoplatform.services.jcr.ext.registry.Registry
entryPath
- related path (w/o leading slash) to entryjavax.jcr.RepositoryException
public void recreateEntry(SessionProvider sessionProvider, String groupPath, org.exoplatform.services.jcr.ext.registry.RegistryEntry entry) throws javax.jcr.RepositoryException
recreateEntry
in class org.exoplatform.services.jcr.ext.registry.Registry
sessionProvider
- the session providergroupPath
- related path (w/o leading slash) to groupjavax.jcr.RepositoryException
public void updateEntry(SessionProvider sessionProvider, String groupPath, org.exoplatform.services.jcr.ext.registry.RegistryEntry entry) throws javax.jcr.RepositoryException
sessionProvider
- the session providerjavax.jcr.RepositoryException
public org.exoplatform.services.jcr.ext.registry.Registry.RegistryNode getRegistry(SessionProvider sessionProvider) throws javax.jcr.RepositoryException
getRegistry
in class org.exoplatform.services.jcr.ext.registry.Registry
javax.jcr.RepositoryException
public boolean isStarted()
public void start()
start
in interface org.picocontainer.Startable
public void stop()
stop
in interface org.picocontainer.Startable
public 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 RepositoryService getRepositoryService()
public boolean getForceXMLConfigurationValue(org.exoplatform.container.xml.InitParams initParams)
initParams
- The InitParamspublic void addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
RegistryInitializationEntryPlugin
plugin
- the plugin from which we extract the configuration that is expected
to be of type RegistryInitializationEntryPlugin
Copyright © 2003-2017 eXo Platform SAS. All Rights Reserved.