Package org.structr.web

Examples of org.structr.web.Importer


    }

    if (!errorBuffer.hasError()) {

      Importer importer = new Importer(securityContext, _source, baseUrl, null, 1, true, true);

      importer.parse(true);
      importer.createChildNodes(parent, page);

    } else {

      // report error to ui
      throw new FrameworkException(422, errorBuffer);
View Full Code Here


    final boolean publicVisible           = (Boolean) properties.get("publicVisible");
    final boolean authVisible             = (Boolean) properties.get("authVisible");
   
    try {

      Importer pageImporter = new Importer(securityContext, code, address, name, timeout, publicVisible, authVisible);
      boolean parseOk       = pageImporter.parse();

      if (parseOk) {

        logger.log(Level.INFO, "Sucessfully parsed {0}", address);
        getWebSocket().send(MessageBuilder.status().code(200).message("Sucessfully parsed address " + address).build(), true);

        String pageId                  = pageImporter.readPage().getUuid();
        Map<String, Object> resultData = new HashMap();

        if (pageId != null) {

          resultData.put("id", pageId);
          getWebSocket().send(MessageBuilder.status().code(200).message("Sucessfully created page " + name).data(resultData).build(), true);

          // try to import graph gist source code from HTML comment
          pageImporter.importDataComments();
         
        } else {

          getWebSocket().send(MessageBuilder.status().code(400).message("Error while creating page " + name).data(resultData).build(), true);
        }
View Full Code Here

TOP

Related Classes of org.structr.web.Importer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.