Search in sources :

Example 1 with MUCLightGetAffiliationsIQ

use of org.jivesoftware.smackx.muclight.element.MUCLightGetAffiliationsIQ in project Smack by igniterealtime.

the class MultiUserChatLight method getAffiliations.

/**
     * Get the MUC Light affiliations.
     * 
     * @param version
     * @return the room affiliations
     * @throws NoResponseException
     * @throws XMPPErrorException
     * @throws NotConnectedException
     * @throws InterruptedException
     */
public HashMap<Jid, MUCLightAffiliation> getAffiliations(String version) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
    MUCLightGetAffiliationsIQ mucLightGetAffiliationsIQ = new MUCLightGetAffiliationsIQ(room, version);
    IQ responseIq = connection.createStanzaCollectorAndSend(mucLightGetAffiliationsIQ).nextResultOrThrow();
    MUCLightAffiliationsIQ mucLightAffiliationsIQ = (MUCLightAffiliationsIQ) responseIq;
    return mucLightAffiliationsIQ.getAffiliations();
}
Also used : MUCLightAffiliationsIQ(org.jivesoftware.smackx.muclight.element.MUCLightAffiliationsIQ) MUCLightGetAffiliationsIQ(org.jivesoftware.smackx.muclight.element.MUCLightGetAffiliationsIQ) MUCLightDestroyIQ(org.jivesoftware.smackx.muclight.element.MUCLightDestroyIQ) MUCLightChangeAffiliationsIQ(org.jivesoftware.smackx.muclight.element.MUCLightChangeAffiliationsIQ) MUCLightConfigurationIQ(org.jivesoftware.smackx.muclight.element.MUCLightConfigurationIQ) MUCLightInfoIQ(org.jivesoftware.smackx.muclight.element.MUCLightInfoIQ) MUCLightGetAffiliationsIQ(org.jivesoftware.smackx.muclight.element.MUCLightGetAffiliationsIQ) MUCLightGetConfigsIQ(org.jivesoftware.smackx.muclight.element.MUCLightGetConfigsIQ) MUCLightCreateIQ(org.jivesoftware.smackx.muclight.element.MUCLightCreateIQ) MUCLightAffiliationsIQ(org.jivesoftware.smackx.muclight.element.MUCLightAffiliationsIQ) MUCLightSetConfigsIQ(org.jivesoftware.smackx.muclight.element.MUCLightSetConfigsIQ) MUCLightGetInfoIQ(org.jivesoftware.smackx.muclight.element.MUCLightGetInfoIQ) IQ(org.jivesoftware.smack.packet.IQ)

Example 2 with MUCLightGetAffiliationsIQ

use of org.jivesoftware.smackx.muclight.element.MUCLightGetAffiliationsIQ in project Smack by igniterealtime.

the class MUCLightGetAffiliationsTest method checkGetAffiliationsIQ.

@Test
public void checkGetAffiliationsIQ() throws Exception {
    MUCLightGetAffiliationsIQ mucLightGetAffiliationsIQ = new MUCLightGetAffiliationsIQ(JidCreate.from("coven@muclight.shakespeare.lit"), "abcdefg");
    mucLightGetAffiliationsIQ.setStanzaId("getmembers");
    Assert.assertEquals(getAffiliationsIQExample, mucLightGetAffiliationsIQ.toXML().toString());
}
Also used : MUCLightGetAffiliationsIQ(org.jivesoftware.smackx.muclight.element.MUCLightGetAffiliationsIQ) Test(org.junit.Test)

Aggregations

MUCLightGetAffiliationsIQ (org.jivesoftware.smackx.muclight.element.MUCLightGetAffiliationsIQ)2 IQ (org.jivesoftware.smack.packet.IQ)1 MUCLightAffiliationsIQ (org.jivesoftware.smackx.muclight.element.MUCLightAffiliationsIQ)1 MUCLightChangeAffiliationsIQ (org.jivesoftware.smackx.muclight.element.MUCLightChangeAffiliationsIQ)1 MUCLightConfigurationIQ (org.jivesoftware.smackx.muclight.element.MUCLightConfigurationIQ)1 MUCLightCreateIQ (org.jivesoftware.smackx.muclight.element.MUCLightCreateIQ)1 MUCLightDestroyIQ (org.jivesoftware.smackx.muclight.element.MUCLightDestroyIQ)1 MUCLightGetConfigsIQ (org.jivesoftware.smackx.muclight.element.MUCLightGetConfigsIQ)1 MUCLightGetInfoIQ (org.jivesoftware.smackx.muclight.element.MUCLightGetInfoIQ)1 MUCLightInfoIQ (org.jivesoftware.smackx.muclight.element.MUCLightInfoIQ)1 MUCLightSetConfigsIQ (org.jivesoftware.smackx.muclight.element.MUCLightSetConfigsIQ)1 Test (org.junit.Test)1