SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for (Property property : this.getProperties().values()) {
  2.                 ValueCollection propParam = new ValueCollection();
  3.                 PropertyDefinition propertyDefinition = property.getPropertyDefinition();
  4.  
  5.                 propParam.put("name", new StringPrimitive(propertyDefinition.getName()));
  6.                 propParam.put("type", new StringPrimitive(propertyDefinition.getBaseType().name()));
  7.                 propParam.put("defaultValue", propertyDefinition.getDefaultValue());
  8.                 propParam.put("readOnly", new BooleanPrimitive(propertyDefinition.isReadOnly()));
  9.                 propParam.put("persistent", new BooleanPrimitive(propertyDefinition.isPersistent()));
  10.                 propParam.put("logged", new BooleanPrimitive(propertyDefinition.isLogged()));
  11.                 propParam.put("dataChangeType", new StringPrimitive(propertyDefinition.getDataChangeType().name()));
  12.                 propParam.put("dataChangeThreshold", new NumberPrimitive(propertyDefinition.getDataChangeThreshold()));
  13.                 propParam.put("remote", new BooleanPrimitive(true));
  14.                 propParam.put("remotePropertyName", new StringPrimitive(propertyDefinition.getName()));
  15.  
  16.                 client.invokeService(Things, name, "AddPropertyDefinition", propParam, 1000);
  17.                
  18.             }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top