Examples of toJSON()


Examples of org.eclipse.orion.server.logs.objects.FileAppenderResource.toJSON()

      }

      FileAppenderResource fileAppender = new FileAppenderResource(
          appender, baseLocation);
      return new ServerStatus(Status.OK_STATUS,
          HttpServletResponse.SC_OK, fileAppender.toJSON());

    } catch (Exception e) {
      String msg = NLS.bind(
          "An error occured when looking for appender: {0}",
          appenderName);
View Full Code Here

Examples of org.eclipse.orion.server.logs.objects.LoggerResource.toJSON()

      loggerResource.setBaseLocation(baseLocation);
      loggerResource.setName(logger.getName());
      loggerResource.setLevel(logger.getLevel());
      loggerResource.setEffectiveLevel(logger.getEffectiveLevel());

      JSONObject result = loggerResource.toJSON();
      OrionServlet.writeJSONResponse(request, response, result);
      response.setHeader(ProtocolConstants.HEADER_LOCATION,
          result.getString(ProtocolConstants.KEY_LOCATION));
      return true;
View Full Code Here

Examples of org.eclipse.orion.server.logs.objects.RollingFileAppenderResource.toJSON()

      if (rollingFileAppender.getArchivedLogFiles() == null)
        LogUtils.attachArchivedLogFiles(appender, rollingFileAppender,
            logService);

      return new ServerStatus(Status.OK_STATUS,
          HttpServletResponse.SC_OK, rollingFileAppender.toJSON());

    } catch (Exception e) {
      String msg = NLS.bind(
          "An error occured when looking for rolling appender: {0}",
          appenderName);
View Full Code Here

Examples of org.g4studio.core.metatype.Dto.toJson()

    if (G4Utils.isEmpty(userInfo)) {
      jsonDto.put("success", new Boolean(false));
      jsonDto.put("msg", "帐号输入错误,请重新输入!");
      jsonDto.put("errorType", "1");
      log.warn("帐户[" + account + "]登陆失败.(失败原因:不存在此帐户)");
      write(jsonDto.toJson(), response);
      return mapping.findForward("");
    }
    if (!password.equals(userInfo.getPassword())) {
      jsonDto.put("success", new Boolean(false));
      jsonDto.put("msg", "密码输入错误,请重新输入!");
View Full Code Here

Examples of org.g4studio.core.metatype.impl.BaseDto.toJson()

    if (G4Utils.isEmpty(userInfo)) {
      jsonDto.put("success", new Boolean(false));
      jsonDto.put("msg", "帐号输入错误,请重新输入!");
      jsonDto.put("errorType", "1");
      log.warn("帐户[" + account + "]登陆失败.(失败原因:不存在此帐户)");
      write(jsonDto.toJson(), response);
      return mapping.findForward("");
    }
    if (!password.equals(userInfo.getPassword())) {
      jsonDto.put("success", new Boolean(false));
      jsonDto.put("msg", "密码输入错误,请重新输入!");
View Full Code Here

Examples of org.ggp.base.util.match.Match.toJSON()

        } else if (event instanceof ServerCompletedMatchEvent) {
              System.out.println("State[" + nState[0] + "] Full (Terminal): " + oldContents);
              System.out.println("Match information: " + theMatch);
              System.out.println("Goals: " + ((ServerCompletedMatchEvent)event).getGoals());
              try {
                System.out.println("Match information cryptographically signed? " + SignableJSON.isSignedJSON(new JSONObject(theMatch.toJSON())));
                System.out.println("Match information cryptographic signature valid? " + SignableJSON.verifySignedJSON(new JSONObject(theMatch.toJSON())));
              } catch (JSONException je) {
                je.printStackTrace();
              }
              System.out.println("Game over.");
View Full Code Here

Examples of org.glassfish.admin.rest.composite.metadata.RestResourceMetadata.toJson()

     * @throws JSONException
     */
    @OPTIONS
    public String options() throws JSONException {
        RestResourceMetadata rrmd = new RestResourceMetadata(this);
        return rrmd.toJson().toString(Util.getFormattingIndentLevel());
    }

    /**
     * This method creates a sub-resource of the specified type. Since the JAX-RS does not allow for injection into
     * sub-resources (as it doesn't know or control the lifecycle of the object), this method performs a manual
View Full Code Here

Examples of org.glassfish.admin.rest.logviewer.LogRecord.toJSON()

    rec.setNameValuePairs((String) record.get(fieldIdx++));
    rec.setMessageID((String) record.get(fieldIdx++));
    rec.setMessage((String) record.get(fieldIdx++));
    if (type.equals("json")) {
        sb.append(sep);
        sb.append(rec.toJSON());
        sep = ",";
    } else {
        sb.append(rec.toXML());

    }
View Full Code Here

Examples of org.hornetq.core.transaction.TransactionDetail.toJSON()

         if (tx == null)
         {
            continue;
         }
         TransactionDetail detail = new JMSTransactionDetail(xid, tx, entry.getValue());
         txDetailListJson.put(detail.toJSON());
      }
      return txDetailListJson.toString();
   }

   public String listPreparedTransactionDetailsAsHTML() throws Exception
View Full Code Here

Examples of org.hornetq.core.transaction.impl.CoreTransactionDetail.toJSON()

            Xid xid = entry.getKey();
            TransactionDetail detail = new CoreTransactionDetail(xid,
                                                                 resourceManager.getTransaction(xid),
                                                                 entry.getValue());

            txDetailListJson.put(detail.toJSON());
         }
         return txDetailListJson.toString();
      }
      finally
      {
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.