Lab 4: Programming the Publisher Shim to Modify NDS User Objects
Important System.out.println( debugMsgString ); Where debugMsgString is your own debug string. Your debug strings will be sent to DSTrace output where they can help you logically isolate problems in your code. Do This
EXPLANATION: During this lab, you will change the functionality in the driver by writing new methods for its Publisher shim. You must shut down the driver because you will be writing new methods for its Publisher shim. When the driver starts up, it reads and caches all the class/jar files. So, in order for the driver to see the new classes/jars, you must shut it down and restart it. The lab driver obtains input events from PBXSimulator by polling it. Example: element(0) == "evtType^mod employee" The job of a publisher shim is to translate the event from an external system into XDS which is understandable by the DirXML engine which can then implement the event in NDS. In the example shown above the lab publisher should produce an XDS document looking something like that shown below: <modify class-name="User" src-dn="0199"> The type mappings in "MappingRule.xml" file are shown below for your convenience.
Your job in this lab is to use the org.w3c.dom package JavaDoc installed on your workstation for reference to modify the buildModEmpXDS() AND buildModifyAttrElem() methods in LabPublicationShim.java so that the lab publisher will build an XDS output document similar to the one above. When the XDS document is sent to the DirXML engine, the engine will perform a change attribute value operation on the target object in the NDS tree.
Make a change to the title attribute in some account in PBXSimulator and then click its "Commit" button. The Publisher should detect the event almost immediately and attempt to perform the change you specified. If the change is pushed to NDS, your Publisher side works (HINT: Don't forget to reopen ConsoleOne windows to refresh their contents before checking for changes.). Remember that events are constrained by the publisher's and the driver's respective filters and then supported by the code in the publisher shim. If you add another class and/or attribute to the filters, you must also add code to support the new class and/or attribute type in the publisher shim. You can view the document you are building at any time by: // First, create XmlDocument from DOM Document you are building
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||