Search in sources :

Example 6 with TimePeriod

use of com.infiniteautomation.mango.rest.latest.model.time.TimePeriod in project ma-modules-public by infiniteautomation.

the class AbstractPollingDataSourceModel method fromVO.

@Override
public void fromVO(T vo) {
    super.fromVO(vo);
    this.pollPeriod = new TimePeriod(vo.getUpdatePeriods(), TimePeriodType.convertTo(vo.getUpdatePeriodType()));
    quantize = vo.isQuantize();
    useCron = vo.isUseCron();
    cronPattern = vo.getCronPattern();
}
Also used : TimePeriod(com.infiniteautomation.mango.rest.latest.model.time.TimePeriod)

Example 7 with TimePeriod

use of com.infiniteautomation.mango.rest.latest.model.time.TimePeriod in project ma-modules-public by infiniteautomation.

the class PurgeSettings method fromVO.

public void fromVO(DataSourceVO vo) {
    this.override = vo.isPurgeOverride();
    this.frequency = new TimePeriod(vo.getPurgePeriod(), TimePeriodType.convertTo(vo.getPurgeType()));
}
Also used : TimePeriod(com.infiniteautomation.mango.rest.latest.model.time.TimePeriod)

Example 8 with TimePeriod

use of com.infiniteautomation.mango.rest.latest.model.time.TimePeriod in project ma-modules-public by infiniteautomation.

the class RateOfChangeEventDetectorModel method fromVO.

@Override
public void fromVO(RateOfChangeDetectorVO vo) {
    super.fromVO(vo);
    this.rateOfChangeThreshold = vo.getRateOfChangeThreshold();
    this.rateOfChangeThresholdUnit = TimePeriodType.convertTo(vo.getRateOfChangeThresholdPeriodType());
    this.useResetThreshold = vo.isUseResetThreshold();
    this.resetThreshold = vo.getResetThreshold();
    this.comparisonMode = vo.getComparisonMode();
    this.calculationMode = vo.getCalculationMode();
    this.rateOfChangePeriod = new TimePeriod(vo.getRateOfChangePeriods(), TimePeriodType.convertTo(vo.getRateOfChangePeriodType()));
    this.useAbsoluteValue = vo.isUseAbsoluteValue();
}
Also used : TimePeriod(com.infiniteautomation.mango.rest.latest.model.time.TimePeriod)

Example 9 with TimePeriod

use of com.infiniteautomation.mango.rest.latest.model.time.TimePeriod in project ma-modules-public by infiniteautomation.

the class TimeoutDetectorModel method fromVO.

@Override
public void fromVO(T vo) {
    super.fromVO(vo);
    this.duration = new TimePeriod(vo.getDuration(), TimePeriodType.convertTo(vo.getDurationType()));
}
Also used : TimePeriod(com.infiniteautomation.mango.rest.latest.model.time.TimePeriod)

Aggregations

TimePeriod (com.infiniteautomation.mango.rest.latest.model.time.TimePeriod)9 ZonedDateTimeRangeQueryInfo (com.infiniteautomation.mango.rest.latest.model.pointValue.query.ZonedDateTimeRangeQueryInfo)3 ApiOperation (io.swagger.annotations.ApiOperation)3 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)3 EventTypeAlarmLevelModel (com.infiniteautomation.mango.rest.latest.model.datasource.EventTypeAlarmLevelModel)1 MangoPermissionModel (com.infiniteautomation.mango.rest.latest.model.permissions.MangoPermissionModel)1 PermissionService (com.infiniteautomation.mango.spring.service.PermissionService)1 TranslatableMessage (com.serotonin.m2m2.i18n.TranslatableMessage)1 PublisherEventType (com.serotonin.m2m2.rt.event.type.PublisherEventType)1 ExportCodes (com.serotonin.m2m2.util.ExportCodes)1 EventTypeVO (com.serotonin.m2m2.vo.event.EventTypeVO)1 Role (com.serotonin.m2m2.vo.role.Role)1 Date (java.util.Date)1