Re: How to create new data type?

Unfortunately, Alfresco has made it almost impossible to create a custom data type. Their internal code for handling values of properties contains a lot of direct coding for specific property types, but does not provide any extension point to add in custom type handling. Though it is technically possible to define a new property type via dictionary models, you would not be able to properly map that to the database without going in and making changes to the Alfresco core to handle your custom type.

Years ago (2011), I provided an enhancement / patch contribution to make implementation of custom property types possible. But after some initial off-JIRA discussions, there was never a follow up, and it fell victim to the big "close all old JIRA issues" purge of 2016. Since I provided the enhancement, some additional features have been added to Alfresco which made it even more difficult as it was back in 2011.

Re: How to create new data type?

What kind of issue do you have with regards to float data specifically? Since I don't deal with scientific metadata, I have so far only encountered issues with precision in one financial/business scenario (fine grained tender data with calculated article prices / averages to the 4th decimal), and there I was able to solve it by simply having two properties - one textual one for the full precision, Java BigDecimal representation, and one regular float value for simpler use cases (queries / sorting)...

We use cookies on this site to enhance your user experience

By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.