Examples of ShareUser


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

Examples of com.serotonin.m2m2.view.ShareUser

                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

Examples of com.serotonin.m2m2.view.ShareUser

                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

Examples of com.serotonin.m2m2.view.ShareUser

    }

    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

Examples of com.serotonin.m2m2.view.ShareUser

        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

Examples of com.serotonin.m2m2.view.ShareUser

                break;
            }
        }

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

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

Examples of com.serotonin.m2m2.view.ShareUser

                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

Examples of com.serotonin.m2m2.view.ShareUser

    }

    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
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.