public Map<String, File> getModifiedFiles(Map<String, org.jdom2.Element> modifiedData) {
   Map<String, File> modifiedFiles = new HashMap<String, File>();
   for (java.util.Map.Entry<String, ?> modified : modifiedData.entrySet()) {
     Element modifiedElement = (Element) modified.getValue();
     try {
       File temp = ClientUtils.writeXMLToTempFile(modifiedElement);
       modifiedFiles.put(modified.getKey(), temp);
     } catch (IOException e) {
       System.err.println("Failed to create temp file" + e);
     }
   }
   return modifiedFiles;
 }
 @Override
 public void onMessage(Message message) {
   LOG.debug("I HAVE A MESSAGE!!!!!");
   if (message instanceof TextMessage) {
     try {
       String msgText = ((TextMessage) message).getText();
       LOG.debug(msgText);
       Document msgXML = ClientUtils.parseXML(msgText.getBytes());
       messageDirector.direct((ActionMessage) messageConstructor.newInstance(msgXML));
     } catch (Exception e) {
       LOG.error("onMessage failed", e);
     }
   } else {
     throw new IllegalArgumentException("Message must be of type TextMessage");
   }
 }