Package com.serotonin.m2m2.vo

Examples of com.serotonin.m2m2.vo.DataPointVO.validate()


            importContext.getReader().readInto(report, reportJson);

            // Now validate it. Use a new response object so we can distinguish errors in this user from other
            // errors.
            ProcessResult reportResponse = new ProcessResult();
            report.validate(reportResponse);
            if (reportResponse.getHasMessages())
                // Too bad. Copy the errors into the actual response.
                importContext.copyValidationMessages(reportResponse, "emport.report.prefix", xid);
            else {
                // Sweet. Save it.
View Full Code Here


    ds.setEnabled(true);
    ds.setUpdatePeriods(5);
    ds.setUpdatePeriodType(TimePeriods.SECONDS);
   
    ProcessResult response = new ProcessResult();
    ds.validate(response);
    if(!response.getHasMessages())
      Common.runtimeManager.saveDataSource(ds);
    else
      throw new RuntimeException("Invalid data!");
   
View Full Code Here

            dp.setPointLocator(pointLocator);
      dp.setEnabled(true);
      dp.setSettable(true);
      dp.setDefaultCacheSize(0);     
     
      dp.validate(response);
      if(!response.getHasMessages())
        Common.runtimeManager.saveDataPoint(dp);
      else
        throw new RuntimeException("Invalid 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.