public class PrivateStorage extends BasicModule implements UserEventListener
Constructor and Description |
---|
PrivateStorage()
Constructs a new PrivateStore instance.
|
Modifier and Type | Method and Description |
---|---|
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.
|
destroy, getName, initialize
public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled
- true if this private store is enabled.public void add(String username, org.dom4j.Element data)
data
- the data to store (XML element)username
- the username of the account where private data is being storedpublic org.dom4j.Element get(String username, org.dom4j.Element data)
<name xmlns='namespace'/>
If no data is currently stored under the given key, an empty element will be returned.
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.public void userCreated(User user, Map params)
UserEventListener
userCreated
in interface UserEventListener
user
- the user.params
- event parameters.public void userDeleting(User user, Map params)
UserEventListener
userDeleting
in interface UserEventListener
user
- the user.params
- event parameters.public void userModified(User user, Map params)
UserEventListener
userModified
in interface UserEventListener
user
- the user.params
- event parameters.public void start() throws IllegalStateException
BasicModule
Starts the basic module.
Inheriting classes that choose to override this method MUST call this start() method before accessing BasicModule resources.
start
in interface Module
start
in class BasicModule
IllegalStateException
- If start is called before initialize
successfully returnspublic void stop()
BasicModule
Stops the basic module.
Inheriting classes that choose to override this method MUST call this stop() method before accessing BasicModule resources.
stop
in interface Module
stop
in class BasicModule
Copyright © 2003-2008 Jive Software.