Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335865 - [metadata] Provide serialization API
Summary: [metadata] Provide serialization API
Status: CLOSED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.7   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Pascal Rapicault CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-31 11:32 EST by Pascal Rapicault CLA
Modified: 2011-02-05 00:28 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2011-01-31 11:32:39 EST
There are cases where ppl just need to store IUs on disk into a file without having to go through the complexity (and potential scalability issues) of the repository manager.
Comment 1 Igor Fedorenko CLA 2011-01-31 11:46:12 EST
Would it be possible to also add API to serialize/deserialize List<IArtifact>?
Comment 2 Jeff McAffer CLA 2011-01-31 22:39:01 EST
understood but we do need to take care of API contract issues. If they are written out then they have to be readable.  Haven't we recreated the repository structure then?
Comment 3 Pascal Rapicault CLA 2011-01-31 22:47:17 EST
> understood but we do need to take care of API contract issues. If they are written out then they have to be readable.  Haven't we recreated the repository structure then?
  Please detail your concerns.
  This API will write out a set of IUs and read them back. Nothing is to be specified about the format of the file. The only contract will be that we want the reader to be able to read back some old formats
The current implementation (not committed) uses the MetadataWriter class which generates something equivalent to the <units/> element found in a repo.
Comment 4 Jeff McAffer CLA 2011-01-31 22:56:01 EST
i see.  So the serialized form will not be API.  great.  Thanks for the clarification.
Comment 5 Pascal Rapicault CLA 2011-02-01 14:25:58 EST
I have released two classes called IUSerializer and IUDeserializer in a package called org.eclipse.equinox.p2.metadata.io in the p2.metadata.repository bundle.
Comment 6 Pascal Rapicault CLA 2011-02-01 15:33:10 EST
Reopening, I missed the need to serialize IArtifactDescriptor...
Comment 7 Pascal Rapicault CLA 2011-02-05 00:28:01 EST
Given that it does not really make sense to just be able to store artifact descriptors by themselves, the only API that will be provided is for IUs.