Package com.orientechnologies.orient.core.serialization.serializer

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


    for (ODocument doc : db.getMetadata().getSecurity().getAllUsers()) {
      user = new OUser(doc);
      json.beginObject(2, true, null);
      json.writeAttribute(3, false, "name", user.getName());
      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;
View Full Code Here


        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));
        json.writeAttribute(4, false, "update", role.allow(rule.getKey(), ORole.PERMISSION_UPDATE));
        json.writeAttribute(4, false, "delete", role.allow(rule.getKey(), ORole.PERMISSION_DELETE));
        json.endObject(4, true);
      }
      json.endCollection(3, false);

      json.endObject(2, true);
    }
View Full Code Here

        json.writeAttribute(4, false, "delete", role.allow(rule.getKey(), ORole.PERMISSION_DELETE));
        json.endObject(4, true);
      }
      json.endCollection(3, false);

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

    json.beginObject(1, true, "config");
View Full Code Here

      for (OStorageEntryConfiguration entry : db.getStorage().getConfiguration().properties) {
        if (entry != null) {
          json.beginObject(3, true, null);
          json.writeAttribute(4, false, "name", entry.name);
          json.writeAttribute(4, false, "value", entry.value);
          json.endObject(3, true);
        }
      }
    json.endCollection(2, true);

    json.endObject(1, true);
View Full Code Here

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

    json.endObject(1, true);
    json.endObject();
    json.flush();

    iResponse.send(OHttpUtils.STATUS_OK_CODE, "OK", OHttpUtils.CONTENT_JSON, buffer.toString(), null);
  }
View Full Code Here

        }
      }
    json.endCollection(2, true);

    json.endObject(1, true);
    json.endObject();
    json.flush();

    iResponse.send(OHttpUtils.STATUS_OK_CODE, "OK", OHttpUtils.CONTENT_JSON, buffer.toString(), null);
  }
View Full Code Here

       // WRITE RECORDS
       json.beginCollection(-1, true, "result");
       formatMultiValue(it, buffer, format);
       json.endCollection(-1, true);

       json.endObject();
       send(OHttpUtils.STATUS_OK_CODE, "OK", OHttpUtils.CONTENT_JSON, buffer.toString(), null);
     }
   }

   public void formatMultiValue(final Iterator<?> iIterator, final StringWriter buffer, final String format) throws IOException {
View Full Code Here

           json.writeAttribute(3, false, "maxSize", "-");
           json.writeAttribute(3, false, "files", "-");
         } catch (Exception e) {
           json.writeAttribute(3, false, "records", "? (Unauthorized)");
         }
         json.endObject(2, false);
       }
       json.endCollection(1, true);
     }

     json.writeAttribute(1, false, "currentUser", db.getUser().getName());
View Full Code Here

     for (ODocument doc : db.getMetadata().getSecurity().getAllUsers()) {
       user = new OUser(doc);
       json.beginObject(2, true, null);
       json.writeAttribute(3, false, "name", user.getName());
       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;
View Full Code Here

         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));
         json.writeAttribute(4, false, "update", role.allow(rule.getKey(), ORole.PERMISSION_UPDATE));
         json.writeAttribute(4, false, "delete", role.allow(rule.getKey(), ORole.PERMISSION_DELETE));
         json.endObject(4, true);
       }
       json.endCollection(3, false);

       json.endObject(2, true);
     }
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.