Example usage for org.joda.time LocalDateTime LocalDateTime

List of usage examples for org.joda.time LocalDateTime LocalDateTime

Introduction

In this page you can find the example usage for org.joda.time LocalDateTime LocalDateTime.

Prototype

public LocalDateTime() 

Source Link

Document

Constructs an instance set to the current local time evaluated using ISO chronology in the default zone.

Usage

From source file:de.avanux.smartapplianceenabler.appliance.Appliance.java

License:Open Source License

@Override
public void finishedCurrentDetected() {
    logger.debug("Deactivating timeframe interval until starting current is detected again: runningTimeMonitor="
            + (runningTimeMonitor != null ? "not null" : "null"));
    if (runningTimeMonitor != null) {
        runningTimeMonitor.activateTimeframeInterval(new LocalDateTime(), (TimeframeInterval) null);
    }//www  . ja  v  a 2 s . c o  m
}

From source file:de.avanux.smartapplianceenabler.appliance.RunningTimeMonitor.java

License:Open Source License

public void setRunning(boolean running) {
    setRunning(running, new LocalDateTime());
}

From source file:de.avanux.smartapplianceenabler.appliance.RunningTimeMonitor.java

License:Open Source License

public int getRemainingMinRunningTimeOfCurrentTimeFrame() {
    return getRemainingMinRunningTimeOfCurrentTimeFrame(new LocalDateTime());
}

From source file:de.avanux.smartapplianceenabler.appliance.RunningTimeMonitor.java

License:Open Source License

public int getRemainingMaxRunningTimeOfCurrentTimeFrame() {
    return getRemainingMaxRunningTimeOfCurrentTimeFrame(new LocalDateTime());
}

From source file:de.avanux.smartapplianceenabler.appliance.RunningTimeMonitor.java

License:Open Source License

/**
 * Returns the active timeframe interval.
 * @return/*from ww  w  .  j  a v  a2  s.c o m*/
 */
public TimeframeInterval getActiveTimeframeInterval() {
    update(new LocalDateTime());
    return activeTimeframeInterval;
}

From source file:de.avanux.smartapplianceenabler.appliance.StartingCurrentSwitch.java

License:Open Source License

@Override
public boolean on(boolean switchOn) {
    logger.debug("Setting appliance switch to " + (switchOn ? "on" : "off"));
    on = switchOn;/*from w ww  .j a  va2  s.co  m*/
    if (switchOn) {
        applianceOn(true);
        switchOnTime = new LocalDateTime();
    }
    // don't switch off appliance - otherwise it cannot be operated
    return on;
}

From source file:de.avanux.smartapplianceenabler.appliance.StartingCurrentSwitch.java

License:Open Source License

/**
 * Returns true, if the minimum running time has been exceeded.
 *
 * @return//from w ww  .j  a v a2  s.  c  o m
 */
protected boolean isMinRunningTimeExceeded() {
    return switchOnTime.plusSeconds(minRunningTime).isBefore(new LocalDateTime());
}

From source file:de.avanux.smartapplianceenabler.appliance.TimeOfDayOfWeek.java

License:Open Source License

public LocalDateTime toLocalDateTime() {
    return toNextOccurrence(new LocalDateTime());
}

From source file:de.avanux.smartapplianceenabler.appliance.TimeOfDayOfWeek.java

License:Open Source License

public LocalDateTime toNextOccurrence() {
    return toNextOccurrence(new LocalDateTime());
}

From source file:de.avanux.smartapplianceenabler.semp.webservice.SempController.java

License:Open Source License

@RequestMapping(value = BASE_URL, method = RequestMethod.GET, produces = "application/xml")
@ResponseBody/*from   w w  w  . j  a v a 2s  .c o m*/
public String device2EM() {
    logger.debug("Device info/status/planning requested.");
    return marshall(createDevice2EM(new LocalDateTime()));
}