Skip to Content.
Sympa Menu

mace-opensaml-users - prepareForAssignment

Subject: OpenSAML user discussion

List archive

prepareForAssignment


Chronological Thread 
  • From: Asa Hardcastle <>
  • To:
  • Subject: prepareForAssignment
  • Date: Mon, 17 Dec 2007 16:58:32 -0500

Hi All,

I am in the middle of modeling ID-WSF 2.0 DST using the java XMLTooling library. It appears that AbstractXMLObject.prepareForAssignment(oldString, newString) -- a protected method -- is used to determine whether or not the DOM should be dumped.

One of the challenges I am facing is writing all of the xmltooling classes without an xsd class generator, hence I am trying to keep the maintainable code to a minimum. One way I am doing this is by modeling attribute sets and using them to store values in my XML Tooling classes. This seemed like a great idea until I realized that xmltooling would have no way of knowing if I changed the value of an attribute, unless I told it.

My solution.

Create a utility class that looks like this:

OpenLibertyHelpers.prepareForAssignment(oldString, newString, abstractXMLObject)

where I compare the strings the same way AbstractXMLObject does it, and then if needed, I call abstractXMLObject.releaseThisAndParentDOM()


Does this sound like an ok approach? Is there a better approach? Any pitfalls?

thanks,

asa


--
Asa Hardcastle, Technical Lead, openLiberty ID-WSF ClientLib
Tel: +1.413.429.1044 Skype: subsystem7




Archive powered by MHonArc 2.6.16.

Top of Page