currently the only way I see is to always create new variables, as the methods to set values are protected in the SFSRoomVariable class.
If I have one variable I want to change and send here's what I'm doing:
Code: Select all
RoomVariable someVar = new SFSRoomVariable("someVar", 10, false, true, false);
List<RoomVariable> roomVariables = new ArrayList<RoomVariable>();
roomVariables.add(someVar);
getApi().setRoomVariables(null, getParentRoom(), roomVariables);
now, what happens when my room variables have things changed like ownership, isGlobal... I would have to re-create those flags whenever this variable changes right?
What I would like to do is this:
Code: Select all
Room room = getParentRoom();
RoomVariable someVar = room.setRoomVariable("someVar", 10);
//here I could change some permissons
//someVar.setOwner...
getApi().setRoomVariables(null, room, room.getRoomVariables());
Is that possible to do? It doesn't seem like it.