APISonar


org.eclipse.smarthome.binding.digitalstrom.internal.lib.serverconnection.simpledsrequestbuilder.constants.InterfaceKeys.JSON

> org > eclipse > smarthome > binding > digitalstrom > internal > lib > serverconnection > simpledsrequestbuilder > constants > InterfaceKeys > JSON
org APIs eclipse APIs smarthome APIs binding APIs digitalstrom APIs internal APIs lib APIs serverconnection APIs simpledsrequestbuilder APIs constants APIs InterfaceKeys APIs JSON APIs

Example 1
public static SimpleRequestBuilder buildNewJsonRequest(String requestClassKey)
            throws NullArgumentException, IllegalArgumentException {
        return buildNewRequest(InterfaceKeys.JSON).addRequestClass(requestClassKey);
    }
Example 2
public boolean clearZoneSensorSource(String sessionToken, Integer zoneID, String zoneName, SensorEnum sensorType) {
        if (checkRequiredZone(zoneID, zoneName)) {
            String response = transport.execute(SimpleRequestBuilder.buildNewRequest(InterfaceKeys.JSON)
                    .addRequestClass(ClassKeys.ZONE).addFunction(FunctionKeys.SET_TEMEPERATURE_CONTROL_VALUE)
                    .addDefaultZoneParameter(sessionToken, zoneID, zoneName)
                    .addParameter(ParameterKeys.SENSOR_TYPE, sensorType.getSensorType().toString())
                    .buildRequestString());

            return JSONResponseHandler.checkResponse(JSONResponseHandler.toJsonObject(response));
        }
        return false;
    }
Example 3
public boolean setDeviceOutputValue(String token, DSID dSID, String dSUID, String name, Short offset,
            Integer value) {
        if (checkRequiredDevice(dSID, dSUID, name) && SimpleRequestBuilder.objectToString(offset) != null
                && SimpleRequestBuilder.objectToString(value) != null) {
            String response = transport.execute(SimpleRequestBuilder.buildNewRequest(InterfaceKeys.JSON)
                    .addRequestClass(ClassKeys.DEVICE).addFunction(FunctionKeys.SET_OUTPUT_VALUE)
                    .addDefaultDeviceParameter(token, dSID, dSUID, name)
                    .addParameter(ParameterKeys.OFFSET, SimpleRequestBuilder.objectToString(offset))
                    .addParameter(ParameterKeys.VALUE, SimpleRequestBuilder.objectToString(value))
                    .buildRequestString());
            return JSONResponseHandler.checkResponse(JSONResponseHandler.toJsonObject(response));
        }
        return false;
    }