use of org.jivesoftware.smackx.muclight.element.MUCLightSetConfigsIQ in project Smack by igniterealtime.
the class MUCLightSetConfigsIQTest method checkChangeSubjectStanza.
@Test
public void checkChangeSubjectStanza() throws Exception {
MUCLightSetConfigsIQ mucLightChangeSubjectIQ = new MUCLightSetConfigsIQ(JidCreate.from("coven@muclight.shakespeare.lit"), null, "To be or not to be?", null);
mucLightChangeSubjectIQ.setStanzaId("subject1");
Assert.assertEquals(changeSubjectIQExample, mucLightChangeSubjectIQ.toXML().toString());
}
use of org.jivesoftware.smackx.muclight.element.MUCLightSetConfigsIQ in project Smack by igniterealtime.
the class MultiUserChatLight method changeRoomName.
/**
* Change the name of the room.
*
* @param roomName
* @throws NoResponseException
* @throws XMPPErrorException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void changeRoomName(String roomName) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
MUCLightSetConfigsIQ mucLightSetConfigIQ = new MUCLightSetConfigsIQ(room, roomName, null);
connection.createStanzaCollectorAndSend(mucLightSetConfigIQ).nextResultOrThrow();
}
use of org.jivesoftware.smackx.muclight.element.MUCLightSetConfigsIQ in project Smack by igniterealtime.
the class MUCLightSetConfigsIQTest method checkChangeRoomNameStanza.
@Test
public void checkChangeRoomNameStanza() throws Exception {
MUCLightSetConfigsIQ mucLightChangeRoomNameIQ = new MUCLightSetConfigsIQ(JidCreate.from("coven@muclight.shakespeare.lit"), "A Darker Cave", null);
mucLightChangeRoomNameIQ.setStanzaId("roomName1");
Assert.assertEquals(changeRoomNameIQExample, mucLightChangeRoomNameIQ.toXML().toString());
}
use of org.jivesoftware.smackx.muclight.element.MUCLightSetConfigsIQ in project Smack by igniterealtime.
the class MUCLightSetConfigsIQTest method checkSetConfigsStanza.
@Test
public void checkSetConfigsStanza() throws Exception {
HashMap<String, String> customConfigs = new HashMap<>();
customConfigs.put("color", "blue");
MUCLightSetConfigsIQ mucLightSetConfigsIQ = new MUCLightSetConfigsIQ(JidCreate.from("coven@muclight.shakespeare.lit"), "A Darker Cave", customConfigs);
mucLightSetConfigsIQ.setStanzaId("conf1");
Assert.assertEquals(setConfigsIQExample, mucLightSetConfigsIQ.toXML().toString());
}
use of org.jivesoftware.smackx.muclight.element.MUCLightSetConfigsIQ in project Smack by igniterealtime.
the class MultiUserChatLight method setRoomConfigs.
/**
* Set the room configurations.
*
* @param roomName
* @param customConfigs
* @throws NoResponseException
* @throws XMPPErrorException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void setRoomConfigs(String roomName, HashMap<String, String> customConfigs) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
MUCLightSetConfigsIQ mucLightSetConfigIQ = new MUCLightSetConfigsIQ(room, roomName, customConfigs);
connection.createStanzaCollectorAndSend(mucLightSetConfigIQ).nextResultOrThrow();
}
Aggregations