Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.8.2 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jivesoftware.openfire
Class PrivateStorage

    java.lang.Object
      org.jivesoftware.openfire.container.BasicModule
          org.jivesoftware.openfire.PrivateStorage

All Implemented Interfaces:
  Module, UserEventListener

    public class PrivateStorage

extends BasicModule
implements UserEventListener

Private storage for user accounts (JEP-0049). It is used by some XMPP systems for saving client settings on the server.

Author:
  Iain Shigeoka

Constructor Summary
`PrivateStorage()` Constructs a new PrivateStore instance.

Method Summary
`void` | `add(String username, org.dom4j.Element data)` Stores private data.
`org.dom4j.Element` | `get(String username, org.dom4j.Element data)` Returns the data stored under a key corresponding to the name and namespace of the given element.
`boolean` | `isEnabled()` Returns true if private storage is enabled.
`void` | `setEnabled(boolean enabled)` Sets whether private storage is enabled.
`void` | `start()` Starts the basic module.
`void` | `stop()` Stops the basic module.
`void` | `userCreated(User user, Map params)` A user was created.
`void` | `userDeleting(User user, Map params)` A user is being deleted.
`void` | `userModified(User user, Map params)` A user's name, email, or an extended property was changed.

Methods inherited from class org.jivesoftware.openfire.container.BasicModule
`destroy, getName, initialize`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PrivateStorage

    public PrivateStorage()

  Constructs a new PrivateStore instance.

Method Detail

### isEnabled

    public boolean isEnabled()

  Returns true if private storage is enabled.

  Returns:
    true if private storage is enabled.

### setEnabled

    public void setEnabled(boolean enabled)

  Sets whether private storage is enabled.

  Parameters:
    `enabled` - true if this private store is enabled.

### add

    public void add(String username,
                    org.dom4j.Element data)

  Stores private data. If the name and namespace of the element matches another stored private data XML document, then replace it with the new one.

  Parameters:
    `data` - the data to store (XML element)
    `username` - the username of the account where private data is being stored

### get

    public org.dom4j.Element get(String username,
                                 org.dom4j.Element data)

  Returns the data stored under a key corresponding to the name and namespace of the given element. The Element must be in the form:

  `<name xmlns='namespace'/>`

  If no data is currently stored under the given key, an empty element will be returned.

  Parameters:
    `data` - an XML document who's element name and namespace is used to match previously stored private data.
    `username` - the username of the account where private data is being stored.
  Returns:
    the data stored under the given key or the data element.

### userCreated

    public void userCreated(User user,
                            Map params)

  Description copied from interface: `UserEventListener`
  A user was created.

  Specified by:
    `userCreated` in interface `UserEventListener`
  Parameters:
    `user` - the user.
    `params` - event parameters.

### userDeleting

    public void userDeleting(User user,
                             Map params)

  Description copied from interface: `UserEventListener`
  A user is being deleted.

  Specified by:
    `userDeleting` in interface `UserEventListener`
  Parameters:
    `user` - the user.
    `params` - event parameters.

### userModified

    public void userModified(User user,
                             Map params)

  Description copied from interface: `UserEventListener`
  A user's name, email, or an extended property was changed.

  Specified by:
    `userModified` in interface `UserEventListener`
  Parameters:
    `user` - the user.
    `params` - event parameters.

### start

    public void start()
               throws IllegalStateException

  Description copied from class: `BasicModule`

  Starts the basic module.

  Inheriting classes that choose to override this method MUST call this start() method before accessing BasicModule resources.

  Specified by:
    `start` in interface `Module`
  Overrides:
    `start` in class `BasicModule`
  Throws:
    `IllegalStateException` - If start is called before initialize successfully returns

### stop

    public void stop()

  Description copied from class: `BasicModule`

  Stops the basic module.

  Inheriting classes that choose to override this method MUST call this stop() method before accessing BasicModule resources.

  Specified by:
    `stop` in interface `Module`
  Overrides:
    `stop` in class `BasicModule`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.8.2 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Jive Software.