Package tigase.xmpp.impl

## Class Privacy

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

-     public class Privacy
      extends java.lang.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 | Description
    --- | --- | ---
    `static java.lang.String` | `ACTION` |
    `static java.lang.String` | `ACTIVE` |
    `static java.lang.String` | `DEFAULT` |
    `static java.lang.String` | `ITEM` |
    `static java.lang.String` | `LIST` |
    `static java.lang.String` | `NAME` |
    `static java.lang.String` | `ORDER` |
    `static java.lang.String` | `PRIVACY` |
    `static java.lang.String` | `PRIVACY_LIST` |
    `static java.lang.String` | `PRIVACY_LIST_LOADED` |
    `static java.lang.String` | `STANZAS` |
    `static java.lang.String` | `TYPE` |
    `static java.lang.String` | `VALUE` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Privacy()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `addList​(XMPPResourceConnection session, Element list)` |
    `static boolean` | `block​(XMPPResourceConnection session, java.util.List<java.lang.String> jids)` |
    `static PrivacyList` | `getActiveList​(XMPPResourceConnection session)` |
    `static java.lang.String` | `getActiveListName​(XMPPResourceConnection session)` |
    `static java.util.List<java.lang.String>` | `getBlocked​(XMPPResourceConnection session)` |
    `static PrivacyList` | `getDefaultList​(XMPPResourceConnection session)` |
    `static Element` | `getDefaultListElement​(XMPPResourceConnection session)` |
    `static java.lang.String` | `getDefaultListName​(XMPPResourceConnection session)` |
    `static Element` | `getList​(XMPPResourceConnection session, java.lang.String list)` |
    `static Element` | `getListOld​(XMPPResourceConnection session, java.lang.String list)` |
    `static java.lang.String[]` | `getLists​(XMPPResourceConnection session)` |
    `static java.lang.String` | `listNode​(java.lang.String list)` |
    `static void` | `removeList​(XMPPResourceConnection session, Element list)` |
    `static void` | `setActiveList​(XMPPResourceConnection session, java.lang.String lName)` |
    `static void` | `setDefaultList​(XMPPResourceConnection session, Element list)` |
    `static boolean` | `unblock​(XMPPResourceConnection session, java.util.List<java.lang.String> jids)` |
    `static java.util.List<java.lang.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 java.lang.String ACTION

      See Also:
        Constant Field Values

    - #### ACTIVE

          public static final java.lang.String ACTIVE

      See Also:
        Constant Field Values

    - #### DEFAULT

          public static final java.lang.String DEFAULT

      See Also:
        Constant Field Values

    - #### ITEM

          public static final java.lang.String ITEM

      See Also:
        Constant Field Values

    - #### LIST

          public static final java.lang.String LIST

      See Also:
        Constant Field Values

    - #### NAME

          public static final java.lang.String NAME

      See Also:
        Constant Field Values

    - #### ORDER

          public static final java.lang.String ORDER

      See Also:
        Constant Field Values

    - #### PRIVACY

          public static final java.lang.String PRIVACY

      See Also:
        Constant Field Values

    - #### PRIVACY_LIST

          public static final java.lang.String PRIVACY_LIST

      See Also:
        Constant Field Values

    - #### STANZAS

          public static final java.lang.String STANZAS

      See Also:
        Constant Field Values

    - #### TYPE

          public static final java.lang.String TYPE

      See Also:
        Constant Field Values

    - #### VALUE

          public static final java.lang.String VALUE

      See Also:
        Constant Field Values

    - #### PRIVACY_LIST_LOADED

          public static final java.lang.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,
                                      java.util.List<java.lang.String> jids)
                               throws NotAuthorizedException,
                                      TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getActiveList

          public static PrivacyList getActiveList​(XMPPResourceConnection session)
                                           throws NotAuthorizedException

      Throws:
        `NotAuthorizedException`

    - #### getActiveListName

          public static java.lang.String getActiveListName​(XMPPResourceConnection session)
                                                    throws NotAuthorizedException

      Throws:
        `NotAuthorizedException`

    - #### getBlocked

          public static java.util.List<java.lang.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 java.lang.String getDefaultListName​(XMPPResourceConnection session)
                                                     throws NotAuthorizedException,
                                                            TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getList

          public static Element getList​(XMPPResourceConnection session,
                                        java.lang.String list)
                                 throws NotAuthorizedException,
                                        TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getListOld

          public static Element getListOld​(XMPPResourceConnection session,
                                           java.lang.String list)
                                    throws NotAuthorizedException,
                                           TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getLists

          public static java.lang.String[] getLists​(XMPPResourceConnection session)
                                             throws NotAuthorizedException,
                                                    TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### listNode

          public static java.lang.String listNode​(java.lang.String list)

    - #### removeList

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

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### setActiveList

          public static void setActiveList​(XMPPResourceConnection session,
                                           java.lang.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,
                                        java.util.List<java.lang.String> jids)
                                 throws NotAuthorizedException,
                                        TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### unblockAll

          public static java.util.List<java.lang.String> unblockAll​(XMPPResourceConnection session)
                                                             throws NotAuthorizedException,
                                                                    TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`