/** * Get the affiliations of this node. * * @return List of {@link Affiliation} * @throws NoResponseException * @throws XMPPErrorException * @throws NotConnectedException * @throws InterruptedException */ public List<Affiliation> getAffiliations() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return getAffiliations(null, null); }
/** * Get the affiliations of this node. * <p> * {@code additionalExtensions} can be used e.g. to add a "Result Set Management" extension. * {@code returnedExtensions} will be filled with the stanza extensions found in the answer. * </p> * * @param additionalExtensions additional {@code PacketExtensions} add to the request * @param returnedExtensions a collection that will be filled with the returned packet * extensions * @return List of {@link Affiliation} * @throws NoResponseException * @throws XMPPErrorException * @throws NotConnectedException * @throws InterruptedException */ public List<Affiliation> getAffiliations(List<ExtensionElement> additionalExtensions, Collection<ExtensionElement> returnedExtensions) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return getAffiliations(AffiliationNamespace.basic, additionalExtensions, returnedExtensions); }
/** * Retrieve the affiliation list for this node as owner. * <p> * Note that this is an <b>optional</b> PubSub feature ('pubsub#modify-affiliations'). * </p> * * @param additionalExtensions optional additional extension elements add to the request. * @param returnedExtensions an optional collection that will be filled with the returned * extension elements. * @return list of entities whose affiliation is not 'none'. * @throws NoResponseException * @throws XMPPErrorException * @throws NotConnectedException * @throws InterruptedException * @see <a href="http://www.xmpp.org/extensions/xep-0060.html#owner-affiliations-retrieve">XEP-60 § 8.9.1 Retrieve Affiliations List</a> * @since 4.2 */ public List<Affiliation> getAffiliationsAsOwner(List<ExtensionElement> additionalExtensions, Collection<ExtensionElement> returnedExtensions) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return getAffiliations(AffiliationNamespace.owner, additionalExtensions, returnedExtensions); }