Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.util
Class DbJiveProperties

java.lang.Object
  extended by com.jivesoftware.util.DbJiveProperties
All Implemented Interfaces:
JiveProperties, java.util.Map

public class DbJiveProperties
extends java.lang.Object
implements JiveProperties

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


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Method Summary
 void clear()
           
protected  void clusterPut(java.lang.String key, java.lang.String value)
           
protected  void clusterRemove(java.lang.String key)
           
 boolean containsKey(java.lang.Object key)
           
 boolean containsValue(java.lang.Object value)
           
static void destroy()
          Used by JiveGlobals to reset the state of the DbJiveProperty objects
 java.util.Set entrySet()
           
 java.lang.Object get(java.lang.Object key)
           
 java.util.Collection getChildrenNames(java.lang.String parentKey)
          Return all children property names of a parent property as a Collection of String objects.
static DbJiveProperties getInstance()
          Returns a singleton instance of DbJiveProperties.
 java.util.List getLocalesForProperty(java.lang.String name)
          Returns a list of locales where this property is set.
static DbJiveProperties getLocalizedInstance()
          Returns a localized instance of JiveProperties
 java.util.Collection getPropertyNames()
          Returns all property names as a Collection of String values.
 void init()
          For internal use only.
 boolean isEmpty()
           
 java.util.Set keySet()
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
           
 void putAll(java.util.Map t)
           
 java.lang.Object remove(java.lang.Object key)
           
 int size()
           
 java.util.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 DbJiveProperties getInstance()
Returns a singleton instance of DbJiveProperties.

Returns:
an instance of DbJiveProperties.

getLocalizedInstance

public static DbJiveProperties getLocalizedInstance()
Returns a localized instance of JiveProperties

Returns:
an localized 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 until 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.

The init method should also be called when turning clustering on. That will ensure that this cluster member


destroy

public static void destroy()
Used by JiveGlobals to reset the state of the DbJiveProperty objects


size

public int size()
Specified by:
size in interface java.util.Map

clear

public void clear()
Specified by:
clear in interface java.util.Map

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map

containsValue

public boolean containsValue(java.lang.Object value)
Specified by:
containsValue in interface java.util.Map

values

public java.util.Collection values()
Specified by:
values in interface java.util.Map

putAll

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

entrySet

public java.util.Set entrySet()
Specified by:
entrySet in interface java.util.Map

keySet

public java.util.Set keySet()
Specified by:
keySet in interface java.util.Map

get

public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface java.util.Map

getChildrenNames

public java.util.Collection getChildrenNames(java.lang.String parentKey)
Description copied from interface: JiveProperties
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.

Specified by:
getChildrenNames in interface JiveProperties
Parameters:
parentKey - the name of the parent property.
Returns:
all child property names for the given parent.

getPropertyNames

public java.util.Collection getPropertyNames()
Description copied from interface: JiveProperties
Returns all property names as a Collection of String values.

Specified by:
getPropertyNames in interface JiveProperties
Returns:
all property names.

remove

public java.lang.Object remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Specified by:
put in interface java.util.Map

getLocalesForProperty

public java.util.List getLocalesForProperty(java.lang.String name)
Returns a list of locales where this property is set. If the property doesn't exist or is not set then an empty list is returned.

Parameters:
name - the name of the property to check.
Returns:
a list of Locale objects where this property is set or an empty list if the property doesn't exist.

clusterRemove

protected void clusterRemove(java.lang.String key)

clusterPut

protected void clusterPut(java.lang.String key,
                          java.lang.String value)

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.