Class TagBinding


  • public class TagBinding
    extends java.lang.Object
    Convert Tags from the Profile to and from XML
    Author:
    Kim Rutherford
    • Constructor Summary

      Constructors 
      Constructor Description
      TagBinding()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void marshal​(Tag tag, javax.xml.stream.XMLStreamWriter writer)
      Convert a Tag to XML and write XML to given writer.
      int unmarshal​(ProfileManager pm, java.lang.String userName, java.io.Reader reader)
      Parse Tags from XML and write them to the userprofile object store
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TagBinding

        public TagBinding()
    • Method Detail

      • marshal

        public static void marshal​(Tag tag,
                                   javax.xml.stream.XMLStreamWriter writer)
        Convert a Tag to XML and write XML to given writer.
        Parameters:
        tag - the Tag
        writer - the XMLStreamWriter to write to
      • unmarshal

        public int unmarshal​(ProfileManager pm,
                             java.lang.String userName,
                             java.io.Reader reader)
        Parse Tags from XML and write them to the userprofile object store
        Parameters:
        pm - a ProfileManager used to get UserProfile objects for a given username
        userName - the user whose tags are being unmarshalled
        reader - the saved Tags
        Returns:
        number of new tags created