Ejemplo n.º 1
0
 public void createFile(String path, String content) {
   try {
     MDSSession session = getMdsSession();
     PTransaction transaction = getpTransaction(session);
     DocumentName mdsDocumentName = DocumentName.create(path);
     InputSource is = new InputSource(new StringReader(content));
     transaction.createDocument(mdsDocumentName, is);
     session.flushChanges();
   } catch (Exception e) {
     throw new IllegalArgumentException("Could not add new file ", e);
   }
 }