Hello,
Writing a Java component that creates new XWiki pages and objects, I'd like
to properly check the data before saving it to avoid some
not-nice-and-avoidable exceptions to occur.
Seems that in XWiki mappings, a StringProperty is limited to 255 chars and
a LargeStringProperty to 60000
But as it's a hibernate mapping (meaning it's customizable by users), and
also as it can possibly change with future versions of XWiki, I'd like to
know if there is an easy way to programmatically check for the maximum
authorized length of these fields from a Java component ?
I'd prefer truncating the strings before trying to save the documents (or
not saving them at all) ... I had horrible times dealing with objects
incorrectly created because of strings too long ... (did not check with
recent xwiki though).
Thanks,
Jeremie