This will still require me to predefine the attributes but I want the attributes to be defined by the users.
Sent from my iPhone > On Apr 13, 2015, at 5:10 AM, Dan Haywood <[email protected]> > wrote: > > From those two references, sounds like you want to allow a bag of arbitrary > additional attributes to some existing object. > > One way you might be able to accomplish that is using (or forking) our > settings module [1] That defines the ability to store both arbitrary > application-level settnigs and also user-level settings. > > - I could imagine that for application-level settings you could use an > object's OID (ie its bookmark) concatenated with a property name, and use > that as a key. > - one could then write a bunch of contributing services that switch on > aspects of the UI if such-and-such a dynamic property is available. > > For example, suppose you have customer #1 with bookmark "CUS:1", and want > to optionally store say properties "ABC", "DEF", "GHI" for that customer. > > That might correspond to application-level settings "CUS:1-ABC", > "CUS-1:DEF", "CUS-1:GHI" etc. > > You could then have a contributing service for each property, eg: > > @DomainService(nature=VIEW_CONTRIBUTIONS_ONLY) > public class AbcContributions { > > @Action(semantics=SAFE) > @ActionLayout(contributed=AS_ASSOCIATION) > public String abc(Object obj) { > Bookmark b = bookmarkservice.bookmarkFor(o); > String settingKey = b.toString() + ":" + "abc"; > ApplicationSetting setting = applicationSettings.find(settingKey); > return setting!=null?setting.valueAsString(): null; > } > public boolean hideAbc(Object o) { > // something similar, returning true if there is no setting > } > @Inject BookmarkService bookmarkService; > @Inject ApplicatoinSettingsService applicationSettings; > } > > The above would render a property "abc" only for those objects that have an > "ABC" setting. You could have similar services for "DEF", "GHI" properties > etc. > > Noit sure if this is exactly what you require, but perhaps is enough to get > you started. > > Dan > > > [1] https://github.com/isisaddons/isis-module-settings > >> On 13 April 2015 at 01:46, James Agada <[email protected]> wrote: >> >> I am looking more at implementing something like what is described here >> http://aspnet.4guysfromrolla.com/articles/082008-1.aspx OR the one here >> http://stackoverflow.com/questions/12244138/set-of-dynamic-properties-in-domain-driven-design >> I really do not want to use ElasticSearch or Solr. >> James Agada >> Chief Technology Officer >> >> >> On Apr 12, 2015, at 4:39 PM, Branham, Jeremy [HR] < >> [email protected]> wrote: >> >> Hi James - >> >> Are you looking for a way to create an editing interface for these objects >> dynamically? >> >> Typically in domain driven design you know what the objects look like, so >> Apache Isis leverages the description of the object to create the interface. >> In the case of an object with an unknown structure, I'm not sure Isis >> would be a good fit. (Please someone let me know if I'm missing something) >> >> Are you familiar with ElasticSearch [1] or Apache Solr [2]? >> >> These applications provide full rest and persistence capabilities for >> objects where the structure is not known a priori. >> >> If you need a UI generated for the objects, you might look at Thymeleaf >> [3]. >> Or maybe just using a lightweight JS model binding like Knockout [4] or >> Angular [5] depending on your use case. >> >> All the technologies mentioned are open source. >> >> [1] https://www.elastic.co >> [2] http://lucene.apache.org/solr/ >> [3] http://www.thymeleaf.org >> [4] http://knockoutjs.com >> [5] https://angularjs.org >> >> >> >> On Apr 12, 2015 6:46 AM, Martin Grigorov <[email protected]> wrote: >> >> >> Hi, >> >> Afaik JDO/DataNucleus will complain that your classes should be enhanced. >> Reading >> >> http://www.datanucleus.org/products/accessplatform_3_2/jpa/enhancer.html#runtime >> I understand that only with JPA you can use runtime enhancement. >> But if you're going to generate the classes at runtime then you can make >> them JDO-ready by implementing PersistanceCapable *interface* yourself. >> As a backend you can use MongoDB. >> >> On Apr 12, 2015 4:24 AM, "James Agada" <[email protected]> wrote: >> >> >> I am exploring a use case where the structure of objects are not known a >> >> priori. Is there a way to manage such objects with isis? I can do it with >> some son backend . >> >> James Agada >> Chief Technology Officer >> >> >> This email and any attachment thereto are confidential and priviledged. >> >> if you have received it in error, please delete immediately and notify the >> sender. Do not disclose, copy, circulate or in any way use it. The >> information contained therein is for the address only, if you reply on it, >> its at your own risk. Emails are not guaranteed to be secure or error free, >> the message and any attachment could be intercepted, corrupted, lost, >> delayed, incomplete or ammended. Computer warehouse group and its divisions >> do not accept liability for damage caused by this email or any attachment. >> The message you tried to print is protected with Information Rights >> Management. You don't have the necessary user rights to print the message. >> >> >> ________________________________ >> >> This e-mail may contain Sprint proprietary information intended for the >> sole use of the recipient(s). Any use by others is prohibited. If you are >> not the intended recipient, please contact the sender and delete all copies >> of the message. >> This email and any attachment thereto are confidential and priviledged. if >> you have received it in error, please delete immediately and notify the >> sender. Do not disclose, copy, circulate or in any way use it. The >> information contained therein is for the address only, if you reply on it, >> its at your own risk. Emails are not guaranteed to be secure or error free, >> the message and any attachment could be intercepted, corrupted, lost, >> delayed, incomplete or ammended. Computer warehouse group and its divisions >> do not accept liability for damage caused by this email or any attachment. >> The message you tried to print is protected with Information Rights >> Management. You don't have the necessary user rights to print the message. >> >> >> This email and any attachment thereto are confidential and priviledged. >> if you have received it in error, please delete immediately and notify the >> sender. Do not disclose, copy, circulate or in any way use it. The >> information contained therein is for the address only, if you reply on it, >> its at your own risk. Emails are not guaranteed to be secure or error free, >> the message and any attachment could be intercepted, corrupted, lost, >> delayed, incomplete or ammended. Computer warehouse group and its divisions >> do not accept liability for damage caused by this email or any attachment. >> The message you tried to print is protected with Information Rights >> Management. You don't have the necessary user rights to print the message. > This email and any attachment thereto are confidential and priviledged. if > you have received it in error, please delete immediately and notify the > sender. Do not disclose, copy, circulate or in any way use it. The > information contained therein is for the address only, if you reply on it, > its at your own risk. Emails are not guaranteed to be secure or error free, > the message and any attachment could be intercepted, corrupted, lost, > delayed, incomplete or ammended. Computer warehouse group and its divisions > do not accept liability for damage caused by this email or any attachment. > The message you tried to print is protected with Information Rights > Management. You don't have the necessary user rights to print the message. This email and any attachment thereto are confidential and priviledged. if you have received it in error, please delete immediately and notify the sender. Do not disclose, copy, circulate or in any way use it. The information contained therein is for the address only, if you reply on it, its at your own risk. Emails are not guaranteed to be secure or error free, the message and any attachment could be intercepted, corrupted, lost, delayed, incomplete or ammended. Computer warehouse group and its divisions do not accept liability for damage caused by this email or any attachment. The message you tried to print is protected with Information Rights Management. You don't have the necessary user rights to print the message.
