Examples of PointHierarchy


Examples of com.serotonin.m2m2.vo.hierarchy.PointHierarchy

    @DwrPermission(user = true)
    public Map<String, Object> init() {
        DataPointDao dataPointDao = new DataPointDao();
        Map<String, Object> data = new HashMap<String, Object>();

        PointHierarchy ph = dataPointDao.getPointHierarchy(true).copyFoldersOnly();
        User user = Common.getUser();
        List<DataPointVO> points = dataPointDao.getDataPoints(DataPointExtendedNameComparator.instance, false);
        for (DataPointVO point : points) {
            if (Permissions.hasDataPointReadPermission(user, point))
                ph.addDataPoint(point.getPointFolderId(), new DataPointSummary(point));
        }

        ph.parseEmptyFolders();

        WatchList watchList = new WatchListDao().getSelectedWatchList(user.getId());
        prepareWatchList(watchList, user);
        setWatchList(user, watchList);

        data.put("pointFolder", ph.getRoot());
        data.put("shareUsers", getShareUsers(user));
        data.put("selectedWatchList", getWatchListData(user, watchList));

        return data;
    }
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.