/** * Revokes ownership privileges from other users. The occupant that loses ownership * privileges will become an administrator. Room owners may revoke ownership privileges. * Some room implementations will not allow to grant ownership privileges to other users. * * @param jids the bare XMPP user IDs of the users to revoke ownership. * @throws XMPPErrorException if an error occurs revoking ownership privileges from a user. * @throws NoResponseException if there was no response from the server. * @throws NotConnectedException * @throws InterruptedException */ public void revokeOwnership(Collection<? extends Jid> jids) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jids, MUCAffiliation.admin); }
/** * Grants administrator privileges to other users. Room owners may grant administrator * privileges to a member or unaffiliated user. An administrator is allowed to perform * administrative functions such as banning users and edit moderator list. * * @param jids the bare XMPP user IDs of the users to grant administrator privileges. * @throws XMPPErrorException if an error occurs granting administrator privileges to a user. * @throws NoResponseException if there was no response from the server. * @throws NotConnectedException * @throws InterruptedException */ public void grantAdmin(Collection<? extends Jid> jids) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jids, MUCAffiliation.admin); }
/** * Revokes administrator privileges from users. The occupant that loses administrator * privileges will become a member. Room owners may revoke administrator privileges from * a member or unaffiliated user. * * @param jids the bare XMPP user IDs of the user to revoke administrator privileges. * @throws XMPPErrorException if an error occurs revoking administrator privileges from a user. * @throws NoResponseException if there was no response from the server. * @throws NotConnectedException * @throws InterruptedException */ public void revokeAdmin(Collection<? extends Jid> jids) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jids, MUCAffiliation.admin); }
/** * Grants membership to a user. Only administrators are able to grant membership. A user * that becomes a room member will be able to enter a room of type Members-Only (i.e. a room * that a user cannot enter without being on the member list). * * @param jid the XMPP user ID of the user to grant membership (e.g. "user@host.org"). * @throws XMPPErrorException if an error occurs granting membership to a user. * @throws NoResponseException if there was no response from the server. * @throws NotConnectedException * @throws InterruptedException */ public void grantMembership(Jid jid) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jid, MUCAffiliation.member, null); }
/** * Revokes a user's membership. Only administrators are able to revoke membership. A user * that becomes a room member will be able to enter a room of type Members-Only (i.e. a room * that a user cannot enter without being on the member list). If the user is in the room and * the room is of type members-only then the user will be removed from the room. * * @param jid the bare XMPP user ID of the user to revoke membership (e.g. "user@host.org"). * @throws XMPPErrorException if an error occurs revoking membership to a user. * @throws NoResponseException if there was no response from the server. * @throws NotConnectedException * @throws InterruptedException */ public void revokeMembership(Jid jid) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jid, MUCAffiliation.none, null); }
/** * Grants administrator privileges to another user. Room owners may grant administrator * privileges to a member or unaffiliated user. An administrator is allowed to perform * administrative functions such as banning users and edit moderator list. * * @param jid the bare XMPP user ID of the user to grant administrator privileges * (e.g. "user@host.org"). * @throws XMPPErrorException if an error occurs granting administrator privileges to a user. * @throws NoResponseException if there was no response from the server. * @throws NotConnectedException * @throws InterruptedException */ public void grantAdmin(Jid jid) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jid, MUCAffiliation.admin); }
/** * Revokes ownership privileges from another user. The occupant that loses ownership * privileges will become an administrator. Room owners may revoke ownership privileges. * Some room implementations will not allow to grant ownership privileges to other users. * * @param jid the bare XMPP user ID of the user to revoke ownership (e.g. "user@host.org"). * @throws XMPPErrorException if an error occurs revoking ownership privileges from a user. * @throws NoResponseException if there was no response from the server. * @throws NotConnectedException * @throws InterruptedException */ public void revokeOwnership(Jid jid) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jid, MUCAffiliation.admin, null); }
/** * Grants membership to other users. Only administrators are able to grant membership. A user * that becomes a room member will be able to enter a room of type Members-Only (i.e. a room * that a user cannot enter without being on the member list). * * @param jids the XMPP user IDs of the users to grant membership. * @throws XMPPErrorException if an error occurs granting membership to a user. * @throws NoResponseException if there was no response from the server. * @throws NotConnectedException * @throws InterruptedException */ public void grantMembership(Collection<? extends Jid> jids) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jids, MUCAffiliation.member); }
/** * Revokes users' membership. Only administrators are able to revoke membership. A user * that becomes a room member will be able to enter a room of type Members-Only (i.e. a room * that a user cannot enter without being on the member list). If the user is in the room and * the room is of type members-only then the user will be removed from the room. * * @param jids the bare XMPP user IDs of the users to revoke membership. * @throws XMPPErrorException if an error occurs revoking membership to a user. * @throws NoResponseException if there was no response from the server. * @throws NotConnectedException * @throws InterruptedException */ public void revokeMembership(Collection<? extends Jid> jids) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jids, MUCAffiliation.none); }
/** * Grants ownership privileges to other users. Room owners may grant ownership privileges. * Some room implementations will not allow to grant ownership privileges to other users. * An owner is allowed to change defining room features as well as perform all administrative * functions. * * @param jids the collection of bare XMPP user IDs of the users to grant ownership. * @throws XMPPErrorException if an error occurs granting ownership privileges to a user. * @throws NoResponseException if there was no response from the server. * @throws NotConnectedException * @throws InterruptedException */ public void grantOwnership(Collection<? extends Jid> jids) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jids, MUCAffiliation.owner); }
/** * Tries to change the affiliation with an 'muc#admin' namespace * * @param jid * @param affiliation * @throws XMPPErrorException * @throws NoResponseException * @throws NotConnectedException * @throws InterruptedException */ private void changeAffiliationByAdmin(Jid jid, MUCAffiliation affiliation) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jid, affiliation, null); }
/** * Grants ownership privileges to another user. Room owners may grant ownership privileges. * Some room implementations will not allow to grant ownership privileges to other users. * An owner is allowed to change defining room features as well as perform all administrative * functions. * * @param jid the bare XMPP user ID of the user to grant ownership (e.g. "user@host.org"). * @throws XMPPErrorException if an error occurs granting ownership privileges to a user. * @throws NoResponseException if there was no response from the server. * @throws NotConnectedException * @throws InterruptedException */ public void grantOwnership(Jid jid) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jid, MUCAffiliation.owner, null); }
/** * Revokes administrator privileges from a user. The occupant that loses administrator * privileges will become a member. Room owners may revoke administrator privileges from * a member or unaffiliated user. * * @param jid the bare XMPP user ID of the user to revoke administrator privileges * (e.g. "user@host.org"). * @throws XMPPErrorException if an error occurs revoking administrator privileges from a user. * @throws NoResponseException if there was no response from the server. * @throws NotConnectedException * @throws InterruptedException */ public void revokeAdmin(EntityJid jid) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jid, MUCAffiliation.member); }
/** * Bans users from the room. An admin or owner of the room can ban users from a room. This * means that the banned user will no longer be able to join the room unless the ban has been * removed. If the banned user was present in the room then he/she will be removed from the * room and notified that he/she was banned along with the reason (if provided) and the bare * XMPP user ID of the user who initiated the ban. * * @param jids the bare XMPP user IDs of the users to ban. * @throws XMPPErrorException if an error occurs banning a user. In particular, a * 405 error can occur if a moderator or a user with an affiliation of "owner" or "admin" * was tried to be banned (i.e. Not Allowed error). * @throws NoResponseException if there was no response from the server. * @throws NotConnectedException * @throws InterruptedException */ public void banUsers(Collection<? extends Jid> jids) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jids, MUCAffiliation.outcast); }
/** * Bans a user from the room. An admin or owner of the room can ban users from a room. This * means that the banned user will no longer be able to join the room unless the ban has been * removed. If the banned user was present in the room then he/she will be removed from the * room and notified that he/she was banned along with the reason (if provided) and the bare * XMPP user ID of the user who initiated the ban. * * @param jid the bare XMPP user ID of the user to ban (e.g. "user@host.org"). * @param reason the optional reason why the user was banned. * @throws XMPPErrorException if an error occurs banning a user. In particular, a * 405 error can occur if a moderator or a user with an affiliation of "owner" or "admin" * was tried to be banned (i.e. Not Allowed error). * @throws NoResponseException if there was no response from the server. * @throws NotConnectedException * @throws InterruptedException */ public void banUser(Jid jid, String reason) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jid, MUCAffiliation.outcast, reason); }
/** * Grants membership to a user. Only administrators are able to grant membership. A user * that becomes a room member will be able to enter a room of type Members-Only (i.e. a room * that a user cannot enter without being on the member list). * * @param jid the XMPP user ID of the user to grant membership (e.g. "user@host.org"). * @throws XMPPException if an error occurs granting membership to a user. */ public void grantMembership(String jid) throws XMPPException { changeAffiliationByAdmin(jid, "member", null); }
/** * Grants membership to other users. Only administrators are able to grant membership. A user * that becomes a room member will be able to enter a room of type Members-Only (i.e. a room * that a user cannot enter without being on the member list). * * @param jids the XMPP user IDs of the users to grant membership. * @throws XMPPException if an error occurs granting membership to a user. */ public void grantMembership(Collection jids) throws XMPPException { changeAffiliationByAdmin(jids, "member"); }
/** * Revokes users' membership. Only administrators are able to revoke membership. A user * that becomes a room member will be able to enter a room of type Members-Only (i.e. a room * that a user cannot enter without being on the member list). If the user is in the room and * the room is of type members-only then the user will be removed from the room. * * @param jids the bare XMPP user IDs of the users to revoke membership. * @throws XMPPException if an error occurs revoking membership to a user. */ public void revokeMembership(Collection jids) throws XMPPException { changeAffiliationByAdmin(jids, "none"); }
/** * Grants membership to a user. Only administrators are able to grant membership. A user * that becomes a room member will be able to enter a room of type Members-Only (i.e. a room * that a user cannot enter without being on the member list). * * @param jid the XMPP user ID of the user to grant membership (e.g. "user@host.org"). * @throws XMPPException if an error occurs granting membership to a user. */ public void grantMembership(String jid) throws XMPPException { changeAffiliationByAdmin(jid, "member", null); }
/** * Grants ownership privileges to other users. Room owners may grant ownership privileges. * Some room implementations will not allow to grant ownership privileges to other users. * An owner is allowed to change defining room features as well as perform all administrative * functions. * * @param jids the collection of bare XMPP user IDs of the users to grant ownership. * @throws XMPPException if an error occurs granting ownership privileges to a user. */ public void grantOwnership(Collection<String> jids) throws XMPPException { changeAffiliationByAdmin(jids, "owner"); }