Hello,

Just a start, you would have to fill what is missing, and I don't know if
there is an easier way, but ...

{{groovy}}
def mydoc = xwiki.getDocument('space.classname')
mydoc.getRevisions().each() { rev ->
  println rev
  def baseprop =
mydoc.getDocumentRevision(rev.toString()).getxWikiClass().get('propname').getBasePropertyClass()
  println prop
}
{{/groovy}}

... for a class stored in page "space.classname", and checking the property
named "propname".

This way you could retrieve the baseprop (PropertyClass) of each revision,
store the previous one and compare the information you want for any change
(check javadoc for com.xpn.xwiki.objects.classes.PropertyClass).
You could also compare directly baseprop.toXMLString(), but I'm not sure
it's valid (order always the same, etc ...)
Once you have found the revision you want, use
mydoc.getRevisionInfo(rev.toString()) to access the RevisionInfo object
that will give you the author and date you want.


Hope this helps,
Jeremie


2011/11/13 Eugen Colesnicov <ecolesni...@gmail.com>

> Hello!
>
> If I have in some class a boolean property, how I can get date&time of its
> last modification (date when ONLY this property was modified last time)
> inside my code?
>
> Thanks beforehand!
> Eugen Colesnicov
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/get-date-time-of-some-class-property-modification-tp6990634p6990634.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to