use of com.serotonin.m2m2.module.definitions.dataPoint.DataPointChangeDefinition in project ma-core-public by MangoAutomation.
the class DataPointService method delete.
@Override
protected DataPointVO delete(DataPointVO vo) throws PermissionException, NotFoundException {
PermissionHolder user = Common.getUser();
ensureDeletePermission(user, vo);
for (DataPointChangeDefinition def : changeDefinitions) {
def.preDelete(vo);
}
getRuntimeManager().stopDataPoint(vo.getId());
dao.delete(vo);
for (DataPointChangeDefinition def : changeDefinitions) {
def.postDelete(vo);
}
pointValueCache.deleteCache(vo);
getEventManager().cancelEventsForDataPoint(vo.getId());
return vo;
}
Aggregations