import com.serotonin.m2m2.web.taglib.Functions;
public class WatchListDwr extends ModuleDwr {
@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));
}