com.googlecode.fascinator.common.JsonObject.put()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(81)

本文整理了Java中com.googlecode.fascinator.common.JsonObject.put()方法的一些代码示例,展示了JsonObject.put()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonObject.put()方法的具体详情如下:
包路径:com.googlecode.fascinator.common.JsonObject
类名称:JsonObject
方法名:put

JsonObject.put介绍

暂无

代码示例

代码示例来源:origin: com.googlecode.redbox-mint/plugin-transaction-curation-redbox

private JsonObject newSubscription(JsonSimple response, String oid) {
  JsonObject order = createNewOrder(response,
      TransactionManagerQueueConsumer.OrderType.SUBSCRIBER.toString());
  order.put("oid", oid);
  JsonObject message = new JsonObject();
  message.put("oid", oid);
  message.put("context", "Curation");
  message.put("eventType", "Sending test message");
  message.put("user", "system");
  order.put("message", message);
  return order;
}

代码示例来源:origin: com.googlecode.redbox-mint/redbox-web-service

protected JsonObject getSuccessResponse(String oid) {
  JsonObject jsonObject = new JsonObject();
  jsonObject.put("code", 200);
  if (oid != null) {
    jsonObject.put("oid", oid);
  }
  return jsonObject;
}

代码示例来源:origin: com.googlecode.the-fascinator/fascinator-common

/**
 * Set the title for this manifest
 *
 * @param title : The new title
 */
public void setTitle(String title) {
  getJsonObject().put("title", title);
}

代码示例来源:origin: com.googlecode.the-fascinator/fascinator-common

/**
   * Set the title for this node.
   *
   * @param title : The new title
   */
  public void setTitle(String title) {
    getJsonObject().put("title", title);
  }
}

代码示例来源:origin: com.googlecode.the-fascinator/fascinator-common

/**
 * Set the description for this manifest
 *
 * @param description : The new description
 */
public void setDescription(String description) {
  getJsonObject().put("description", description);
}

代码示例来源:origin: com.googlecode.the-fascinator/fascinator-common

/**
 * Set the ID for this node.
 *
 * @param id : The new ID
 */
public void setId(String id) {
  getJsonObject().put("id", id);
}

代码示例来源:origin: com.googlecode.redbox-mint/redbox-reports

@Override
public synchronized String toJsonString() {
  JsonObject reportObj = config.writeObject("report");
  reportObj.put("dateFormat", strDateFormat);
  reportObj.put("className", this.getClass().getName());
  return super.toJsonString();
}

代码示例来源:origin: com.googlecode.redbox-mint/plugin-transaction-curation-redbox

private JsonObject createNewOrder(JsonSimple response, String type) {
  JsonObject order = response.writeObject("orders", -1);
  order.put("type", type);
  return order;
}

代码示例来源:origin: com.googlecode.redbox-mint/plugin-transaction-curation-mint

private JsonObject newTransform(
    JsonSimple response, String target, String oid) {
  JsonObject order = createNewOrder(response,
      TransactionManagerQueueConsumer.OrderType.
      TRANSFORMER.toString());
  order.put("target", target);
  order.put("oid", oid);
  order.put("config", new JsonObject());
  return order;
}
private JsonObject createNewOrder(JsonSimple response, String type) {

代码示例来源:origin: com.googlecode.redbox-mint/plugin-transaction-curation-mint

private JsonObject createNewOrder(JsonSimple response, String type) {
  JsonObject order = response.writeObject("orders", -1);
  order.put("type", type);
  return order;
}

代码示例来源:origin: com.googlecode.the-fascinator/fascinator-common

/**
 * Set the type of this manifest
 *
 * @param type : The new type
 */
public void setType(String type) {
  getJsonObject().put("packageType", type);
}

代码示例来源:origin: com.googlecode.the-fascinator/fascinator-common

/**
   * Set the 'viewId' node for this manifest
   *
   * @param viewId : The new viewId
   */
  public void setViewId(String viewId) {
    getJsonObject().put("viewId", viewId);
  }
}

代码示例来源:origin: com.googlecode.the-fascinator/fascinator-common

/**
 * Set the hidden flag for this node.
 *
 * @param hidden : The new flag
 */
public void setHidden(boolean hidden) {
  getJsonObject().put("hidden", hidden);
}

代码示例来源:origin: com.googlecode.the-fascinator.plugins/plugin-indexer-solr

/**
 * Add a new document into the buffer, and check if submission is required
 * 
 * @param document : The Solr document to add to the buffer.
 */
private void addToBuffer(String index, String document) {
  JsonObject message = new JsonObject();
  message.put("event", "index");
  message.put("index", index);
  message.put("document", document);
  sendToIndex(message.toString());
}

代码示例来源:origin: com.googlecode.redbox-mint/plugin-transaction-curation-redbox

private JsonObject newMessage(JsonSimple response, String target) {
  JsonObject order = createNewOrder(response,
      TransactionManagerQueueConsumer.OrderType.MESSAGE.toString());
  order.put("target", target);
  order.put("message", new JsonObject());
  return order;
}

代码示例来源:origin: com.googlecode.redbox-mint/plugin-transaction-curation-mint

private JsonObject newMessage(JsonSimple response, String target) {
  JsonObject order = createNewOrder(response,
      TransactionManagerQueueConsumer.OrderType.MESSAGE.toString());
  order.put("target", target);
  order.put("message", new JsonObject());
  return order;
}
private JsonObject newSubscription(JsonSimple response, String oid) {

代码示例来源:origin: com.googlecode.redbox-mint/plugin-transaction-curation-redbox

/**
 * Creation of new Orders with appropriate default nodes
 * 
 */
private JsonObject newIndex(JsonSimple response, String oid) {
  JsonObject order = createNewOrder(response,
      TransactionManagerQueueConsumer.OrderType.INDEXER.toString());
  order.put("oid", oid);
  return order;
}

代码示例来源:origin: com.googlecode.redbox-mint/plugin-transaction-curation-mint

/**
 * Generate an order to add a message to the System's audit log
 * 
 * @param response The response to add an order to
 * @param oid The object ID we are logging
 * @param message The message we want to log
 */
private void audit(JsonSimple response, String oid, String message) {
  JsonObject order = newSubscription(response, oid);
  JsonObject messageObject = (JsonObject) order.get("message");
  messageObject.put("eventType", message);
}

代码示例来源:origin: com.googlecode.redbox-mint/plugin-transaction-curation-mint

/**
 * Creation of new Orders with appropriate default nodes
 * 
 */
private JsonObject newIndex(JsonSimple response, String oid) {
  JsonObject order = createNewOrder(response,
      TransactionManagerQueueConsumer.OrderType.INDEXER.toString());
  order.put("oid", oid);
  return order;
}
private JsonObject newMessage(JsonSimple response, String target) {

代码示例来源:origin: com.googlecode.redbox-mint/redbox-web-service

@SuppressWarnings("unchecked")
public void updateAndSaveKeys(@SuppressWarnings("rawtypes") JSONArray keys) throws IOException {
  JsonObject jsonObject = new JsonObject();
  JsonObject apiJsonObject = new JsonObject();
  apiJsonObject.put("clients", keys);
  jsonObject.put("api", apiJsonObject);
  FileUtils.writeStringToFile(this.apiKeysFile, new JsonSimple(jsonObject).toString(true));
  this.clients = keys;
  initialiseKeyMap();
}

相关文章