Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318760 - Adding API for expanding a consumes reference into its archive references
Summary: Adding API for expanding a consumes reference into its archive references
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.1   Edit
Assignee: Jason Peterson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-02 15:39 EDT by Jason Peterson CLA
Modified: 2010-07-08 15:34 EDT (History)
2 users (show)

See Also:
jasonpet: pmc_approved? (david_williams)
jasonpet: pmc_approved? (raghunathan.srinivasan)
jasonpet: pmc_approved? (naci.dai)
deboer: pmc_approved+
jasonpet: pmc_approved? (neil.hauge)
jasonpet: pmc_approved? (kaloyan)
ccc: review+


Attachments
patch (32.82 KB, patch)
2010-07-02 15:40 EDT, Jason Peterson CLA
no flags Details | Diff
updated_patch (32.59 KB, patch)
2010-07-06 10:13 EDT, Jason Peterson CLA
no flags Details | Diff
patch_with_updated_prereq (33.51 KB, patch)
2010-07-07 12:19 EDT, Jason Peterson CLA
ccc: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Peterson CLA 2010-07-02 15:39:24 EDT
A new container/library reference was added in 3.2 with a IVirtualReference type of consumes.  This is because this library component was implemented to consume its referenced archives.

Currently, when asking for a component's references one IVirtualReference will be returned for each library referenced by the component.  However, this library may actually contain many references (one for each archive referenced by the library).  New API needs to be added to expand the library reference into its many references when requested by clients.
Comment 1 Jason Peterson CLA 2010-07-02 15:40:01 EDT
Created attachment 173329 [details]
patch
Comment 2 Jason Peterson CLA 2010-07-06 10:13:10 EDT
Created attachment 173558 [details]
updated_patch
Comment 3 Chuck Bridgham CLA 2010-07-06 12:35:23 EDT
approved,

Jason when adding PMC questions.. can you explain what happens today without this work?   Is it a no-op?  does it ignore the contained references.

Also, this api is "additive", and will not affect other component or reference types
Comment 4 Jason Peterson CLA 2010-07-06 13:11:19 EDT
* Explain why you believe this is a stop-ship defect. Or, if it is a
"hotbug" (requested by an adopter) please document it as such. 

Clients will not currently get all a component's references(contained references within a container/library will be excluded) when calling the component's getReferences(Map options) method.  API needs to be added to provide this list when required by clients.

    * Is there a work-around? If so, why do you believe the work-around is
insufficient? 

No work around exists.  

    * How has the fix been tested? Is there a test case attached to the
bugzilla record? Has a JUnit Test been added? 

Fix has been tested by third party client code.

    * Give a brief technical overview. Who has reviewed this fix? 
A new map option has been created to allow clients calling getReferences(Map options) to request that all container/library references be expanded into their list of contained references.

Chuck has reviewed this fix.

    * What is the risk associated with this fix? 

little - since this is only additive API and does not affect existing behavior.  The contained references will continue to be ignored if the new map option is not specified.
Comment 5 Jason Peterson CLA 2010-07-07 12:19:09 EDT
Created attachment 173676 [details]
patch_with_updated_prereq

Updated the j2ee plugin's modulecore minimum version prereq
Comment 6 Carl Anderson CLA 2010-07-07 16:08:12 EDT
Marking this as reviewed - Chuck did review this, but the flag got reset when Jason P marked the bug for PMC approval.
Comment 7 Tim deBoer CLA 2010-07-07 18:20:19 EDT
+1. Patch is large, but ugly if we don't fix. Consistent solution to the problem.
Comment 8 Carl Anderson CLA 2010-07-07 18:35:20 EDT
Committed to HEAD for WTP 3.2.1 and WTP 3.3