code: public PubSub modifyAffiliationAsOwner(List<Affiliation> affiliations) throws NoResponseException,
                      XMPPErrorException, NotConnectedException, InterruptedException {
          for (Affiliation affiliation : affiliations) {
              if (affiliation.getPubSubNamespace() != PubSubNamespace.owner) {
                  throw new IllegalArgumentException("Must use Affiliation(BareJid, Type) affiliations");
              }
          }
  
          PubSub pubSub = createPubsubPacket(Type.set, new AffiliationsExtension(AffiliationNamespace.owner, affiliations, getId()));
          return sendPubsubPacket(pubSub);
      }
docs: Modify the affiliations for this PubSub node as owner. The {@link Affiliation}s given must be created with the
  {@link Affiliation#Affiliation(org.jxmpp.jid.BareJid, Affiliation.Type)} constructor.
  <p>
  Note that this is an <b>optional</b> PubSub feature ('pubsub#modify-affiliations').
  </p>
  
  @param affiliations
  @return <code>null</code> or a PubSub stanza with additional information on success.
  @throws NoResponseException
  @throws XMPPErrorException
  @throws NotConnectedException
  @throws InterruptedException
  @see <a href="http://www.xmpp.org/extensions/xep-0060.html#owner-affiliations-modify">XEP-60 § 8.9.2 Modify Affiliation</a>
  @since 4.2