-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 10/25/12 7:39 AM, Felix Meschberger wrote: > Hi, > > While the required attribute is not directly available through the > API, the ObjectClassDefinition.getAttributeDefinitions(int) method > takes an integer allowing you to select the definitions depending > on requirement: > > ALL -- return all definitions REQUIRED -- return definitions where > required is true OPTIONAL -- return definitions where required is > false > > Does this help ? Or this is the "jump through hoops" you are > referring to ?
Either that, or use the validator method with a null-value will also provide a hint on whether the attribute is required or not. But, it feels awkward to me to use this. Instead I'd like just to query the property directly. And, as John Ross also mentions on bugzilla ([1]), its might be worth to expose the other properties (min, max) as well, so that the validation can also be performed from outside the validator method... [1] https://www.osgi.org/bugzilla/show_bug.cgi?id=154#c1 > > Am 24.10.2012 um 15:46 schrieb Jan Willem Janssen: > >> Hi, >> >> Why is the required property on AttributeDefinition not exposed >> on its interface? When trying to build a generic configuration >> editor for MetaType'd configurations, I've to jump through hoops >> in order to determine whether or not an attribute is required... >> >> - -- Met vriendelijke groeten | Kind regards >> >> Jan Willem Janssen | Software Architect +31 631 765 814 >> >> /My world is:/ >> >> Luminis Technologies B.V. IJsselburcht 3 6825 BS Arnhem +31 88 >> 586 46 30 >> >> http://www.luminis-technologies.com http://www.luminis.eu >> >> KvK (CoC) 09 16 28 93 BTW (VAT) NL8169.78.566.B.01 > > > _______________________________________________ OSGi Developer Mail > List [email protected] > https://mail.osgi.org/mailman/listinfo/osgi-dev > - -- Met vriendelijke groeten | Kind regards Jan Willem Janssen | Software Architect +31 631 765 814 /My world is:/ Luminis Technologies B.V. IJsselburcht 3 6825 BS Arnhem +31 88 586 46 30 http://www.luminis-technologies.com http://www.luminis.eu KvK (CoC) 09 16 28 93 BTW (VAT) NL8169.78.566.B.01 -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQIcBAEBAgAGBQJQiU0nAAoJEKF/mP2eHDc4pTsP/RI5n3iVXwJuEWK6bh4hgPt8 XZ2n2G+DlS9aQnAoov6zbtPe2yHRF6Npc1gHqkl3X5hoHskS+yRH0FBW56H6C92F S2xIW8yP2hWi6zV9u04wxnzeJBCnPMXFupNmCWUpklyJBf2cIhol7pY+ierL6YRZ rDGRMKn+ioDCZ4beDFOdCi01NBLfXJZ2A1vDNjbKEAV7yvy+AcwKQ49H+rSl2mwU dji+Zg7ErSNapLpad+M1RCxFmrsfAqYAbAhaOqRn6md003dA2U6gpvu8SkmN1iek p0cpQxokBXbJkhabskcXD43udNuzwwwCtGXwR8vGFJBhKPIvjffPKDS5njyp7n8P O4qFBANt25yknK2pAwfhZj1FEbhsA2sMfX85Fk1lp4j3SkDV0s/1EkLfmIbcT6cM mIG+hZTz22U/0kvUHphKU2JNO+g6PZJPOIkR5XoXPY1BUHUKTXWnpwlJdPARvQVQ OhTGk0l89LHxATHezJF3puVlSWNx/cLHhq91lKHAZDxW3G+r2N6B/Q/RtgRoWyUC 1GCwHTVopuybyqxdz4R8aoluKJNcVzZkPf4HNHxQYoCvckst8nT3hE/ZkDulUO2B JOKiwtp99oWq8lIbu+tysTh8RSwGWHne5vYtHSnONiJZTWkzYEdjQGnSuTUZICHz /SPJfhbbQvEzxK2mnUQR =tVeg -----END PGP SIGNATURE----- _______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
