use of org.jivesoftware.smackx.commands.RemoteCommand in project Smack by igniterealtime.
the class ServiceAdministrationManager method addUser.
public void addUser(final EntityBareJid userJid, final String password) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
RemoteCommand command = addUser();
command.execute();
Form answerForm = command.getForm().createAnswerForm();
FormField accountJidField = answerForm.getField("accountjid");
accountJidField.addValue(userJid.toString());
FormField passwordField = answerForm.getField("password");
passwordField.addValue(password);
FormField passwordVerifyField = answerForm.getField("password-verify");
passwordVerifyField.addValue(password);
command.next(answerForm);
assert (command.isCompleted());
}
use of org.jivesoftware.smackx.commands.RemoteCommand in project Smack by igniterealtime.
the class ServiceAdministrationManager method deleteUser.
public void deleteUser(Set<EntityBareJid> jidsToDelete) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
RemoteCommand command = deleteUser();
command.execute();
Form answerForm = command.getForm().createAnswerForm();
FormField accountJids = answerForm.getField("accountjids");
accountJids.addValues(JidUtil.toStringList(jidsToDelete));
command.next(answerForm);
assert (command.isCompleted());
}
Aggregations