Changes between Version 6 and Version 7 of Malted/PluginDevelopmentNotes
- Timestamp:
- 27.06.2013 16:19:56 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Malted/PluginDevelopmentNotes
v6 v7 13 13 == Working on DeepaMehta's server-side, resp. on your model == 14 14 15 16 15 === Working on server-side with dms (ApplicationService === 17 16 18 17 As a rule of thumb: Whenever you pass the ''ClientState''-Object into a dms.*-call, all necessary ACL- and Workspace-Assignments should be set automatically by DeepaMehta. This happens because the information which "User" is currrently active in which "Workspace" is part of the Session-Cookie. 18 19 ==== Constructing a composite (complex) topic object imperatively ==== 20 21 One way how i often create new, complex topic instances, in three steps: 1) CompositValueModel, 2) TopicModel, 3) Topic 22 23 {{{ 24 // create the CompositeValueModel 25 CompositeValueModel fileComposite = new CompositeValueModel(); 26 // build it up according to your model 27 fileComposite.put("org.deepamehta.moodle.filename", filename); 28 fileComposite.put("org.deepamehta.moodle.filepath", filepath); 29 // create a new TopicModel 30 TopicModel fileModel = new TopicModel(MOODLE_FILE_URI, fileComposite); 31 // finally create the new topic instance (with proper ACLs) 32 Topic moodleFile = dms.createTopic(fileModel, clientState); 33 }}} 19 34 20 35 === Introducing my custom types to DeepaMehta's default workspace ===