Package org.structr.cloud.message

Examples of org.structr.cloud.message.SyncableInfo


    final List<SyncableInfo> syncables = new LinkedList<>();

    if (types == null || types.isEmpty()) {

      for (final Page page : app.nodeQuery(Page.class).getAsList()) {
        syncables.add(new SyncableInfo(page));
      }

      for (final File file : app.nodeQuery(File.class).getAsList()) {
        syncables.add(new SyncableInfo(file));
      }

      for (final Folder folder : app.nodeQuery(Folder.class).getAsList()) {
        syncables.add(new SyncableInfo(folder));
      }

      for (final SchemaNode schemaNode : app.nodeQuery(SchemaNode.class).getAsList()) {
        syncables.add(new SyncableInfo(schemaNode));
      }

      for (final SchemaRelationship schemaRelationship : app.relationshipQuery(SchemaRelationship.class).getAsList()) {
        syncables.add(new SyncableInfo(schemaRelationship));
      }

    }

    for (final Class<Syncable> type : types) {

      Class cls;
      try {
        cls = Class.forName(type.getName());
      } catch (ClassNotFoundException ex) {
        continue;
      }

      if (NodeInterface.class.isAssignableFrom(type)) {

        for (final NodeInterface syncable : (Iterable<NodeInterface>) app.nodeQuery(cls).getAsList()) {
          syncables.add(new SyncableInfo((Syncable) syncable));
        }

      } else if (RelationshipInterface.class.isAssignableFrom(type)) {

        for (final RelationshipInterface syncable : (Iterable<RelationshipInterface>) app.relationshipQuery(cls).getAsList()) {
          syncables.add(new SyncableInfo((Syncable) syncable));
        }

      }

    }
View Full Code Here

TOP

Related Classes of org.structr.cloud.message.SyncableInfo

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.