Package com.serotonin.json.type

Examples of com.serotonin.json.type.JsonArray


    }
   
    email = jsonObject.getBoolean("email");
    if(email){
     
      JsonArray recipientsArray = jsonObject.getJsonArray("recipients");
      boolean add = true;
      if(recipientsArray != null){
        for(JsonValue jv : recipientsArray){
          RecipientListEntryBean recipient = new RecipientListEntryBean();
          reader.readInto(recipient, jv);
View Full Code Here


            if (user == null)
                throw new TranslatableJsonException("emport.error.missingUser", username);
            userId = user.getId();
        }

        JsonArray components = jsonObject.getJsonArray("viewComponents");
        if (components != null) {
            viewComponents.clear();
            for (JsonValue jv : components)
                addViewComponent(reader.read(ViewComponent.class, jv));
        }

        String text = jsonObject.getString("anonymousAccess");
        if (text != null) {
            anonymousAccess = ShareUser.ACCESS_CODES.getId(text);
            if (anonymousAccess == -1)
                throw new TranslatableJsonException("emport.error.invalid", "anonymousAccess", text,
                        ShareUser.ACCESS_CODES.getCodeList());
        }

        JsonArray jsonSharers = jsonObject.getJsonArray("sharingUsers");
        if (jsonSharers != null) {
            viewUsers.clear();

            for (JsonValue jv : jsonSharers) {
                ShareUser shareUser = reader.read(ShareUser.class, jv);
View Full Code Here

        User user = new UserDao().getUser(username);
        if (user == null)
            throw new TranslatableJsonException("emport.error.missingUser", username);
        userId = user.getId();

        JsonArray jsonDataPoints = jsonObject.getJsonArray("dataPoints");
        if (jsonDataPoints != null) {
            pointList.clear();
            DataPointDao dataPointDao = new DataPointDao();
            for (JsonValue jv : jsonDataPoints) {
                String xid = jv.toString();
                DataPointVO dpVO = dataPointDao.getDataPoint(xid);
                if (dpVO == null)
                    throw new TranslatableJsonException("emport.error.missingPoint", xid);
                pointList.add(dpVO);
            }
        }

        JsonArray jsonSharers = jsonObject.getJsonArray("sharingUsers");
        if (jsonSharers != null) {
            watchListUsers.clear();
            for (JsonValue jv : jsonSharers) {
                ShareUser shareUser = reader.read(ShareUser.class, jv);
                if (shareUser.getUserId() != userId)
View Full Code Here

    @Override
    public void jsonRead(JsonReader reader, JsonObject jsonObject) throws JsonException {
        super.jsonRead(reader, jsonObject);

        JsonArray jsonStateList = jsonObject.getJsonArray("stateImageMappings");
        if (jsonStateList != null) {
            stateImageMap.clear();

            for (JsonValue jv : jsonStateList) {
                JsonObject jsonMapping = jv.toJsonObject();
View Full Code Here

TOP

Related Classes of com.serotonin.json.type.JsonArray

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.