Skip to content

Commit 16817cd

Browse files
authored
0.49.2
Fix action parameter metadata bug. Move DSISetAction to action package.
1 parent 6a76280 commit 16817cd

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ subprojects {
55
apply plugin: 'maven'
66

77
group 'org.iot-dsa'
8-
version '0.49.1'
8+
version '0.49.2'
99

1010
sourceCompatibility = 1.8
1111
targetCompatibility = 1.8

dslink-v2/src/main/java/org/iot/dsa/node/DSInfo.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import java.util.Iterator;
55
import org.iot.dsa.dslink.responder.ApiObject;
66
import org.iot.dsa.node.action.DSAction;
7+
import org.iot.dsa.node.action.DSISetAction;
78
import org.iot.dsa.util.DSUtil;
89

910
/**

dslink-v2/src/main/java/org/iot/dsa/node/DSNode.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.iot.dsa.node.action.ActionInvocation;
1111
import org.iot.dsa.node.action.ActionResult;
1212
import org.iot.dsa.node.action.DSAction;
13+
import org.iot.dsa.node.action.DSISetAction;
1314
import org.iot.dsa.node.action.DeleteAction;
1415
import org.iot.dsa.node.action.DuplicateAction;
1516
import org.iot.dsa.node.action.RenameAction;

dslink-v2/src/main/java/org/iot/dsa/node/action/DSAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public DSMetadata addParameter(String name, DSIValue value, String description)
159159
}
160160
DSMetadata ret = new DSMetadata();
161161
if (value instanceof DSIMetadata) {
162-
((DSIMetadata) ret).getMetadata(ret.getMap());
162+
((DSIMetadata) value).getMetadata(ret.getMap());
163163
}
164164
ret.setName(name)
165165
.setType(value)

dslink-v2/src/main/java/org/iot/dsa/node/DSISetAction.java renamed to dslink-v2/src/main/java/org/iot/dsa/node/action/DSISetAction.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
package org.iot.dsa.node;
1+
package org.iot.dsa.node.action;
22

3-
import org.iot.dsa.node.action.DSAction;
3+
import org.iot.dsa.node.DSIValue;
44

55
/**
6-
* Only for use on DSIValues. Replaces protocol write/set with a virtual action and the value
7-
* will be marked readonly in the protocol. If the info of the value is marked readonly,
8-
* this action will not be available.
6+
* If setting a value is more complex than one of the primitive editors, this can be used
7+
* to create a custom set action. Only for use on DSIValues. Replaces protocol level write/set
8+
* with a virtual action and the value will be marked readonly in the protocol. If the info of
9+
* the value is marked readonly, this action will not be available.
910
*
1011
* @author Aaron Hansen
1112
*/
@@ -33,7 +34,7 @@ public interface DSISetAction extends DSIValue {
3334
* The name for the set action, "set" by default.
3435
*/
3536
public default String getSetActionName() {
36-
return "Set";
37+
return SET;
3738
}
3839

3940
}

dslink-v2/src/main/java/org/iot/dsa/time/DSTimezone.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import java.util.TimeZone;
77
import org.iot.dsa.node.DSElement;
88
import org.iot.dsa.node.DSFlexEnum;
9-
import org.iot.dsa.node.DSISetAction;
9+
import org.iot.dsa.node.action.DSISetAction;
1010
import org.iot.dsa.node.DSInfo;
1111
import org.iot.dsa.node.DSList;
1212
import org.iot.dsa.node.DSMap;

0 commit comments

Comments
 (0)