Examples of nodeQuery()


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

    final long initialFlagsValue             = 0;

    final App app = StructrApp.getInstance();
    try {

      ResourceAccess grant = app.nodeQuery(ResourceAccess.class).and(ResourceAccess.signature, signature).getFirst();
      if (grant == null) {

        // create new grant
        grants.add(app.create(DynamicResourceAccess.class,
          new NodeAttribute(DynamicResourceAccess.signature, signature),
View Full Code Here

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

    final App app = StructrApp.getInstance();
    try {

      // delete grants
      for (DynamicResourceAccess grant : app.nodeQuery(DynamicResourceAccess.class).getAsList()) {
        app.delete(grant);
      }

    } catch (Throwable t) {
View Full Code Here

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

    final App app = StructrApp.getInstance();
    try {

      // delete grant
      DynamicResourceAccess grant = app.nodeQuery(DynamicResourceAccess.class).and(DynamicResourceAccess.signature, signature).getFirst();
      if (grant != null) {

        app.delete(grant);
      }
View Full Code Here

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

        app.delete(grant);
      }

      // delete grant
      DynamicResourceAccess schemaGrant = app.nodeQuery(DynamicResourceAccess.class).and(DynamicResourceAccess.signature, "_schema/" + signature).getFirst();
      if (schemaGrant != null) {

        app.delete(schemaGrant);
      }
      // delete grant
View Full Code Here

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

      if (schemaGrant != null) {

        app.delete(schemaGrant);
      }
      // delete grant
      DynamicResourceAccess viewGrant = app.nodeQuery(DynamicResourceAccess.class).and(DynamicResourceAccess.signature, signature + "/_Ui").getFirst();
      if (viewGrant != null) {

        app.delete(viewGrant);
      }
View Full Code Here

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

   */
  protected ShadowDocument getOrCreateHiddenDocument() throws FrameworkException {

    final App app = StructrApp.getInstance();

    ShadowDocument doc = app.nodeQuery(ShadowDocument.class).getFirst();
    if (doc == null) {

      final PropertyMap properties = new PropertyMap();
      properties.put(AbstractNode.type, ShadowDocument.class.getSimpleName());
      properties.put(AbstractNode.name, "__ShadowDocument__");
View Full Code Here

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

  public GraphObject getEntity() throws FrameworkException {

    final App app = StructrApp.getInstance();
   
    GraphObject entity = app.nodeQuery().uuid(uuid).getFirst();
    if (entity == null) {
     
      entity = app.relationshipQuery().uuid(uuid).getFirst();
    }
View Full Code Here

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

  @Override
  public void processMessage(WebSocketMessage webSocketData) throws FrameworkException {

    final SecurityContext securityContext        = getWebSocket().getSecurityContext();
    final App app                                = StructrApp.getInstance(securityContext);
    final Query query                            = app.nodeQuery();
    final List<? extends GraphObject> resultList = new LinkedList<>();
    final Set<AbstractNode> filteredResults      = new LinkedHashSet<>();

    query.includeDeletedAndHidden();
    query.orTypes(DOMElement.class);
View Full Code Here

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

        // make file visible for auth. users
        file.setProperty(File.visibleToAuthenticatedUsers, true);

        // Don't include files
        SyncCommand.exportToStream(file.getOutputStream(), app.nodeQuery(NodeInterface.class).getAsList(), app.relationshipQuery(RelationshipInterface.class).getAsList(), null, false);

        tx.success();
      }

    } catch (Throwable t) {
View Full Code Here

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

    if (name != null && host != null) {

      final App app     = StructrApp.getInstance();
      try (final Tx tx = app.tx()) {

        final NodeInterface entity = app.nodeQuery().andName(name).getFirst();
        if (entity != null && entity instanceof Syncable) {

          CloudService.doRemote(new PushTransmission((Syncable)entity, true, "admin", "admin", host, 54555), new LoggingListener());
        }
      }
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.