[ https://jira.nuxeo.com/browse/NXP-7278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Florent Guillaume updated NXP-7278: ----------------------------------- Description: The DocumentPart API should be used only when really needed. DocumentPart is mainly used today to: 1. mistakenly access properties in two steps ({{doc.getPart("dublincore").get("title").getValue()}}), 2. iterate over all properties of a document or a schema. The 1. can be replaced by proper getProperty use. The second one should be checked. was: The DocumentPart API should not leak outside the implementation of DocumentModelImpl, allowing more optimizations on property lookups. DocumentPart is mainly used today to: 1. mistakenly access properties in two steps ({{doc.getPart("dublincore").get("title").getValue()}}), 2. iterate over all properties of a document or a schema. Upgrade notes: New API: - DocumentModel.isDirty() was: Deprecated APIs: - DocumentModel.getPart(part) - DocumentModel.getParts() New API: - DocumentModel.isDirty() Summary: Don't abuse DocumentPart (was: Hide DocumentPart from public API) > Don't abuse DocumentPart > ------------------------ > > Key: NXP-7278 > URL: https://jira.nuxeo.com/browse/NXP-7278 > Project: Nuxeo Enterprise Platform > Issue Type: Clean up > Components: Core > Reporter: Florent Guillaume > Assignee: Florent Guillaume > Fix For: 5.4.3 > > > The DocumentPart API should be used only when really needed. > DocumentPart is mainly used today to: > 1. mistakenly access properties in two steps > ({{doc.getPart("dublincore").get("title").getValue()}}), > 2. iterate over all properties of a document or a schema. > The 1. can be replaced by proper getProperty use. The second one should be > checked. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira _______________________________________________ ECM-tickets mailing list ECM-tickets@lists.nuxeo.com http://lists.nuxeo.com/mailman/listinfo/ecm-tickets