Search in sources :

Example 31 with DataPointDao

use of com.serotonin.m2m2.db.dao.DataPointDao in project ma-core-public by infiniteautomation.

the class DeltamationCommon method parsePoint.

public static int parsePoint(JsonObject jsonObject, String name) throws TranslatableJsonException {
    DataPointDao points = DataPointDao.instance;
    String xid = jsonObject.getString(name);
    Integer dpid = points.getIdByXid(xid);
    if (dpid == null) {
        throw new TranslatableJsonException("validate.pointMissing", name, xid);
    }
    return dpid;
}
Also used : DataPointDao(com.serotonin.m2m2.db.dao.DataPointDao) TranslatableJsonException(com.serotonin.m2m2.i18n.TranslatableJsonException)

Aggregations

DataPointDao (com.serotonin.m2m2.db.dao.DataPointDao)31 DataPointVO (com.serotonin.m2m2.vo.DataPointVO)21 JsonArray (com.serotonin.json.type.JsonArray)8 TranslatableJsonException (com.serotonin.m2m2.i18n.TranslatableJsonException)8 User (com.serotonin.m2m2.vo.User)8 JsonObject (com.serotonin.json.type.JsonObject)6 TranslatableMessage (com.serotonin.m2m2.i18n.TranslatableMessage)6 ArrayList (java.util.ArrayList)6 JsonValue (com.serotonin.json.type.JsonValue)5 PointValueTime (com.serotonin.m2m2.rt.dataImage.PointValueTime)5 HashMap (java.util.HashMap)5 IntStringPair (com.serotonin.db.pair.IntStringPair)4 JsonString (com.serotonin.json.type.JsonString)4 DwrPermission (com.serotonin.m2m2.web.dwr.util.DwrPermission)4 InvalidArgumentException (com.serotonin.InvalidArgumentException)3 PointValueDao (com.serotonin.m2m2.db.dao.PointValueDao)3 ProcessResult (com.serotonin.m2m2.i18n.ProcessResult)3 ReportPointVO (com.serotonin.m2m2.reports.vo.ReportPointVO)3 AnnotatedPointValueTime (com.serotonin.m2m2.rt.dataImage.AnnotatedPointValueTime)3 DataPointSummary (com.serotonin.m2m2.vo.DataPointSummary)3