|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.carbon.registry.core.config.RegistryContext
public class RegistryContext
This class provides access to core registry configurations. Registry context is associated with each mounted registry instance. The base registry context can be accessed via the getBaseInstance method.
Nested Class Summary | |
---|---|
static interface |
RegistryContext.RegURLSupplier
Deprecated. |
Constructor Summary | |
---|---|
protected |
RegistryContext()
Create a registry context with default values. |
protected |
RegistryContext(InputStream configStream,
org.wso2.carbon.user.core.service.RealmService realmService)
Create a registry context with custom configuration and realm service. |
protected |
RegistryContext(InputStream configStream,
org.wso2.carbon.user.core.service.RealmService realmService,
boolean populateConfiguration)
Create a registry context with custom configuration and realm service. |
protected |
RegistryContext(InputStream configStream,
RegistryContext.RegURLSupplier urlSupplier)
Create a registry context with custom configuration and realm service. |
protected |
RegistryContext(org.wso2.carbon.user.core.service.RealmService realmService,
boolean populateConfiguration)
Create a new registry context object with a custom realm service |
Method Summary | |
---|---|
void |
addAspect(String name,
Aspect aspect,
int tenantId)
Add an aspect of the name for a given tenant id |
void |
addDBConfig(String name,
DataBaseConfiguration config)
Add database configuration with the given name. |
void |
addHandlerConfiguration(HandlerConfiguration handlerConfiguration)
Deprecated. |
void |
addMediaTypeHandler(MediaTypeHandlerConfiguration mediaTypeHandlerConfiguration)
Deprecated. |
void |
addQueryProcessor(QueryProcessorConfiguration queryProcessorConfiguration)
Add a new query processor. |
void |
addURLHandler(String urlHandler)
Deprecated. |
static void |
destroy()
destroy the registry context |
Aspect |
getAspect(String name,
int tenantId)
Return an aspect of given name and given tenant id. |
String[] |
getAspectNames(int tenantId)
Return engaged aspect names for a given tenant |
static RegistryContext |
getBaseInstance()
Get an instance of the base (not cloned), |
static RegistryContext |
getBaseInstance(InputStream configStream,
org.wso2.carbon.user.core.service.RealmService realmService)
Return a singleton object of the registry context with a custom configuration, customer realm service. |
static RegistryContext |
getBaseInstance(InputStream configStream,
RegistryContext.RegURLSupplier urlSupplier)
Deprecated. |
static RegistryContext |
getBaseInstance(org.wso2.carbon.user.core.service.RealmService realmService)
Return a singleton object of the base registry context with custom realm service If a registry context doesn't exist, it will create a new one and return it. |
static RegistryContext |
getBaseInstance(org.wso2.carbon.user.core.service.RealmService realmService,
boolean populateConfiguration)
Return a singleton object of the base registry context with custom realm service If a registry context doesn't exist, it will create a new one and return it. |
String |
getBasePath()
Return the base path calculated using the url supplier. |
static RegistryContext |
getCloneContext()
Create an return a registry context. |
String |
getCollectionMediaTypes()
Method to obtain collection media types. |
CustomEditManager |
getCustomEditManager()
Return a custom edit manager, which is used by custom UI implementations. |
String |
getCustomUIMediaTypes()
Method to obtain custom UI media types. |
DataAccessManager |
getDataAccessManager()
Return the data access manager, created using the database configuration associated with the registry context |
DataBaseConfiguration |
getDBConfig(String dbConfigName)
Get the database configuration of a given configuration name |
Iterator<String> |
getDBConfigNames()
Get the available database configuration names. |
DataBaseConfiguration |
getDefaultDataBaseConfiguration()
Return the default database configuration. |
EmbeddedRegistryService |
getEmbeddedRegistryService()
Return a embedded registry service. |
List<HandlerConfiguration> |
getHandlerConfigurations()
Deprecated. |
HandlerManager |
getHandlerManager()
Return the handler manager. |
HandlerManager |
getHandlerManager(String lifecyclePhase)
Return the handler manager. |
org.apache.lucene.store.jdbc.JdbcDirectory |
getJdbcDir()
Return the JDBC dir. |
LogWriter |
getLogWriter()
Method to obtain the logWriter instance. |
int |
getMaxCache()
Deprecated. |
List |
getMediaTypeHandlers()
Deprecated. |
List<Mount> |
getMounts()
Return a list of mounted registry configurations (Mount object). |
String |
getNodeIdentifier()
Get a unique identifier for this registry node. |
String |
getProfilesPath()
Return the profile storage path. |
QueryProcessorManager |
getQueryProcessorManager()
Return a query processor. |
List |
getQueryProcessors()
Return a list of available query processor. |
org.wso2.carbon.user.core.service.RealmService |
getRealmService()
Return the associated realm service. |
String |
getRegistryRoot()
Return the registry root. |
List<RemoteConfiguration> |
getRemoteInstances()
Return a list of mounted remote instances. |
Repository |
getRepository()
Return the repository object, which provides an interface to put, get resources to the repository. |
String |
getResourceMediaTypes()
Method to obtain resource media types. |
String |
getServicePath()
Get the service storage path. |
List |
getUrlHandlers()
Deprecated. |
VersionRepository |
getVersionRepository()
Return the version repository object, which provides an interface to create versions, retrieve old versions of resources |
boolean |
isCacheEnabled()
Return whether the registry caching is enabled or not. |
boolean |
isClone()
To check whether this is a clone or a base registry context. |
boolean |
isReadOnly()
Return whether the registry is read-only or not. |
boolean |
isSetup()
Whether the "setup" system property is set at the start. |
boolean |
isSystemResourcePathRegistered(String absolutePath)
Method to determine whether a system resource (or collection) path has been registered. |
boolean |
isVersionOnChange()
Whether the version should be created automatically on a change (only for non-collection resources) |
void |
registerSystemResourcePath(String absolutePath)
Method to register a system resource (or collection) path. |
boolean |
removeAspect(String name,
int tenantId)
Remove an aspect with the given name for a given tenant id |
DataBaseConfiguration |
selectDBConfig(String dbConfigName)
Select a database configuration among the available database configuration. |
void |
setCacheEnabled(boolean enableCache)
Set whether the registry caching is enabled or not. |
void |
setClone(boolean clone)
Set the flag if the current registry context is a clone and not base |
void |
setCollectionMediaTypes(String collectionMediaTypes)
Method to set collection media types. |
void |
setCustomEditManager(CustomEditManager customEditManager)
Set a custom edit manager. |
void |
setCustomUIMediaTypes(String customUIMediaTypes)
Method to set custom UI media types. |
void |
setDataAccessManager(DataAccessManager dataAccessManager)
Set the data access manager. |
void |
setDefaultDataBaseConfiguration(DataBaseConfiguration dataBaseConfiguration)
Sets the default database configuration. |
void |
setHandlerConfigurations(List<HandlerConfiguration> handlerConfigurations)
Deprecated. |
void |
setJdbcDir(org.apache.lucene.store.jdbc.JdbcDirectory jdbcDir)
Set the JDBC dir. |
void |
setLogWriter(LogWriter logWriter)
Method to set the logWriter instance. |
void |
setMaxCache(int maxCache)
Deprecated. |
void |
setMediaTypeHandlers(List mediaTypeHandlers)
Deprecated. |
void |
setMounts(List<Mount> mounts)
Set a list of mounted registry configurations. |
void |
setProfilesPath(String path)
Set profile storage path. |
void |
setQueryProcessorManager(QueryProcessorManager queryProcessorManager)
Set a query processor object |
void |
setQueryProcessors(List<QueryProcessorConfiguration> queryProcessors)
Set the query processor list. |
void |
setReadOnly(boolean readOnly)
Set whether the registry is read-only or not |
void |
setRegistryRoot(String registryRoot)
Set the registry root. |
void |
setRemoteInstances(List<RemoteConfiguration> remoteInstances)
Set list of remote instances. |
void |
setRepository(Repository repository)
Set the repository object. |
void |
setResourceMediaTypes(String resourceMediaTypes)
Method to set resource media types. |
void |
setServicePath(String servicePath)
Set the service storage path |
void |
setSetup(boolean setup)
Set if the "setup" system property is set at the start. |
void |
setUrlHandlers(List urlHandlers)
Deprecated. |
void |
setVersionOnChange(boolean versionOnChange)
Set whether the version should be created automatically on a change (only for non-collection resources) |
void |
setVersionRepository(VersionRepository versionRepository)
Set a version repository object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected RegistryContext(org.wso2.carbon.user.core.service.RealmService realmService, boolean populateConfiguration) throws RegistryException
realmService
- associated realm servicepopulateConfiguration
- whether the configuration must be populated or not.
RegistryException
- throws if the construction failed.protected RegistryContext(InputStream configStream, org.wso2.carbon.user.core.service.RealmService realmService) throws RegistryException
configStream
- configuration stream. (registry.xml input stream)realmService
- the associated realm service
RegistryException
- throws if the construction failed.protected RegistryContext(InputStream configStream, org.wso2.carbon.user.core.service.RealmService realmService, boolean populateConfiguration) throws RegistryException
configStream
- configuration stream. (registry.xml input stream)realmService
- the associated realm servicepopulateConfiguration
- whether the configuration must be populated or not.
RegistryException
- throws if the construction failed.protected RegistryContext(InputStream configStream, RegistryContext.RegURLSupplier urlSupplier) throws RegistryException
configStream
- configuration stream. (registry.xml input stream)urlSupplier
- url supplier object.
RegistryException
- throws if the construction failed.protected RegistryContext()
Method Detail |
---|
public String getNodeIdentifier()
public String getResourceMediaTypes()
public void setResourceMediaTypes(String resourceMediaTypes)
resourceMediaTypes
- the resource media types.public String getCollectionMediaTypes()
public void setCollectionMediaTypes(String collectionMediaTypes)
collectionMediaTypes
- the collection media types.public String getCustomUIMediaTypes()
public void setCustomUIMediaTypes(String customUIMediaTypes)
customUIMediaTypes
- the custom UI media types.public boolean isClone()
public void setClone(boolean clone)
clone
- whether it is a clone or notpublic static RegistryContext getBaseInstance()
public static RegistryContext getCloneContext()
public static void destroy()
public static RegistryContext getBaseInstance(org.wso2.carbon.user.core.service.RealmService realmService)
realmService
- realm service
public static RegistryContext getBaseInstance(org.wso2.carbon.user.core.service.RealmService realmService, boolean populateConfiguration)
realmService
- realm servicepopulateConfiguration
- whether the configuration must be populated or not.
public static RegistryContext getBaseInstance(InputStream configStream, org.wso2.carbon.user.core.service.RealmService realmService)
configStream
- config stream (registry.xml)realmService
- realm service to create a registry context with
@Deprecated public static RegistryContext getBaseInstance(InputStream configStream, RegistryContext.RegURLSupplier urlSupplier)
configStream
- config stream (registry.xml)urlSupplier
- url supplier
public String getRegistryRoot()
public void setRegistryRoot(String registryRoot)
registryRoot
- the value of the registry rootpublic boolean isReadOnly()
public void setReadOnly(boolean readOnly)
readOnly
- the read-only flagpublic boolean isCacheEnabled()
public void setCacheEnabled(boolean enableCache)
enableCache
- the enable-cache flagpublic org.wso2.carbon.user.core.service.RealmService getRealmService()
@Deprecated public void setMaxCache(int maxCache)
maxCache
- the maximum number for cache value.@Deprecated public int getMaxCache()
public Repository getRepository()
public void setRepository(Repository repository)
repository
- the repository object.public VersionRepository getVersionRepository()
public void setVersionRepository(VersionRepository versionRepository)
versionRepository
- version repository testpublic QueryProcessorManager getQueryProcessorManager()
public void setQueryProcessorManager(QueryProcessorManager queryProcessorManager)
queryProcessorManager
- the query processor object.public boolean isVersionOnChange()
public void setVersionOnChange(boolean versionOnChange)
versionOnChange
- Flag to set whether the version should be created,public boolean isSetup()
public void setSetup(boolean setup)
setup
- the flag for the setup property.public EmbeddedRegistryService getEmbeddedRegistryService() throws RegistryException
RegistryException
- throws if the retrieval of the embedded registry service is
failed.public DataBaseConfiguration getDefaultDataBaseConfiguration()
public void setDefaultDataBaseConfiguration(DataBaseConfiguration dataBaseConfiguration)
dataBaseConfiguration
- the default database configuration.public DataBaseConfiguration selectDBConfig(String dbConfigName)
dbConfigName
- name of the selecting database configuration.
public Iterator<String> getDBConfigNames()
public DataBaseConfiguration getDBConfig(String dbConfigName)
dbConfigName
- database configuration name
public void addDBConfig(String name, DataBaseConfiguration config)
name
- the name of the database configuration.config
- database configuration.public void addAspect(String name, Aspect aspect, int tenantId)
name
- name of the aspectaspect
- Aspect objecttenantId
- tenant idpublic boolean removeAspect(String name, int tenantId)
name
- Name of the aspecttenantId
- tenant id
public Aspect getAspect(String name, int tenantId)
name
- name of the aspecttenantId
- tenant id
public String[] getAspectNames(int tenantId)
tenantId
- tenant id
public List getQueryProcessors()
public void setQueryProcessors(List<QueryProcessorConfiguration> queryProcessors)
queryProcessors
- the list of query processors to be set.public void addQueryProcessor(QueryProcessorConfiguration queryProcessorConfiguration)
queryProcessorConfiguration
- query processor to be set.public String getBasePath()
public DataAccessManager getDataAccessManager()
public void setDataAccessManager(DataAccessManager dataAccessManager)
dataAccessManager
- data access manager to be set.public HandlerManager getHandlerManager()
public HandlerManager getHandlerManager(String lifecyclePhase)
lifecyclePhase
- The name of the lifecycle phase.
public CustomEditManager getCustomEditManager()
public void setCustomEditManager(CustomEditManager customEditManager)
customEditManager
- the CustomEditManager to be set.public void setJdbcDir(org.apache.lucene.store.jdbc.JdbcDirectory jdbcDir)
jdbcDir
- JDBC dir to set.public org.apache.lucene.store.jdbc.JdbcDirectory getJdbcDir()
public List<RemoteConfiguration> getRemoteInstances()
public void setRemoteInstances(List<RemoteConfiguration> remoteInstances)
remoteInstances
- the list of remote instances to be set.public List<Mount> getMounts()
public void setMounts(List<Mount> mounts)
mounts
- list of mount to be set.public void setProfilesPath(String path)
path
- the path to be setpublic String getProfilesPath()
public String getServicePath()
public void setServicePath(String servicePath)
servicePath
- service path to be set.@Deprecated public List<HandlerConfiguration> getHandlerConfigurations()
@Deprecated public void setHandlerConfigurations(List<HandlerConfiguration> handlerConfigurations)
@Deprecated public void addHandlerConfiguration(HandlerConfiguration handlerConfiguration)
@Deprecated public List getMediaTypeHandlers()
@Deprecated public void setMediaTypeHandlers(List mediaTypeHandlers)
@Deprecated public void addMediaTypeHandler(MediaTypeHandlerConfiguration mediaTypeHandlerConfiguration)
@Deprecated public List getUrlHandlers()
@Deprecated public void setUrlHandlers(List urlHandlers)
@Deprecated public void addURLHandler(String urlHandler)
public LogWriter getLogWriter()
public void setLogWriter(LogWriter logWriter)
logWriter
- the logWriter instance.public boolean isSystemResourcePathRegistered(String absolutePath)
absolutePath
- the absolute path of the system resource (or collection)
public void registerSystemResourcePath(String absolutePath)
absolutePath
- the absolute path of the system resource (or collection)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |