Jive Messenger 2.2.2 Javadoc

org.jivesoftware.util
Class JiveProperties

java.lang.Object
  extended by org.jivesoftware.util.JiveProperties
All Implemented Interfaces:
Map

public class JiveProperties
extends Object
implements Map

Retrieves and stores Jive properties. Properties are stored in the database.

Author:
Matt Tucker

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Set entrySet()
           
 Object get(Object key)
           
 Collection<String> getChildrenNames(String parentKey)
          Return all children property names of a parent property as a Collection of String objects.
static JiveProperties getInstance()
          Returns a singleton instance of JiveProperties.
 Collection<String> getPropertyNames()
          Returns all property names as a Collection of String values.
 void init()
          For internal use only.
 boolean isEmpty()
           
 Set keySet()
           
 Object put(Object key, Object value)
           
 void putAll(Map t)
           
 Object remove(Object key)
           
 int size()
           
 Collection values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Method Detail

getInstance

public static JiveProperties getInstance()
Returns a singleton instance of JiveProperties.

Returns:
an instance of JiveProperties.

init

public void init()
For internal use only. This method allows for the reloading of all properties from the values in the datatabase. This is required since it's quite possible during the setup process that a database connection will not be available till after this class is initialized. Thus, if there are existing properties in the database we will want to reload this class after the setup process has been completed.


size

public int size()
Specified by:
size in interface Map

clear

public void clear()
Specified by:
clear in interface Map

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map

values

public Collection values()
Specified by:
values in interface Map

putAll

public void putAll(Map t)
Specified by:
putAll in interface Map

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map

keySet

public Set keySet()
Specified by:
keySet in interface Map

get

public Object get(Object key)
Specified by:
get in interface Map

getChildrenNames

public Collection<String> getChildrenNames(String parentKey)
Return all children property names of a parent property as a Collection of String objects. For example, given the properties X.Y.A, X.Y.B, and X.Y.C, then the child properties of X.Y are X.Y.A, X.Y.B, and X.Y.C. The method is not recursive; ie, it does not return children of children.

Parameters:
parentKey - the name of the parent property.
Returns:
all child property names for the given parent.

getPropertyNames

public Collection<String> getPropertyNames()
Returns all property names as a Collection of String values.

Returns:
all property names.

remove

public Object remove(Object key)
Specified by:
remove in interface Map

put

public Object put(Object key,
                  Object value)
Specified by:
put in interface Map

Jive Messenger 2.2.2 Javadoc

Copyright © 1999-2004 Jive Software.