Java Doc for PluginRegistry.java in  » Development » Java-Plugin-Framework » org » java » plugin » registry » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Development » Java Plugin Framework » org.java.plugin.registry 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.java.plugin.registry.PluginRegistry

All known Subclasses:   org.java.plugin.tools.mocks.MockPluginRegistry,  org.java.plugin.registry.xml.PluginRegistryImpl,
PluginRegistry
public interface PluginRegistry (Code)
Root interface to get access to all meta-information about discovered plug-ins. All objects accessible from the registry are immutable. You can imagine registry as a read-only storage of full information about discovered plug-ins. There is only one exception from this rule: internal state of registry, plug-in descriptors and plug-in elements can be modified indirectly by PluginRegistry.register(URL[]) registering or PluginRegistry.unregister(String[]) un-registering plug-ins with this registry. If your code is interested to be notified on all modifications of plug-ins set, you can PluginRegistry.registerListener(PluginRegistry.RegistryChangeListener) register an implementation of PluginRegistry.RegistryChangeListener with this registry.

Notes on unique ID's (UID's)

There are two types of identifiers in the API: ID's and UID's. ID is an identifier that is unique within set of elements of the same type. UID is an identifier that unique globally within registry space. ID is usually defined by developer in plug-in manifest. UID always combined automatically from several other plug-in "parts". All plug-in elements have method org.java.plugin.registry.Identity.getId getId() that come from basic org.java.plugin.registry.Identity interface, but not all elements have UID - only those that inherits org.java.plugin.registry.UniqueIdentity interface.

There are several utility methods available in this interface that aimed to build UID from different plug-in "parts" and also split UID to it's original elements: PluginRegistry.makeUniqueId(String,Version) , PluginRegistry.makeUniqueId(String,String) , PluginRegistry.extractPluginId(String) , PluginRegistry.extractId(String) and PluginRegistry.extractVersion(String) .


See Also:   org.java.plugin.ObjectFactory.createRegistry
version:
   $Id: PluginRegistry.java,v 1.5 2007/03/03 17:16:26 ddimon Exp $

Inner Class :interface RegistryChangeListener
Inner Class :interface RegistryChangeData



Method Summary
 IntegrityCheckReportcheckIntegrity(PathResolver pathResolver)
     Performs integrity check of all registered plug-ins and generates result as a collection of standard report items.
 IntegrityCheckReportcheckIntegrity(PathResolver pathResolver, boolean includeRegistrationReport)
     Performs integrity check of all registered plug-ins and generates result as a collection of standard report items.
 voidconfigure(ExtendedProperties config)
     Configures this registry instance.
 StringextractId(String uniqueId)
     Extracts plug-in element ID from some unique identifier.
 StringextractPluginId(String uniqueId)
     Extracts plug-in ID from some unique identifier.
 VersionextractVersion(String uniqueId)
     Extracts plug-in version identifier from some unique identifier (plug-in or plug-in fragment).
 Collection<PluginDescriptor>getDependingPlugins(PluginDescriptor descr)
     Utility method that recursively collects all plug-ins that depends on the given plug-in.
 ExtensionPointgetExtensionPoint(String pluginId, String pointId)
     Looks for extension point.
 ExtensionPointgetExtensionPoint(String uniqueId)
     Looks for extension point.
 PluginDescriptorgetPluginDescriptor(String pluginId)
     Returns descriptor of plug-in with given ID.
 Collection<PluginDescriptor>getPluginDescriptors()
     Returns collection of descriptors of all plug-ins that was successfully populated by this registry.
 Collection<PluginFragment>getPluginFragments()
     Returns collection of descriptors of all plug-in fragments that was successfully populated by this registry.
 IntegrityCheckReportgetRegistrationReport()
    
 booleanisExtensionPointAvailable(String pluginId, String pointId)
     Checks if extension point exists and is in valid state.
 booleanisExtensionPointAvailable(String uniqueId)
     Checks if extension point exists and is in valid state.
 booleanisPluginDescriptorAvailable(String pluginId)
     Checks if plug-in exists and is in valid state.
 StringmakeUniqueId(String pluginId, String elementId)
     Constructs unique identifier for some plug-in element from it's ID.
 StringmakeUniqueId(String pluginId, Version version)
     Constructs unique identifier for plug-in with given ID.
 ManifestInforeadManifestInfo(URL manifest)
     Reads basic information from a plug-in or plug-in fragment manifest.
 Map<String, Identity>register(URL[] manifests)
     Registers plug-ins and plug-in fragments in this registry.
 voidregisterListener(RegistryChangeListener listener)
     Registers plug-in registry change event listener.
 Collection<String>unregister(String[] ids)
     Unregisters plug-ins and plug-in fragments with given ID's (including depending plug-ins and plug-in fragments).
 voidunregisterListener(RegistryChangeListener listener)
     Unregisters registry change event listener.



Method Detail
checkIntegrity
IntegrityCheckReport checkIntegrity(PathResolver pathResolver)(Code)
Performs integrity check of all registered plug-ins and generates result as a collection of standard report items.
Parameters:
  pathResolver - optional path resolver integrity check report



checkIntegrity
IntegrityCheckReport checkIntegrity(PathResolver pathResolver, boolean includeRegistrationReport)(Code)
Performs integrity check of all registered plug-ins and generates result as a collection of standard report items.
Parameters:
  pathResolver - optional path resolver
Parameters:
  includeRegistrationReport - if true, the plug-ins registration report willbe included into resulting report integrity check report



configure
void configure(ExtendedProperties config)(Code)
Configures this registry instance. Usually this method is called from ObjectFactory object factory implementation.
Parameters:
  config - registry configuration data



extractId
String extractId(String uniqueId)(Code)
Extracts plug-in element ID from some unique identifier.
Parameters:
  uniqueId - unique ID element ID



extractPluginId
String extractPluginId(String uniqueId)(Code)
Extracts plug-in ID from some unique identifier.
Parameters:
  uniqueId - unique ID plug-in ID



extractVersion
Version extractVersion(String uniqueId)(Code)
Extracts plug-in version identifier from some unique identifier (plug-in or plug-in fragment).
Parameters:
  uniqueId - unique ID plug-in version identifier



getDependingPlugins
Collection<PluginDescriptor> getDependingPlugins(PluginDescriptor descr)(Code)
Utility method that recursively collects all plug-ins that depends on the given plug-in.
Parameters:
  descr - descriptor of plug-in to collect dependencies for collection of PluginDescriptor plug-in descriptors thatdepend on given plug-in



getExtensionPoint
ExtensionPoint getExtensionPoint(String pluginId, String pointId)(Code)
Looks for extension point. This method have throw an IllegalArgumentException if requested extension point can't be found or is in invalid state.
Parameters:
  pluginId - plug-in ID
Parameters:
  pointId - extension point ID plug-in extension point
See Also:   ExtensionPoint.isValid



getExtensionPoint
ExtensionPoint getExtensionPoint(String uniqueId)(Code)
Looks for extension point.
Parameters:
  uniqueId - extension point unique ID plug-in extension point
See Also:   PluginRegistry.getExtensionPoint(String,String)



getPluginDescriptor
PluginDescriptor getPluginDescriptor(String pluginId)(Code)
Returns descriptor of plug-in with given ID.
If plug-in descriptor with given ID can't be found or such plug-in exists but is damaged this method have to throw an IllegalArgumentException . In other words, this method shouldn't return null.
Parameters:
  pluginId - plug-id ID plug-in descriptor



getPluginDescriptors
Collection<PluginDescriptor> getPluginDescriptors()(Code)
Returns collection of descriptors of all plug-ins that was successfully populated by this registry. collection of PluginDescriptor objects



getPluginFragments
Collection<PluginFragment> getPluginFragments()(Code)
Returns collection of descriptors of all plug-in fragments that was successfully populated by this registry. collection of PluginFragment objects



getRegistrationReport
IntegrityCheckReport getRegistrationReport()(Code)
plug-ins registration report for this registry



isExtensionPointAvailable
boolean isExtensionPointAvailable(String pluginId, String pointId)(Code)
Checks if extension point exists and is in valid state. If this method returns true, the method PluginRegistry.getExtensionPoint(String,String) should always return valid extension point.
Parameters:
  pluginId - plug-in ID
Parameters:
  pointId - extension point ID true if extension point exists and valid



isExtensionPointAvailable
boolean isExtensionPointAvailable(String uniqueId)(Code)
Checks if extension point exists and is in valid state.
Parameters:
  uniqueId - extension point unique ID true if extension point exists and valid
See Also:   PluginRegistry.isExtensionPointAvailable(String,String)



isPluginDescriptorAvailable
boolean isPluginDescriptorAvailable(String pluginId)(Code)
Checks if plug-in exists and is in valid state. If this method returns true, the method PluginRegistry.getPluginDescriptor(String) should always return valid plug-in descriptor.
Parameters:
  pluginId - plug-in ID true if plug-in exists and valid



makeUniqueId
String makeUniqueId(String pluginId, String elementId)(Code)
Constructs unique identifier for some plug-in element from it's ID.
Parameters:
  pluginId - plug-in ID
Parameters:
  elementId - element ID unique ID



makeUniqueId
String makeUniqueId(String pluginId, Version version)(Code)
Constructs unique identifier for plug-in with given ID.
Parameters:
  pluginId - plug-in ID
Parameters:
  version - plug-in version identifier unique plug-in ID



readManifestInfo
ManifestInfo readManifestInfo(URL manifest) throws ManifestProcessingException(Code)
Reads basic information from a plug-in or plug-in fragment manifest.
Parameters:
  manifest - manifest data URL manifest info
throws:
  ManifestProcessingException - if manifest data can't be read



register
Map<String, Identity> register(URL[] manifests) throws ManifestProcessingException(Code)
Registers plug-ins and plug-in fragments in this registry. Note that this method not makes plug-ins available for activation by any 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.
Parameters:
  manifests - array of manifest locations map where keys are URL's and values are registered plug-ins orplug-in fragments, URL's for unprocessed manifests are notincluded
throws:
  ManifestProcessingException - if manifest processing error has occurred (optional behavior)
See Also:   PluginManager.publishPlugins(PluginManager.PluginLocation[])




registerListener
void registerListener(RegistryChangeListener listener)(Code)
Registers plug-in registry change event listener. If given listener has been registered before, this method should throw an IllegalArgumentException .
Parameters:
  listener - new registry change event listener



unregister
Collection<String> unregister(String[] ids)(Code)
Unregisters plug-ins and plug-in fragments with given ID's (including depending plug-ins and plug-in fragments).
Parameters:
  ids - ID's of plug-ins and plug-in fragments to be unregistered collection of UID's of actually unregistered plug-ins and plug-infragments



unregisterListener
void unregisterListener(RegistryChangeListener listener)(Code)
Unregisters registry change event listener. If given listener hasn't been registered before, this method should throw an IllegalArgumentException .
Parameters:
  listener - registered listener



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.