On Oct 28, 2009, at 8:28 AM, Marius Dumitru Florea wrote: > Sergiu Dumitriu wrote: >> On 10/26/2009 05:38 PM, Marius Dumitru Florea wrote: >>> Hi devs, >>> >>> I propose we add the following method to DocumentModelBridge: >>> >>> /** >>> * @return a string identifying the current version of this >>> document >>> */ >>> String getVersion();
+0 >> > >> +0.75 > > Or, I could add a DocumentVersion class in the bridge and instead > have: > > /** > * @return the document version > */ > DocumentVersion getVersion(); > > In this case we have to decide how to create a DocumentVersion > instance > and how to serialize it. The easiest way is: > > 1) new DocumentVersion(String) + DocumentVersion#toString() > > and the elaborate way is: > > 2) DocumentVersionFactory + DocumentVersionSerializer > > WDYT? Is it worth to add the DocumentVersion class now when we don't > have a real need? I think I prefer the String for the reason Thomas mentioned (ie that this is just a bridge and not meant to be our model - I'll restart the discussion about the Model API). Thanks -Vincent > > Thanks, > Marius > >> >>> I need it for the WYSIWYG sync plug-in service. I'm refactoring >>> the code >>> to use components and I want to drop the dependency on xwiki-core. >>> Getting the document version is the last thing that stops me. >>> >>> Here my +1. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

