Changes between Version 6 and Version 7 of Malted/PluginDevelopmentNotes


Ignore:
Timestamp:
27.06.2013 16:19:56 (8 years ago)
Author:
Malte
Comment:

adding constructing composite types in java with dms

Legend:

Unmodified
Added
Removed
Modified
  • Malted/PluginDevelopmentNotes

    v6 v7  
    1313== Working on DeepaMehta's server-side, resp. on your model == 
    1414 
    15  
    1615=== Working on server-side with dms (ApplicationService === 
    1716 
    1817As 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 
     21One way how i often create new, complex topic instances, in three steps: 1) CompositValueModel, 2) TopicModel, 3) Topic 
     22 
     23{{{ 
     24// create the CompositeValueModel 
     25CompositeValueModel fileComposite = new CompositeValueModel(); 
     26// build it up according to your model 
     27fileComposite.put("org.deepamehta.moodle.filename", filename); 
     28fileComposite.put("org.deepamehta.moodle.filepath", filepath); 
     29// create a new TopicModel 
     30TopicModel fileModel = new TopicModel(MOODLE_FILE_URI, fileComposite); 
     31// finally create the new topic instance (with proper ACLs) 
     32Topic moodleFile = dms.createTopic(fileModel, clientState); 
     33}}} 
    1934 
    2035=== Introducing my custom types to DeepaMehta's default workspace ===