Examples of nodeQuery()


Examples of org.structr.core.app.App.nodeQuery()

    final App app  = StructrApp.getInstance(securityContext);
    final Tag left = body.block("div").id("left");

    try (final Tx tx = app.tx()) {

      for (SchemaNode node : app.nodeQuery(SchemaNode.class).getAsList()) {

        final String rawType = node.getName();
        top.inline("a").attr(new Href(restPath + "/" + rawType), new If(rawType.equals(currentType), new Css("active"))).text(rawType);
      }
View Full Code Here

Examples of org.structr.core.app.App.nodeQuery()

        } else {

          // include interfaces here
          searchCommandType = SearchNodeCommand.class;
          query             = app.nodeQuery(entityClass, !inexactSearch);
          isNode            = true;
          return true;
        }
      }
    }
View Full Code Here

Examples of org.structr.core.app.App.nodeQuery()

      String requestedPath = getAbsolutePath();
      logger.log(Level.INFO, "Children of {0} requested", requestedPath);

      if ("/".equals(requestedPath)) {
        try {
          Result<Folder> folders = app.nodeQuery(Folder.class).getResult();
          logger.log(Level.INFO, "{0} folders found", folders.size());

          for (Folder f : folders.getResults()) {

            if (f.getProperty(AbstractFile.parent) != null) {
View Full Code Here

Examples of org.structr.core.app.App.nodeQuery()

            ftpFiles.add(ftpFile);

          }

          Result<File> files = app.nodeQuery(File.class).getResult();
          logger.log(Level.INFO, "{0} files found", files.size());

          for (File f : files.getResults()) {

            if (f.getProperty(AbstractFile.parent) != null) {
View Full Code Here

Examples of org.structr.core.app.App.nodeQuery()

            ftpFiles.add(ftpFile);

          }

          Result<Page> pages = app.nodeQuery(Page.class).getResult();
          logger.log(Level.INFO, "{0} pages found", pages.size());

          for (Page p : pages.getResults()) {

            logger.log(Level.FINEST, "Structr page found: {0}", p);
View Full Code Here

Examples of org.structr.core.app.App.nodeQuery()

      try (final Tx tx = app.tx()) {

        // create push transmission to be filled later
        final PushTransmission tms = new PushTransmission(username, password, host, port.intValue());

        for (final SchemaNode node : app.nodeQuery(SchemaNode.class).getAsList()) {

          if (isFalseOrNull(node.getProperty(SchemaNode.isBuiltinType))) {
            tms.getExportSet().add(node);
          }
        }
View Full Code Here

Examples of org.structr.core.app.App.nodeQuery()

      final App app = StructrApp.getInstance();

      Result<Principal> results;
      try (final Tx tx = app.tx()) {

        results = app.nodeQuery(Principal.class).and(User.confirmationKey, key).getResult();
      }

      if (!results.isEmpty()) {

        final Principal user = results.get(0);
View Full Code Here

Examples of org.structr.core.app.App.nodeQuery()

    try {
      final App app = serverConnection.getApplicationContext();

      // try node first, then relationship
      Syncable syncable = (Syncable)app.nodeQuery().and(GraphObject.id, rootNodeId).includeDeletedAndHidden().getFirst();
      if (syncable == null) {

        syncable = (Syncable)app.relationshipQuery().and(GraphObject.id, rootNodeId).includeDeletedAndHidden().getFirst();
      }
View Full Code Here

Examples of org.structr.core.app.App.nodeQuery()

    final App app = StructrApp.getInstance();

    try (final Tx tx = app.tx()) {

      for (final ResourceAccess access : app.nodeQuery(ResourceAccess.class).getAsList()) {
        app.delete(access);
      }

      tx.success();
View Full Code Here

Examples of org.structr.core.app.App.nodeQuery()

    for (final Entry<String, String> entry : builtinTypeMap.entrySet()) {

      final String type = entry.getKey();
      final String fqcn = entry.getValue();

      SchemaNode schemaNode = app.nodeQuery(SchemaNode.class).andName(type).getFirst();
      if (schemaNode == null) {

        schemaNode = app.create(SchemaNode.class, type);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.