|
JPF 1.5.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.java.plugin.tools.mocks.MockPluginRegistry
public class MockPluginRegistry
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.java.plugin.registry.PluginRegistry |
---|
PluginRegistry.RegistryChangeData, PluginRegistry.RegistryChangeListener |
Constructor Summary | |
---|---|
MockPluginRegistry()
|
Method Summary | |
---|---|
MockPluginRegistry |
addExtensionPoint(ExtensionPoint extPoint)
|
MockPluginRegistry |
addPluginDescriptor(PluginDescriptor descr)
|
MockPluginRegistry |
addPluginFragment(PluginFragment fragment)
|
IntegrityCheckReport |
checkIntegrity(PathResolver pathResolver)
Performs integrity check of all registered plug-ins and generates result as a collection of standard report items. |
IntegrityCheckReport |
checkIntegrity(PathResolver pathResolver,
boolean includeRegistrationReport)
Performs integrity check of all registered plug-ins and generates result as a collection of standard report items. |
void |
configure(ExtendedProperties config)
Configures this registry instance. |
java.lang.String |
extractId(java.lang.String uniqueId)
Extracts plug-in element ID from some unique identifier. |
java.lang.String |
extractPluginId(java.lang.String uniqueId)
Extracts plug-in ID from some unique identifier. |
Version |
extractVersion(java.lang.String uniqueId)
Extracts plug-in version identifier from some unique identifier (plug-in or plug-in fragment). |
java.util.Collection<PluginDescriptor> |
getDependingPlugins(PluginDescriptor descr)
Utility method that recursively collects all plug-ins that depends on the given plug-in. |
ExtensionPoint |
getExtensionPoint(java.lang.String uniqueId)
Looks for extension point. |
ExtensionPoint |
getExtensionPoint(java.lang.String pluginId,
java.lang.String pointId)
Looks for extension point. |
PluginDescriptor |
getPluginDescriptor(java.lang.String pluginId)
Returns descriptor of plug-in with given ID. |
java.util.Collection<PluginDescriptor> |
getPluginDescriptors()
Returns collection of descriptors of all plug-ins that was successfully populated by this registry. |
java.util.Collection<PluginFragment> |
getPluginFragments()
Returns collection of descriptors of all plug-in fragments that was successfully populated by this registry. |
IntegrityCheckReport |
getRegistrationReport()
|
boolean |
isExtensionPointAvailable(java.lang.String uniqueId)
Checks if extension point exists and is in valid state. |
boolean |
isExtensionPointAvailable(java.lang.String pluginId,
java.lang.String pointId)
Checks if extension point exists and is in valid state. |
boolean |
isPluginDescriptorAvailable(java.lang.String pluginId)
Checks if plug-in exists and is in valid state. |
java.lang.String |
makeUniqueId(java.lang.String pluginId,
java.lang.String elementId)
Constructs unique identifier for some plug-in element from it's ID. |
java.lang.String |
makeUniqueId(java.lang.String pluginId,
Version version)
Constructs unique identifier for plug-in with given ID. |
ManifestInfo |
readManifestInfo(java.net.URL manifest)
Reads basic information from a plug-in or plug-in fragment manifest. |
java.util.Map<java.lang.String,Identity> |
register(java.net.URL[] manifests)
Registers plug-ins and plug-in fragments in this registry. |
void |
registerListener(PluginRegistry.RegistryChangeListener listener)
Registers plug-in registry change event listener. |
MockPluginRegistry |
setIntegrityCheckReport(IntegrityCheckReport value)
|
MockPluginRegistry |
setRegistrationReport(IntegrityCheckReport value)
|
java.util.Collection<java.lang.String> |
unregister(java.lang.String[] ids)
Unregisters plug-ins and plug-in fragments with given ID's (including depending plug-ins and plug-in fragments). |
void |
unregisterListener(PluginRegistry.RegistryChangeListener listener)
Unregisters registry change event listener. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MockPluginRegistry()
Method Detail |
---|
public IntegrityCheckReport checkIntegrity(PathResolver pathResolver)
PluginRegistry
checkIntegrity
in interface PluginRegistry
pathResolver
- optional path resolver
PluginRegistry.checkIntegrity(
org.java.plugin.PathResolver)
public IntegrityCheckReport checkIntegrity(PathResolver pathResolver, boolean includeRegistrationReport)
PluginRegistry
checkIntegrity
in interface PluginRegistry
pathResolver
- optional path resolverincludeRegistrationReport
- if true
, the plug-ins registration report will
be included into resulting report
PluginRegistry.checkIntegrity(
org.java.plugin.PathResolver, boolean)
public MockPluginRegistry setIntegrityCheckReport(IntegrityCheckReport value)
value
- the integrity check report to set
public void configure(ExtendedProperties config)
PluginRegistry
object factory
implementation.
configure
in interface PluginRegistry
config
- registry configuration dataPluginRegistry.configure(
org.java.plugin.util.ExtendedProperties)
public java.lang.String extractId(java.lang.String uniqueId)
PluginRegistry
extractId
in interface PluginRegistry
uniqueId
- unique ID
PluginRegistry.extractId(
java.lang.String)
public java.lang.String extractPluginId(java.lang.String uniqueId)
PluginRegistry
extractPluginId
in interface PluginRegistry
uniqueId
- unique ID
PluginRegistry.extractPluginId(
java.lang.String)
public Version extractVersion(java.lang.String uniqueId)
PluginRegistry
extractVersion
in interface PluginRegistry
uniqueId
- unique ID
PluginRegistry.extractVersion(
java.lang.String)
public java.util.Collection<PluginDescriptor> getDependingPlugins(PluginDescriptor descr)
PluginRegistry
getDependingPlugins
in interface PluginRegistry
descr
- descriptor of plug-in to collect dependencies for
plug-in descriptors
that
depend on given plug-inPluginRegistry.getDependingPlugins(
org.java.plugin.registry.PluginDescriptor)
public ExtensionPoint getExtensionPoint(java.lang.String pluginId, java.lang.String pointId)
PluginRegistry
IllegalArgumentException
if requested extension point can't be
found or is in invalid state.
getExtensionPoint
in interface PluginRegistry
pluginId
- plug-in IDpointId
- extension point ID
PluginRegistry.getExtensionPoint(
java.lang.String, java.lang.String)
public ExtensionPoint getExtensionPoint(java.lang.String uniqueId)
PluginRegistry
getExtensionPoint
in interface PluginRegistry
uniqueId
- extension point unique ID
PluginRegistry.getExtensionPoint(
java.lang.String)
public MockPluginRegistry addExtensionPoint(ExtensionPoint extPoint)
extPoint
- extension point to add
public PluginDescriptor getPluginDescriptor(java.lang.String pluginId)
PluginRegistry
IllegalArgumentException
. In other words, this method shouldn't
return null
.
getPluginDescriptor
in interface PluginRegistry
pluginId
- plug-id ID
PluginRegistry.getPluginDescriptor(
java.lang.String)
public java.util.Collection<PluginDescriptor> getPluginDescriptors()
PluginRegistry
getPluginDescriptors
in interface PluginRegistry
PluginDescriptor
objectsPluginRegistry.getPluginDescriptors()
public MockPluginRegistry addPluginDescriptor(PluginDescriptor descr)
descr
- plug-in descriptor to add
public java.util.Collection<PluginFragment> getPluginFragments()
PluginRegistry
getPluginFragments
in interface PluginRegistry
PluginFragment
objectsPluginRegistry.getPluginFragments()
public MockPluginRegistry addPluginFragment(PluginFragment fragment)
fragment
- plug-in fragment to add
public IntegrityCheckReport getRegistrationReport()
getRegistrationReport
in interface PluginRegistry
PluginRegistry.getRegistrationReport()
public MockPluginRegistry setRegistrationReport(IntegrityCheckReport value)
value
- the registration report to set
public boolean isExtensionPointAvailable(java.lang.String pluginId, java.lang.String pointId)
PluginRegistry
true
, the method
PluginRegistry.getExtensionPoint(String, String)
should always return valid
extension point.
isExtensionPointAvailable
in interface PluginRegistry
pluginId
- plug-in IDpointId
- extension point ID
true
if extension point exists and validPluginRegistry.isExtensionPointAvailable(
java.lang.String, java.lang.String)
public boolean isExtensionPointAvailable(java.lang.String uniqueId)
PluginRegistry
isExtensionPointAvailable
in interface PluginRegistry
uniqueId
- extension point unique ID
true
if extension point exists and validPluginRegistry.isExtensionPointAvailable(
java.lang.String)
public boolean isPluginDescriptorAvailable(java.lang.String pluginId)
PluginRegistry
true
, the method PluginRegistry.getPluginDescriptor(String)
should always return valid plug-in descriptor.
isPluginDescriptorAvailable
in interface PluginRegistry
pluginId
- plug-in ID
true
if plug-in exists and validPluginRegistry.isPluginDescriptorAvailable(
java.lang.String)
public java.lang.String makeUniqueId(java.lang.String pluginId, java.lang.String elementId)
PluginRegistry
makeUniqueId
in interface PluginRegistry
pluginId
- plug-in IDelementId
- element ID
PluginRegistry.makeUniqueId(
java.lang.String, java.lang.String)
public java.lang.String makeUniqueId(java.lang.String pluginId, Version version)
PluginRegistry
makeUniqueId
in interface PluginRegistry
pluginId
- plug-in IDversion
- plug-in version identifier
PluginRegistry.makeUniqueId(
java.lang.String, org.java.plugin.registry.Version)
public ManifestInfo readManifestInfo(java.net.URL manifest)
PluginRegistry
readManifestInfo
in interface PluginRegistry
manifest
- manifest data URL
PluginRegistry.readManifestInfo(
java.net.URL)
public java.util.Map<java.lang.String,Identity> register(java.net.URL[] manifests)
PluginRegistry
PluginManager
instance as it is not aware of any manager. Using
this method just makes plug-in meta-data available for reading from this
registry.
If more than one version of the same plug-in or plug-in fragment given, the only latest version should be registered. If some plug-in or plug-in fragment already registered it should be ignored by this method. Client application have to un-register such plug-ins first before registering their newest versions.
register
in interface PluginRegistry
manifests
- array of manifest locations
PluginRegistry.register(java.net.URL[])
public void registerListener(PluginRegistry.RegistryChangeListener listener)
PluginRegistry
IllegalArgumentException
.
registerListener
in interface PluginRegistry
listener
- new registry change event listenerPluginRegistry.registerListener(
org.java.plugin.registry.PluginRegistry.RegistryChangeListener)
public java.util.Collection<java.lang.String> unregister(java.lang.String[] ids)
PluginRegistry
unregister
in interface PluginRegistry
ids
- ID's of plug-ins and plug-in fragments to be unregistered
PluginRegistry.unregister(
java.lang.String[])
public void unregisterListener(PluginRegistry.RegistryChangeListener listener)
PluginRegistry
IllegalArgumentException
.
unregisterListener
in interface PluginRegistry
listener
- registered listenerPluginRegistry.unregisterListener(
org.java.plugin.registry.PluginRegistry.RegistryChangeListener)
|
JPF 1.5.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |