示例#1
0
 protected String getProperty(Node node, String key) {
   NodeManager properties = node.getCloud().getNodeManager("properties");
   Function get = properties.getFunction("get");
   Parameters params = get.createParameters();
   params.set("node", node);
   params.set("key", key);
   return (String) get.getFunctionValue(params);
 }
示例#2
0
 protected void setProperty(Node node, String key, String value) {
   NodeManager properties = node.getCloud().getNodeManager("properties");
   Function set = properties.getFunction("set");
   Parameters params = set.createParameters();
   params.set("node", node);
   params.set("key", key);
   if (value.length() > 255) {
     value = value.substring(0, 255);
   }
   params.set("value", value);
   set.getFunctionValue(params);
 }