Examples of PrivacyRule


Examples of rocks.xmpp.extensions.privacy.model.PrivacyRule

        Assert.assertEquals(xml, "<iq from=\"romeo@example.net/orchard\" id=\"getlist1\" type=\"get\"><query xmlns=\"jabber:iq:privacy\"><default></default></query></iq>");
    }

    @Test
    public void marshalPrivacyRule() throws XMLStreamException, JAXBException {
        PrivacyList privacyList = new PrivacyList("test", Arrays.asList(new PrivacyRule(PrivacyRule.Action.ALLOW, 0, Contact.Subscription.BOTH)));
        String xml = marshal(new Privacy(privacyList));
        Assert.assertEquals(xml, "<query xmlns=\"jabber:iq:privacy\"><list name=\"test\"><item type=\"subscription\" value=\"both\" action=\"allow\" order=\"0\"></item></list></query>");
    }
View Full Code Here

Examples of rocks.xmpp.extensions.privacy.model.PrivacyRule

    }

    @Test
    public void testComparePrivacyRules() {

        PrivacyRule privacyRule1 = new PrivacyRule(PrivacyRule.Action.DENY, 0);
        PrivacyRule privacyRule2 = new PrivacyRule(PrivacyRule.Action.DENY, 1);
        PrivacyRule privacyRule3 = new PrivacyRule(PrivacyRule.Action.DENY, 2);
        PrivacyRule privacyRule4 = new PrivacyRule(PrivacyRule.Action.DENY, 3);
        PrivacyRule privacyRule5 = new PrivacyRule(PrivacyRule.Action.DENY, 4);


        List<PrivacyRule> list = new ArrayList<>();
        list.add(privacyRule1);
        list.add(privacyRule2);
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.