@Override public Element getDiscoInfo(String node, JID jid, JID from) { if (jid != null && getName().equals(jid.getLocalpart()) && isAdmin(from)) { return serviceEntity.getDiscoInfo(node); } return null; }
@Override public List<Element> getDiscoItems(String node, JID jid, JID from) { if (isAdmin(from)) { if (getName().equals(jid.getLocalpart())) { return serviceEntity.getDiscoItems(node, jid.toString()); } else { if (node == null) { return Arrays.asList( serviceEntity.getDiscoItem(null, BareJID.toString(getName(), jid.toString()))); } else { return null; } } } return null; }