Package rocks.xmpp.extensions.data.model

Examples of rocks.xmpp.extensions.data.model.DataForm.findField()


        Assert.assertEquals(fieldPubsub.getValues().size(), 1);
        Assert.assertEquals(fieldPubsub.getValues().get(0), "http://test");
        Assert.assertEquals(roomConfigurationForm.getPubSubNode(), URI.create("http://test"));

        roomConfigurationForm.setMaxOccupants(30);
        DataForm.Field fieldMaxOccupants = dataForm.findField("muc#roomconfig_maxusers");
        Assert.assertNotNull(fieldMaxOccupants);
        Assert.assertEquals(fieldMaxOccupants.getValues().size(), 1);
        Assert.assertEquals(fieldMaxOccupants.getValues().get(0), "30");
        Assert.assertEquals(roomConfigurationForm.getMaxOccupants(), 30);
View Full Code Here


        Assert.assertEquals(fieldMaxOccupants.getValues().size(), 1);
        Assert.assertEquals(fieldMaxOccupants.getValues().get(0), "30");
        Assert.assertEquals(roomConfigurationForm.getMaxOccupants(), 30);

        roomConfigurationForm.setMembersOnly(true);
        DataForm.Field fieldMembersOnly = dataForm.findField("muc#roomconfig_membersonly");
        Assert.assertNotNull(fieldMembersOnly);
        Assert.assertEquals(fieldMembersOnly.getValues().size(), 1);
        Assert.assertEquals(fieldMembersOnly.getValues().get(0), "1");
        Assert.assertTrue(roomConfigurationForm.isMembersOnly());
View Full Code Here

        Assert.assertEquals(fieldMembersOnly.getValues().size(), 1);
        Assert.assertEquals(fieldMembersOnly.getValues().get(0), "1");
        Assert.assertTrue(roomConfigurationForm.isMembersOnly());

        roomConfigurationForm.setModerated(true);
        DataForm.Field fieldModerated = dataForm.findField("muc#roomconfig_moderatedroom");
        Assert.assertNotNull(fieldModerated);
        Assert.assertEquals(fieldModerated.getValues().size(), 1);
        Assert.assertEquals(fieldModerated.getValues().get(0), "1");
        Assert.assertTrue(roomConfigurationForm.isMembersOnly());
View Full Code Here

        Assert.assertEquals(fieldModerated.getValues().size(), 1);
        Assert.assertEquals(fieldModerated.getValues().get(0), "1");
        Assert.assertTrue(roomConfigurationForm.isMembersOnly());

        roomConfigurationForm.setPasswordProtected(true);
        DataForm.Field fieldPasswordProtected = dataForm.findField("muc#roomconfig_passwordprotectedroom");
        Assert.assertNotNull(fieldPasswordProtected);
        Assert.assertEquals(fieldPasswordProtected.getValues().size(), 1);
        Assert.assertEquals(fieldPasswordProtected.getValues().get(0), "1");
        Assert.assertTrue(roomConfigurationForm.isPasswordProtected());
View Full Code Here

        Assert.assertEquals(fieldPasswordProtected.getValues().size(), 1);
        Assert.assertEquals(fieldPasswordProtected.getValues().get(0), "1");
        Assert.assertTrue(roomConfigurationForm.isPasswordProtected());

        roomConfigurationForm.setPersistentRoom(true);
        DataForm.Field fieldPersistentRoom = dataForm.findField("muc#roomconfig_persistentroom");
        Assert.assertNotNull(fieldPersistentRoom);
        Assert.assertEquals(fieldPersistentRoom.getValues().size(), 1);
        Assert.assertEquals(fieldPersistentRoom.getValues().get(0), "1");
        Assert.assertTrue(roomConfigurationForm.isPersistentRoom());
