Examples of IDevice


Examples of fr.soleil.salsa.entity.IDevice

     * @throws SalsaException
     *             throws when a userDevice is not contain in this configuration
     */
    protected void setDeviceEnable(final String userDevice, final List<? extends IDevice> deviceList, boolean enable) {
        // System.out.println("setDeviceEnable=" + userDevice + " =" + enable);
        IDevice device = getDevice(userDevice, deviceList);
        if (device != null) {
            device.setEnabled(enable);
        }
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IDevice

        }
    }

    protected boolean isDeviceEnable(final String userDevice, final List<? extends IDevice> deviceList) {
        boolean enabled = false;
        IDevice device = getDevice(userDevice, deviceList);
        if (device != null) {
            enabled = device.isEnabled();
        }
        return enabled;
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IDevice

        for (final IDevice device : deviceList) {
            device.setEnabled(false);
        }

        if (userDeviceList != null) {
            IDevice device = null;
            for (final String deviceName : userDeviceList) {
                device = getDevice(deviceName, deviceList);
                if (device == null) {
                    throw new SalsaException(deviceName + " is a not valid " + name);
                } else {
                    device.setEnabled(true);
                }
            }
        }
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IDevice

    public void deleteActuator(String actuatorName) {
        List<IDimension> dimensionList = getDimensionList();

        if ((dimensionList != null) && !dimensionList.isEmpty()) {
            List<IActuator> tmpActuatorList = null;
            IDevice actuator = null;
            for (IDimension dimension : dimensionList) {
                tmpActuatorList = dimension.getActuatorsList();
                actuator = getDevice(actuatorName, tmpActuatorList);
                if (actuator != null) {
                    int index = tmpActuatorList.indexOf(actuator);
View Full Code Here

Examples of fr.soleil.salsa.entity.IDevice

        }
    }

    @Override
    public void deleteSensor(String sensorName) {
        IDevice sensor = getDevice(sensorName, sensorsList);
        if (sensor != null) {
            sensorsList.remove(sensor);
        }
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IDevice

        }
    }

    @Override
    public void deleteTimeBase(String timebaseName) {
        IDevice timebase = getDevice(timebaseName, timebaseList);
        if (timebase != null) {
            timebaseList.remove(timebase);
        }
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IDevice

    @Override
    public void renameActuator(String oldActuatorName, String newActuatorName) {
        List<IDimension> dimensionList = getDimensionList();
        if ((dimensionList != null) && !dimensionList.isEmpty()) {
            List<IActuator> tmpActuatorList = null;
            IDevice actuator = null;
            for (IDimension dimension : dimensionList) {
                tmpActuatorList = dimension.getActuatorsList();
                actuator = getDevice(oldActuatorName, tmpActuatorList);
                if (actuator != null) {
                    actuator.setName(newActuatorName);
                    setDimension(dimension);
                    break;
                }
            }
        }
View Full Code Here

Examples of fr.soleil.salsa.entity.IDevice

        }
    }

    @Override
    public void renameSensor(String oldSensorName, String newSensorName) {
        IDevice sensor = getDevice(oldSensorName, sensorsList);
        if (sensor != null) {
            sensor.setName(newSensorName);
        }
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IDevice

        }
    }

    @Override
    public void renameTimeBase(String oldTimeBaseName, String newTimeBaseName) {
        IDevice timebase = getDevice(oldTimeBaseName, timebaseList);
        if (timebase != null) {
            timebase.setName(newTimeBaseName);
        }
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IDevice

        this.forcedSaving = forcedSaving;

    }

    public IDevice getDevice(final String deviceName, List<? extends IDevice> deviceList) {
        IDevice device = null;
        if ((deviceName != null) && (deviceList != null)) {
            for (IDevice tmpDevice : deviceList) {
                if (tmpDevice.getName().equalsIgnoreCase(deviceName)) {
                    device = tmpDevice;
                    break;
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.