Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.core.runtime
Class RegistryFactory


java.lang.Object
  extended by 
org.eclipse.core.runtime.RegistryFactory

public final class RegistryFactory
extends Object

Use this class to create or obtain an extension registry.

The following methods can be used without OSGi running:

This class is not intended to be subclassed or instantiated.

Since:
org.eclipse.equinox.registry 3.2
Restriction:
This class is not intended to be subclassed by clients.
Restriction:
This class is not intended to be instantiated by clients.

Constructor Summary
RegistryFactory ()
           
 
Method Summary
static  RegistryStrategy createOSGiStrategy ( File[] storageDirs, boolean[] cacheReadOnly, Object token)
          Creates a registry strategy that can be used in an OSGi container.
static  IExtensionRegistry createRegistry ( RegistryStrategy strategy, Object masterToken, Object userToken)
          Creates a new extension registry based on the given set of parameters.
static  IExtensionRegistry getRegistry ()
          Returns the default extension registry specified by the registry provider.
static void setDefaultRegistryProvider ( IRegistryProvider provider)
          Use this method to specify the default registry provider.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistryFactory

public RegistryFactory()
Method Detail

createRegistry

public static 
IExtensionRegistry createRegistry(
RegistryStrategy strategy,
                                                
Object masterToken,
                                                
Object userToken)
Creates a new extension registry based on the given set of parameters.

The strategy is an optional collection of methods that supply additional registry functionality. Users may pass in null for the strategy if default behavior is sufficient.

The master token is stored by the registry and later used as an identifier of callers who are allowed full control over the registry functionality. Users may pass in null as a master token.

The user token is stored by the registry and later used as an identifier of callers who are allowed to control registry at the user level. For instance, users attempting to modify dynamic contributions to the registry have to use the user token. Users may pass in null as a user token.

Parameters:
strategy - registry strategy or null
masterToken - the token used for master control of the registry or null
userToken - the token used for user control of the registry or null
Returns:
the new extension registry

getRegistry

public static 
IExtensionRegistry getRegistry()
Returns the default extension registry specified by the registry provider. May return null if the provider has not been set or if the registry has not been created.

Returns:
existing extension registry or null

createOSGiStrategy

public static 
RegistryStrategy createOSGiStrategy(
File[] storageDirs,
                                                  boolean[] cacheReadOnly,
                                                  
Object token)
Creates a registry strategy that can be used in an OSGi container. The strategy uses OSGi contributions and contributors for the registry processing and takes advantage of additional mechanisms available through the OSGi library.

The OSGi registry strategy sequentially checks the array of storage directories to discover the location of the registry cache formed by previous invocations of the extension registry. Once found, the location is used to store registry cache. If this value is null then caching of the registry content is disabled.

The cache read-only array is an array the same length as the storage directory array. It contains boolean values indicating whether or not each storage directory is read-only. If the value at an index is true then the location at the corresponding index in the storage directories array is read-only; if false then the cache location is read-write. The array can be null if the storageDirs parameter is null.

The master token should be passed to the OSGi registry strategy to permit it to perform contributions to the registry.

Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Parameters:
storageDirs - array of file system directories or null
cacheReadOnly - array of read only attributes or null
token - control token for the registry
Returns:
registry strategy that can be used in an OSGi container
See Also:
createRegistry(RegistryStrategy, Object, Object)

setDefaultRegistryProvider

public static void setDefaultRegistryProvider(
IRegistryProvider provider)
                                       throws 
CoreException
Use this method to specify the default registry provider. The default registry provider is immutable in the sense that it can be set only once during the application runtime. Attempts to change the default registry provider will cause an exception to be thrown.

The given registry provider must not be null.

Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Parameters:
provider - extension registry provider
Throws:
CoreException - if a default registry provider was already set for this application
See Also:
getRegistry()

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire