Bug 138379 - Add extension points to org.eclipse.wst.wsi for implementations of other WS-I profile validators
Summary: Add extension points to org.eclipse.wst.wsi for implementations of other WS-I...
Status: ASSIGNED
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: wst.wsi (show other bugs)
Version: 1.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: Future   Edit
Assignee: Project Inbox CLA
QA Contact: Keith Chong CLA
URL:
Whiteboard: enablement, Extensibility
Keywords: api
Depends on: 137763 137924 137829
Blocks:
  Show dependency tree
 
Reported: 2006-04-25 10:46 EDT by Craig Chaney CLA
Modified: 2010-07-20 11:34 EDT (History)
1 user (show)

See Also:


Attachments
patch that adds extension points (86.65 KB, patch)
2006-04-25 10:49 EDT, Craig Chaney CLA
no flags Details | Diff
Make visible to downstream plug-ins (4.63 KB, patch)
2006-04-25 15:33 EDT, Craig Chaney CLA
no flags Details | Diff
Allow classloader to find testcases classes in other plugins (4.76 KB, patch)
2006-04-26 11:59 EDT, Craig Chaney CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Chaney CLA 2006-04-25 10:46:17 EDT
The WS-I validator currently validates the WS-I Basic Profile, but it has the base logic to handle other Test Assertion Documents for other WS-I profiles.  We should add extension points to org.eclipse.wst.wsi so the implementations for these other profiles can live in a different plugin but still share the same base validation logic.
Comment 1 Craig Chaney CLA 2006-04-25 10:49:31 EDT
Created attachment 39410 [details]
patch that adds extension points

This patch does the following:

Removed elements specific to Basic Profile validation from the classes that
implement the base validator logic:
  - Moved constants for ArtifactType Strings and EntryType Strings into the
    validator interface for the validator that they belong to.  Changed
    references to these constants.
  - Removed constants for ArtifactType instances and EntryType instances.
    Changed the (few) references to these constants to use static API on
    ArtifactType/EntryType instead.
  - Removed API from ProfileValidatorFactory that returns a validator of a
    specific type (they were never used anyway).
  - Added API to BaseValidator that returns the ArtifactType and EntryTypes
    for a given validator

Added two extension points: validator (for clients to register implementations
of BaseValidator) and tad_versions (for clients to register names and version
numbers of the TAD documents that it can cover).
  - Added schema/tad_versions.exsd and schema/validator.exsd
  - Added two extension-point elements to plugin.xml
  - Added several extension elements to plugin.xml for the Basic Profile
    validator already implemented in org.eclipse.wst.wsi
  - Added entries to plugin.properties for the new strings in plugin.xml
  - Added logic to WSITestToolsPlugin to scan the platform registry for the
    new extension points
  - Changed ProfileValidatorFactoryImpl to populate its validatorRegistry from
    information in the platform registry (via WSITestToolsPlugin) rather than
    from a static initializer.
  - Changed Utils to populate its validProfileTADVersions from information in
    the platform registry (via WSITestToolsPlugin) rather than from a static
    initializer.
  - Changed ArtifactType to populate its typeMap from information in the
    validators gathered from the platform registry (via WSITestToolsPlugin)
    rather than from a static initializer.
  - Changed EntryType to populate its entryTypeMap from information in the
    validators gathered from the platform registry (via WSITestToolsPlugin)
    rather than from a static initializer.
  - Removed constants from WSIConstants for TAD versions that now exist in
    plugin.xml

Miscellaneous refactoring:
  - Renamed newArtifactType to getArtifactType in ArtifactType.
  - Renamed newValidatorForArtifact to getValidatorForArtifact in
    ProfileValidatorFactoryImpl
Comment 2 Craig Chaney CLA 2006-04-25 15:33:29 EDT
Created attachment 39456 [details]
Make visible to downstream plug-ins

One additional patch that did not make it into the above patch.  This patches MANIFEST.MF to allow downstream plug-ins to reference classes in this plugin.
Comment 3 Craig Chaney CLA 2006-04-26 11:59:53 EDT
Created attachment 39547 [details]
Allow classloader to find testcases classes in other plugins

One additional update needed for MANIFEST.MF in order to allow the base validator logic to find testcases classes with Class.forName().
Comment 4 Valentin Baciu CLA 2007-11-08 13:26:39 EST
I will try to look at this for WTP 3.0
Comment 5 David Carver CLA 2008-06-28 01:34:29 EDT
Valentin, isn't this what the new Service Polices now allows?  If not this would definitely be nice to have.  My only concern would be typing this in as an eclipse plugin.  There are use cases where it is desirable to run these systems without having to run eclipse headless.
Comment 6 Valentin Baciu CLA 2008-10-30 12:34:05 EDT
(In reply to comment #5)
> Valentin, isn't this what the new Service Polices now allows?  

Dave, the new service policies framework is just the controlling mechanism. The various WS-I validators would have to respect the service policies settings.
Comment 7 Keith Chong CLA 2009-10-08 11:49:55 EDT
Valentin, I'm removing the plan keyword so that it doesn't show up as deferred under the 3.2 plan.  If time permits, and you have a chance to provide this fix for 3.2, then put the plan keyword back.