Package com.serotonin.m2m2.view

Examples of com.serotonin.m2m2.view.ShareUser


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

            for (JsonValue jv : jsonSharers) {
                ShareUser shareUser = reader.read(ShareUser.class, jv);
                if (shareUser.getUserId() != userId)
                    // No need for the owning user to be in this list.
                    viewUsers.add(shareUser);
            }
        }
    }
View Full Code Here


                break;
            }
        }

        if (!found) {
            ShareUser su = new ShareUser();
            su.setUserId(userId);
            su.setAccessType(accessType);
            watchList.getWatchListUsers().add(su);
        }

        new WatchListDao().saveWatchList(watchList);
View Full Code Here

                return watchList.getWatchListUsers().size();
            }

            @Override
            public void setValues(PreparedStatement ps, int i) throws SQLException {
                ShareUser wlu = watchList.getWatchListUsers().get(i);
                ps.setInt(1, watchList.getId());
                ps.setInt(2, wlu.getUserId());
                ps.setInt(3, wlu.getAccessType());
            }
        });
    }
View Full Code Here

    }

    class WatchListUserRowMapper implements RowMapper<ShareUser> {
        @Override
        public ShareUser mapRow(ResultSet rs, int rowNum) throws SQLException {
            ShareUser wlu = new ShareUser();
            wlu.setUserId(rs.getInt(1));
            wlu.setAccessType(rs.getInt(2));
            return wlu;
        }
View Full Code Here

        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)
                    // No need for the owning user to be in this list.
                    watchListUsers.add(shareUser);
            }
        }
    }
View Full Code Here

                break;
            }
        }

        if (!found) {
            ShareUser su = new ShareUser();
            su.setUserId(userId);
            su.setAccessType(accessType);
            view.getViewUsers().add(su);
        }

        return view.getViewUsers();
    }
View Full Code Here

                return view.getViewUsers().size();
            }

            @Override
            public void setValues(PreparedStatement ps, int i) throws SQLException {
                ShareUser vu = view.getViewUsers().get(i);
                ps.setInt(1, view.getId());
                ps.setInt(2, vu.getUserId());
                ps.setInt(3, vu.getAccessType());
            }
        });
    }
View Full Code Here

    }

    class ViewUserRowMapper implements RowMapper<ShareUser> {
        @Override
        public ShareUser mapRow(ResultSet rs, int rowNum) throws SQLException {
            ShareUser vu = new ShareUser();
            vu.setUserId(rs.getInt(1));
            vu.setAccessType(rs.getInt(2));
            return vu;
        }
View Full Code Here

        return KEY;
    }

    @Override
    public ChangeTypeRT createRuntime() {
        return new AlternateBooleanChangeRT();
    }
View Full Code Here

    return alternateBooleanChange;
  }

  @Override
  public PointLocatorRT createRuntime() {
    ChangeTypeRT changeType = getChangeType().createRuntime();
    String startValue = getChangeType().getStartValue();
    DataValue startObject;
    if (dataTypeId == DataTypes.BINARY)
      startObject = BinaryValue.parseBinary(startValue);
    else if (dataTypeId == DataTypes.MULTISTATE) {
View Full Code Here

TOP

Related Classes of com.serotonin.m2m2.view.ShareUser

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.