use of com.serotonin.m2m2.web.dwr.util.DwrPermission in project ma-core-public by infiniteautomation.
the class DataPointEditDwr method updateStateChangeCountDetector.
@DwrPermission(user = true)
public void updateStateChangeCountDetector(int pedId, String xid, String alias, int count, int duration, int durationType, int alarmLevel) {
StateChangeCountDetectorVO ped = (StateChangeCountDetectorVO) getEventDetector(pedId);
ped.setXid(xid);
ped.setName(alias);
ped.setChangeCount(count);
ped.setDuration(duration);
ped.setDurationType(durationType);
ped.setAlarmLevel(alarmLevel);
}
use of com.serotonin.m2m2.web.dwr.util.DwrPermission in project ma-core-public by infiniteautomation.
the class DataPointEditDwr method updateAlphanumericRegexStateDetector.
@DwrPermission(user = true)
public void updateAlphanumericRegexStateDetector(int pedId, String xid, String alias, String state, int duration, int durationType, int alarmLevel) {
AlphanumericRegexStateDetectorVO ped = (AlphanumericRegexStateDetectorVO) getEventDetector(pedId);
ped.setXid(xid);
ped.setName(alias);
ped.setState(state);
ped.setDuration(duration);
ped.setDurationType(durationType);
ped.setAlarmLevel(alarmLevel);
}
use of com.serotonin.m2m2.web.dwr.util.DwrPermission in project ma-core-public by infiniteautomation.
the class DataPointEditDwr method purgeNow.
//
// Data purge
//
@DwrPermission(user = true)
public long purgeNow(int purgeType, int purgePeriod, boolean allData) {
DataPointVO point = getDataPoint();
Long count;
if (allData)
count = Common.runtimeManager.purgeDataPointValues(point.getId());
else
count = Common.runtimeManager.purgeDataPointValues(point.getId(), purgeType, purgePeriod);
return count;
}
use of com.serotonin.m2m2.web.dwr.util.DwrPermission in project ma-core-public by infiniteautomation.
the class DataPointEditDwr method ensureEditingPointMatch.
@DwrPermission(user = true)
public ProcessResult ensureEditingPointMatch(int uiPointId) {
ProcessResult result = new ProcessResult();
User user = Common.getHttpUser();
DataPointVO dataPoint = user.getEditPoint();
if (dataPoint.getId() == uiPointId) {
result.addData("match", true);
} else {
result.addData("message", Common.translate("pointEdit.error.uiPointMismatch"));
result.addData("match", false);
}
return result;
}
use of com.serotonin.m2m2.web.dwr.util.DwrPermission in project ma-core-public by infiniteautomation.
the class DataPointEditDwr method updateNoChangeDetector.
@DwrPermission(user = true)
public void updateNoChangeDetector(int pedId, String xid, String alias, int duration, int durationType, int alarmLevel) {
NoChangeDetectorVO ped = (NoChangeDetectorVO) getEventDetector(pedId);
ped.setXid(xid);
ped.setName(alias);
ped.setDuration(duration);
ped.setDurationType(durationType);
ped.setAlarmLevel(alarmLevel);
}
Aggregations