Examples of beginCollection()


Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

        json.writeAttribute(3, false, "roles", user.getRoles() != null ? Arrays.toString(user.getRoles().toArray()) : "null");
        json.endObject(2, false);
      }
      json.endCollection(1, true);

      json.beginCollection(1, true, "roles");
      ORole role;
      for (ODocument doc : db.getMetadata().getSecurity().getRoles()) {
        role = new ORole(doc);
        json.beginObject(2, true, null);
        json.writeAttribute(3, false, "name", role.getName());
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

        role = new ORole(doc);
        json.beginObject(2, true, null);
        json.writeAttribute(3, false, "name", role.getName());
        json.writeAttribute(3, false, "mode", role.getMode().toString());

        json.beginCollection(3, true, "rules");
        for (Entry<String, Byte> rule : role.getRules().entrySet()) {
          json.beginObject(4);
          json.writeAttribute(4, true, "name", rule.getKey());
          json.writeAttribute(4, false, "create", role.allow(rule.getKey(), ORole.PERMISSION_CREATE));
          json.writeAttribute(4, false, "read", role.allow(rule.getKey(), ORole.PERMISSION_READ));
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

      }
      json.endCollection(1, true);

      json.beginObject(1, true, "config");

      json.beginCollection(2, true, "values");
      json.writeObjects(3, true, null,
          new Object[] { "name", "dateFormat", "value", db.getStorage().getConfiguration().dateFormat }, new Object[] { "name",
              "dateTimeFormat", "value", db.getStorage().getConfiguration().dateTimeFormat }, new Object[] { "name",
              "localeCountry", "value", db.getStorage().getConfiguration().localeCountry }, new Object[] { "name",
              "localeLanguage", "value", db.getStorage().getConfiguration().localeLanguage }, new Object[] { "name",
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

              "localeCountry", "value", db.getStorage().getConfiguration().localeCountry }, new Object[] { "name",
              "localeLanguage", "value", db.getStorage().getConfiguration().localeLanguage }, new Object[] { "name",
              "definitionVersion", "value", db.getStorage().getConfiguration().version });
      json.endCollection(2, true);

      json.beginCollection(2, true, "properties");
      if (db.getStorage().getConfiguration().properties != null)
        for (OStorageEntryConfiguration entry : db.getStorage().getConfiguration().properties) {
          if (entry != null) {
            json.beginObject(3, true, null);
            json.writeAttribute(4, false, "name", entry.name);
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

      long current = 0;

      long holesSize = 0;

      json.beginCollection(1, true, "segments");
      for (ODataHoleInfo h : holes) {
        if (h.dataOffset == -1)
          continue;

        if (current < h.dataOffset) {
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

      StringWriter jsonBuffer = new StringWriter();
      OJSONWriter json = new OJSONWriter(jsonBuffer);

      json.beginObject();

      json.beginCollection(1, true, "connections");

      String lastCommandOn;
      String connectedOn;

      final OClientConnection[] conns = OServerMain.server().getManagedServer().getConnections();
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

        writeField(json, 2, "connectedOn", connectedOn);
        json.endObject(2);
      }
      json.endCollection(1, false);

      json.beginCollection(1, true, "dbs");
      Map<String, OResourcePool<String, ODatabaseDocumentTx>> dbPool = OSharedDocumentDatabase.getDatabasePools();
      for (Entry<String, OResourcePool<String, ODatabaseDocumentTx>> entry : dbPool.entrySet()) {
        for (ODatabaseDocumentTx db : entry.getValue().getResources()) {

          json.beginObject(2);
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

          json.endObject(2);
        }
      }
      json.endCollection(1, false);

      json.beginCollection(1, true, "storages");
      OStorage[] storages = OServerMain.server().getManagedServer().getOpenedStorages();
      for (OStorage s : storages) {
        json.beginObject(2);
        writeField(json, 2, "name", s.getName());
        writeField(json, 2, "type", s.getClass().getSimpleName());
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

        writeField(json, 2, "activeUsers", s.getUsers());
        json.endObject(2);
      }
      json.endCollection(1, false);

      json.beginCollection(2, true, "properties");
      for (OServerEntryConfiguration entry : OServerMain.server().getConfiguration().properties) {
        json.beginObject(3, true, null);
        json.writeAttribute(4, false, "name", entry.name);
        json.writeAttribute(4, false, "value", entry.value);
        json.endObject(3, true);
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

        json.endObject(3, true);
      }
      json.endCollection(2, true);

      json.beginObject(1, true, "profiler");
      json.beginCollection(2, true, "counters");
      for (String c : OProfiler.getInstance().getCounters()) {
        json.beginObject(3);
        writeField(json, 3, "name", c);
        writeField(json, 3, "value", OProfiler.getInstance().getCounter(c));
        json.endObject(3);
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.