Search in sources :

Example 1 with MUCLightSetConfigsIQ

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());
}
Also used : MUCLightSetConfigsIQ(org.jivesoftware.smackx.muclight.element.MUCLightSetConfigsIQ) Test(org.junit.Test)

Example 2 with MUCLightSetConfigsIQ

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();
}
Also used : MUCLightSetConfigsIQ(org.jivesoftware.smackx.muclight.element.MUCLightSetConfigsIQ)

Example 3 with MUCLightSetConfigsIQ

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());
}
Also used : MUCLightSetConfigsIQ(org.jivesoftware.smackx.muclight.element.MUCLightSetConfigsIQ) Test(org.junit.Test)

Example 4 with MUCLightSetConfigsIQ

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());
}
Also used : HashMap(java.util.HashMap) MUCLightSetConfigsIQ(org.jivesoftware.smackx.muclight.element.MUCLightSetConfigsIQ) Test(org.junit.Test)

Example 5 with MUCLightSetConfigsIQ

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();
}
Also used : MUCLightSetConfigsIQ(org.jivesoftware.smackx.muclight.element.MUCLightSetConfigsIQ)

Aggregations

MUCLightSetConfigsIQ (org.jivesoftware.smackx.muclight.element.MUCLightSetConfigsIQ)6 Test (org.junit.Test)3 HashMap (java.util.HashMap)1