tigase.xmpp.impl

## Class Privacy

- java.lang.Object
- - tigase.xmpp.impl.Privacy

-     public class Privacy
      extends Object

  Class defining data structure for privacy lists. Sample data storage: `<node name="privacy"> <map> <entry value="private" type="String" key="default"/> </map> List name: <node name="private"> <map/> Item order: <node name="1"> <map> <entry value="jid" type="String" key="type"/> <entry value="user%40domain.com/res" type="String" key="value"/> <entry value="deny" type="String" key="action"/> <entry type="String[]" key="stanzas"> <item value="message"/> <item value="iq"/> </entry> </map> </node> </node>`
  Created: Mon Oct 9 20:50:09 2006
  Author:
    Artur Hefczyc

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ACTION`
    `static String` | `ACTIVE`
    `static String` | `DEFAULT`
    `static String` | `ITEM`
    `static String` | `LIST`
    `static String` | `NAME`
    `static String` | `ORDER`
    `static String` | `PRIVACY`
    `static String` | `PRIVACY_LIST`
    `static String` | `PRIVACY_LIST_LOADED`
    `static String` | `STANZAS`
    `static String` | `TYPE`
    `static String` | `VALUE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Privacy()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addList(XMPPResourceConnection session, Element list)`
    `static boolean` | `block(XMPPResourceConnection session, String jid)`
    `static PrivacyList` | `getActiveList(XMPPResourceConnection session)`
    `static String` | `getActiveListName(XMPPResourceConnection session)`
    `static List<String>` | `getBlocked(XMPPResourceConnection session)`
    `static PrivacyList` | `getDefaultList(XMPPResourceConnection session)`
    `static Element` | `getDefaultListElement(XMPPResourceConnection session)`
    `static String` | `getDefaultListName(XMPPResourceConnection session)`
    `static Element` | `getList(XMPPResourceConnection session, String list)`
    `static Element` | `getListOld(XMPPResourceConnection session, String list)`
    `static String[]` | `getLists(XMPPResourceConnection session)`
    `static String` | `listNode(String list)`
    `static void` | `removeList(XMPPResourceConnection session, Element list)`
    `static void` | `setActiveList(XMPPResourceConnection session, String lName)`
    `static void` | `setDefaultList(XMPPResourceConnection session, Element list)`
    `static boolean` | `unblock(XMPPResourceConnection session, String jid)`
    `static List<String>` | `unblockAll(XMPPResourceConnection session)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ACTION

          public static final String ACTION

      See Also:
        Constant Field Values

    - #### ACTIVE

          public static final String ACTIVE

      See Also:
        Constant Field Values

    - #### DEFAULT

          public static final String DEFAULT

      See Also:
        Constant Field Values

    - #### ITEM

          public static final String ITEM

      See Also:
        Constant Field Values

    - #### LIST

          public static final String LIST

      See Also:
        Constant Field Values

    - #### NAME

          public static final String NAME

      See Also:
        Constant Field Values

    - #### ORDER

          public static final String ORDER

      See Also:
        Constant Field Values

    - #### PRIVACY

          public static final String PRIVACY

      See Also:
        Constant Field Values

    - #### PRIVACY_LIST

          public static final String PRIVACY_LIST

      See Also:
        Constant Field Values

    - #### STANZAS

          public static final String STANZAS

      See Also:
        Constant Field Values

    - #### TYPE

          public static final String TYPE

      See Also:
        Constant Field Values

    - #### VALUE

          public static final String VALUE

      See Also:
        Constant Field Values

    - #### PRIVACY_LIST_LOADED

          public static final String PRIVACY_LIST_LOADED

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Privacy

          public Privacy()

  - ### Method Detail

    - #### addList

          public static void addList(XMPPResourceConnection session,
                                     Element list)
                              throws NotAuthorizedException,
                                     TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### block

          public static boolean block(XMPPResourceConnection session,
                                      String jid)
                               throws NotAuthorizedException,
                                      TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getActiveList

          public static PrivacyList getActiveList(XMPPResourceConnection session)
                                           throws NotAuthorizedException

      Throws:
        `NotAuthorizedException`

    - #### getActiveListName

          public static String getActiveListName(XMPPResourceConnection session)
                                          throws NotAuthorizedException

      Throws:
        `NotAuthorizedException`

    - #### getBlocked

          public static List<String> getBlocked(XMPPResourceConnection session)
                                         throws NotAuthorizedException,
                                                TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getDefaultList

          public static PrivacyList getDefaultList(XMPPResourceConnection session)
                                            throws NotAuthorizedException,
                                                   TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getDefaultListElement

          public static Element getDefaultListElement(XMPPResourceConnection session)
                                               throws NotAuthorizedException,
                                                      TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getDefaultListName

          public static String getDefaultListName(XMPPResourceConnection session)
                                           throws NotAuthorizedException,
                                                  TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getList

          public static Element getList(XMPPResourceConnection session,
                                        String list)
                                 throws NotAuthorizedException,
                                        TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getListOld

          public static Element getListOld(XMPPResourceConnection session,
                                           String list)
                                    throws NotAuthorizedException,
                                           TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getLists

          public static String[] getLists(XMPPResourceConnection session)
                                   throws NotAuthorizedException,
                                          TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### listNode

          public static String listNode(String list)

    - #### removeList

          public static void removeList(XMPPResourceConnection session,
                                        Element list)
                                 throws NotAuthorizedException,
                                        TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### setActiveList

          public static void setActiveList(XMPPResourceConnection session,
                                           String lName)
                                    throws NotAuthorizedException,
                                           TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### setDefaultList

          public static void setDefaultList(XMPPResourceConnection session,
                                            Element list)
                                     throws NotAuthorizedException,
                                            TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### unblock

          public static boolean unblock(XMPPResourceConnection session,
                                        String jid)
                                 throws NotAuthorizedException,
                                        TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### unblockAll

          public static List<String> unblockAll(XMPPResourceConnection session)
                                         throws NotAuthorizedException,
                                                TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

Copyright © 2004–2019 "Tigase, Inc.". All rights reserved.