/** * Update the preferences in the server. * * @param mamPrefs * @return the currently active preferences after the operation. * @throws NoResponseException * @throws XMPPErrorException * @throws NotConnectedException * @throws InterruptedException * @throws NotLoggedInException * @since 4.3.0 */ public MamPrefsResult updateArchivingPreferences(MamPrefs mamPrefs) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotLoggedInException { MamPrefsIQ mamPrefIQ = mamPrefs.constructMamPrefsIq(); return queryMamPrefs(mamPrefIQ); }
/** * Get the preferences stored in the server. * * @return the MAM preferences result * @throws NoResponseException * @throws XMPPErrorException * @throws NotConnectedException * @throws InterruptedException * @throws NotLoggedInException */ public MamPrefsResult retrieveArchivingPreferences() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotLoggedInException { MamPrefsIQ mamPrefIQ = new MamPrefsIQ(); return queryMamPrefs(mamPrefIQ); }
/** * Update the preferences in the server. * * @param alwaysJids * is the list of JIDs that should always have messages to/from * archived in the user's store * @param neverJids * is the list of JIDs that should never have messages to/from * archived in the user's store * @param defaultBehavior * can be "roster", "always", "never" (see XEP-0313) * @return the MAM preferences result * @throws NoResponseException * @throws XMPPErrorException * @throws NotConnectedException * @throws InterruptedException * @throws NotLoggedInException * @deprecated use {@link #updateArchivingPreferences(MamPrefs)} instead. */ @Deprecated public MamPrefsResult updateArchivingPreferences(List<Jid> alwaysJids, List<Jid> neverJids, DefaultBehavior defaultBehavior) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotLoggedInException { Objects.requireNonNull(defaultBehavior, "Default behavior must be set"); MamPrefsIQ mamPrefIQ = new MamPrefsIQ(alwaysJids, neverJids, defaultBehavior); return queryMamPrefs(mamPrefIQ); }
/** * Update the preferences in the server. * * @param mamPrefs * @return the currently active preferences after the operation. * @throws NoResponseException * @throws XMPPErrorException * @throws NotConnectedException * @throws InterruptedException * @throws NotLoggedInException * @since 4.3.0 */ public MamPrefsResult updateArchivingPreferences(MamPrefs mamPrefs) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotLoggedInException { MamPrefsIQ mamPrefIQ = mamPrefs.constructMamPrefsIq(); return queryMamPrefs(mamPrefIQ); }
/** * Get the preferences stored in the server. * * @return the MAM preferences result * @throws NoResponseException * @throws XMPPErrorException * @throws NotConnectedException * @throws InterruptedException * @throws NotLoggedInException */ public MamPrefsResult retrieveArchivingPreferences() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotLoggedInException { MamPrefsIQ mamPrefIQ = new MamPrefsIQ(); return queryMamPrefs(mamPrefIQ); }
/** * Update the preferences in the server. * * @param alwaysJids * is the list of JIDs that should always have messages to/from * archived in the user's store * @param neverJids * is the list of JIDs that should never have messages to/from * archived in the user's store * @param defaultBehavior * can be "roster", "always", "never" (see XEP-0313) * @return the MAM preferences result * @throws NoResponseException * @throws XMPPErrorException * @throws NotConnectedException * @throws InterruptedException * @throws NotLoggedInException * @deprecated use {@link #updateArchivingPreferences(MamPrefs)} instead. */ @Deprecated public MamPrefsResult updateArchivingPreferences(List<Jid> alwaysJids, List<Jid> neverJids, DefaultBehavior defaultBehavior) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotLoggedInException { Objects.requireNonNull(defaultBehavior, "Default behavior must be set"); MamPrefsIQ mamPrefIQ = new MamPrefsIQ(alwaysJids, neverJids, defaultBehavior); return queryMamPrefs(mamPrefIQ); }