Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (Property property : this.getProperties().values()) {
- ValueCollection propParam = new ValueCollection();
- PropertyDefinition propertyDefinition = property.getPropertyDefinition();
- propParam.put("name", new StringPrimitive(propertyDefinition.getName()));
- propParam.put("type", new StringPrimitive(propertyDefinition.getBaseType().name()));
- propParam.put("defaultValue", propertyDefinition.getDefaultValue());
- propParam.put("readOnly", new BooleanPrimitive(propertyDefinition.isReadOnly()));
- propParam.put("persistent", new BooleanPrimitive(propertyDefinition.isPersistent()));
- propParam.put("logged", new BooleanPrimitive(propertyDefinition.isLogged()));
- propParam.put("dataChangeType", new StringPrimitive(propertyDefinition.getDataChangeType().name()));
- propParam.put("dataChangeThreshold", new NumberPrimitive(propertyDefinition.getDataChangeThreshold()));
- propParam.put("remote", new BooleanPrimitive(true));
- propParam.put("remotePropertyName", new StringPrimitive(propertyDefinition.getName()));
- client.invokeService(Things, name, "AddPropertyDefinition", propParam, 1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement