Package org.apache.vysper.xmpp.modules.servicediscovery.management

Examples of org.apache.vysper.xmpp.modules.servicediscovery.management.Identity


        return name;
    }

    public List<InfoElement> getServerInfosFor(InfoRequest request) {
        List<InfoElement> infoElements = new ArrayList<InfoElement>();
        infoElements.add(new Identity("conference", "text", getName()));
        infoElements.add(new Feature(NamespaceURIs.XEP0045_MUC));
        return infoElements;
    }
View Full Code Here


    }
   
    public List<InfoElement> getInfosFor(InfoRequest request)
            throws ServiceDiscoveryRequestException {
        List<InfoElement> infoElements = new ArrayList<InfoElement>();
        infoElements.add(new Identity("conference", "text", getName()));
        infoElements.add(new Feature(NamespaceURIs.XEP0045_MUC));
       
        for(RoomType type : roomTypes) {
            if(type.includeInDisco()) {
                infoElements.add(new Feature(type.getDiscoName()));
View Full Code Here

        return module;
    }
   
    @Override
    protected Identity getExpectedIdentity() {
        return new Identity("conference", "text", "Room1");
    }
View Full Code Here

        return Arrays.asList(NamespaceURIs.XEP0045_MUC);
    }
   
    @Override
    protected Identity getExpectedIdentity() {
        return new Identity("conference", "text", "Foo");
    }
View Full Code Here

        return request;
    }

    private void assertIdentity(XMLElement queryElement)
            throws XMLSemanticError {
        Identity expectedIdentity = getExpectedIdentity();
        if(expectedIdentity != null) {
            XMLElement identityElement = queryElement.getSingleInnerElementsNamed("identity");
           
            assertNotNull("Identity element must exist", identityElement);
           
            assertEquals("Identity category", expectedIdentity.getCategory(), identityElement.getAttributeValue("category"));
            assertEquals("Identity type", expectedIdentity.getType(), identityElement.getAttributeValue("type"));
           
            if(expectedIdentity.getName() != null) {
                assertEquals("Identity name", expectedIdentity.getName(), identityElement.getAttributeValue("name"));
            } else {
                assertNull("Identity name attribute should be missing", identityElement.getAttributeValue("name"));
            }
        }
    }
View Full Code Here

     */
    public List<InfoElement> getServerInfosFor(InfoRequest request) throws ServiceDiscoveryRequestException {
        CollectionNode root = serviceConfiguration.getRootNode();
        List<InfoElement> infoElements = new ArrayList<InfoElement>();
        if(request.getNode() == null || request.getNode().length() == 0) {
            infoElements.add(new Identity("pubsub", "service"));
            infoElements.add(new Feature(NamespaceURIs.XEP0060_PUBSUB));
        } else {
            LeafNode node = root.find(request.getNode());
            infoElements.addAll(node.getNodeInfosFor(request));
        }
View Full Code Here

     * @param request the sent request
     * @return the list of InfoElements
     */
    public List<InfoElement> getNodeInfosFor(InfoRequest request) {
        List<InfoElement> infoElements = new ArrayList<InfoElement>();
        infoElements.add(new Identity("pubsub", "leaf"));
        infoElements.add(new Feature(NamespaceURIs.XEP0060_PUBSUB));
        infoElements.add(PubsubFeatures.ACCESS_OPEN.getFeature());
        infoElements.add(PubsubFeatures.ITEM_IDS.getFeature());
        infoElements.add(PubsubFeatures.PERSISTENT_ITEMS.getFeature());
        infoElements.add(PubsubFeatures.MULTI_SUBSCRIBE.getFeature());
View Full Code Here

                form.setTitle("formtitle");
                form.setType(DataForm.Type.form);

                List<InfoElement> infoElements = new ArrayList<InfoElement>();
                infoElements.add(new Feature("TEST:NAMESPACE"));
                infoElements.add(new Identity("testCat", "testType"));
                infoElements.add(new InfoDataForm(form));
                return infoElements;
            }
        });
View Full Code Here

                form.setTitle("formtitle");
                form.setType(DataForm.Type.form);

                List<InfoElement> infoElements = new ArrayList<InfoElement>();
                infoElements.add(new Feature("TEST:NAMESPACE"));
                infoElements.add(new Identity("testCat", "testType"));
                infoElements.add(new InfoDataForm(form));
                return infoElements;
            }
        });
View Full Code Here

        return name;
    }

    public List<InfoElement> getServerInfosFor(InfoRequest request) {
        List<InfoElement> infoElements = new ArrayList<InfoElement>();
        infoElements.add(new Identity("conference", "text", getName()));
        infoElements.add(new Feature(NamespaceURIs.XEP0045_MUC));
        return infoElements;
    }
View Full Code Here

TOP

Related Classes of org.apache.vysper.xmpp.modules.servicediscovery.management.Identity

Copyright © 2018 www.massapicom. 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.