View Full Code Here

        Assert.assertEquals(fieldPersistentRoom.getValues().size(), 1);
        Assert.assertEquals(fieldPersistentRoom.getValues().get(0), "1");
        Assert.assertTrue(roomConfigurationForm.isPersistentRoom());

        roomConfigurationForm.setRolesForWhichPresenceIsBroadcast(EnumSet.of(Role.MODERATOR, Role.PARTICIPANT));
        DataForm.Field fieldPresenceBroadcast = dataForm.findField("muc#roomconfig_presencebroadcast");
        Assert.assertNotNull(fieldPresenceBroadcast);
        Assert.assertEquals(fieldPresenceBroadcast.getValues().size(), 2);
        Assert.assertEquals(fieldPresenceBroadcast.getValues().get(0), "moderator");
        Assert.assertEquals(fieldPresenceBroadcast.getValues().get(1), "participant");
        Assert.assertEquals(roomConfigurationForm.getRolesForWhichPresenceIsBroadcast(), EnumSet.of(Role.MODERATOR, Role.PARTICIPANT));
View Full Code Here

        Assert.assertEquals(fieldPresenceBroadcast.getValues().get(0), "moderator");
        Assert.assertEquals(fieldPresenceBroadcast.getValues().get(1), "participant");
        Assert.assertEquals(roomConfigurationForm.getRolesForWhichPresenceIsBroadcast(), EnumSet.of(Role.MODERATOR, Role.PARTICIPANT));

        roomConfigurationForm.setPublicRoom(true);
        DataForm.Field fieldPublicRoom = dataForm.findField("muc#roomconfig_publicroom");
        Assert.assertNotNull(fieldPublicRoom);
        Assert.assertEquals(fieldPublicRoom.getValues().size(), 1);
        Assert.assertEquals(fieldPublicRoom.getValues().get(0), "1");
        Assert.assertTrue(roomConfigurationForm.isPublicRoom());
View Full Code Here

        Assert.assertEquals(fieldPublicRoom.getValues().size(), 1);
        Assert.assertEquals(fieldPublicRoom.getValues().get(0), "1");
        Assert.assertTrue(roomConfigurationForm.isPublicRoom());

        roomConfigurationForm.setAdministrators(Arrays.asList(Jid.valueOf("test1@domain"), Jid.valueOf("test2@domain")));
        DataForm.Field fieldAdministrators = dataForm.findField("muc#roomconfig_roomadmins");
        Assert.assertNotNull(fieldAdministrators);
        Assert.assertEquals(fieldAdministrators.getValues().size(), 2);
        Assert.assertEquals(fieldAdministrators.getValues().get(0), "test1@domain");
        Assert.assertEquals(fieldAdministrators.getValues().get(1), "test2@domain");
        Assert.assertEquals(roomConfigurationForm.getAdministrators(), Arrays.asList(Jid.valueOf("test1@domain"), Jid.valueOf("test2@domain")));
View Full Code Here

        Assert.assertEquals(fieldAdministrators.getValues().get(0), "test1@domain");
        Assert.assertEquals(fieldAdministrators.getValues().get(1), "test2@domain");
        Assert.assertEquals(roomConfigurationForm.getAdministrators(), Arrays.asList(Jid.valueOf("test1@domain"), Jid.valueOf("test2@domain")));

        roomConfigurationForm.setRoomDescription("Desc");
        DataForm.Field fieldDesc = dataForm.findField("muc#roomconfig_roomdesc");
        Assert.assertNotNull(fieldDesc);
        Assert.assertEquals(fieldDesc.getValues().size(), 1);
        Assert.assertEquals(fieldDesc.getValues().get(0), "Desc");
        Assert.assertEquals(roomConfigurationForm.getRoomDescription(), "Desc");
View Full Code Here

        Assert.assertEquals(fieldDesc.getValues().size(), 1);
        Assert.assertEquals(fieldDesc.getValues().get(0), "Desc");
        Assert.assertEquals(roomConfigurationForm.getRoomDescription(), "Desc");

        roomConfigurationForm.setRoomName("Name");
        DataForm.Field fieldRoomName = dataForm.findField("muc#roomconfig_roomname");
        Assert.assertNotNull(fieldRoomName);
        Assert.assertEquals(fieldRoomName.getValues().size(), 1);
        Assert.assertEquals(fieldRoomName.getValues().get(0), "Name");
        Assert.assertEquals(roomConfigurationForm.getRoomName(), "Name");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.