|
Clearspace API (2.5.29) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.community.JiveGlobals
public class JiveGlobals
This class controls access to a number of global propeties in the applcation.
Additionally, this class controls access to Jive properties. If the application is on, property manipulation must be done through this class and not the database or xml files directly. Properties come in 3 types:getLocalProperty(String)getLocalProperty(String, int)getLocalProperties(String)setLocalProperty(String, String)setLocalProperties(Map)deleteLocalProperty(String)getJiveProperty(String)getJiveProperty(String, String)getJivePropertyNames()getJivePropertyNames(String)getJiveProperties(String)getJiveIntProperty(String, int)getJiveBooleanProperty(String)getJiveBooleanProperty(String, boolean)setJiveProperty(String, String)setJiveProperties(java.util.Map)deleteJiveProperty(String)getLocalizedJiveProperty(String, java.util.Locale)getLocalizedPropertyLocales(String)setLocalizedJiveProperty(String, String, java.util.Locale)deleteLocalizedJiveProperty(String, java.util.Locale)
JiveResourceResolver| Nested Class Summary | |
|---|---|
static class |
JiveGlobals.ResetLocalizationSettingsClusterTask
|
| Field Summary | |
|---|---|
static String |
JIVE_INSTANCE_ID
The universally unique instance of the application cluster. |
static String |
JIVE_NODE_ID
The universally unique id of an instance node. |
static String |
jiveHome
Location of the jiveHome directory. |
| Method Summary | |
|---|---|
static void |
deleteJiveProperty(String name)
Deletes a Jive property. |
static void |
deleteLocalizedJiveProperty(String name,
Locale locale)
Deletes a localized Jive property. |
static void |
deleteLocalProperty(String name)
Deletes a local property. |
static String |
formatDate(Date date)
Formats a Date object and returns a formatted String. |
static String |
formatDateTime(Date date)
Formats a Date object to return a date and time using the global locale. |
static String |
getBuildProperty(String name)
Returns a build-level property. |
static String |
getCharacterEncoding()
Returns the character set that Jive uses for encoding. |
static String |
getDefaultBaseURL()
Returns the base URL of this Jive installation - usually: http://[yoursite]/[webapp-path] This uses the Jive property of jiveURL which is settable through the config file or admin console. |
static boolean |
getJiveBooleanProperty(String name)
Returns the specified Jive property as a boolean or returns false if the property doesn't exist or isn't parseable. |
static boolean |
getJiveBooleanProperty(String name,
boolean defaultValue)
Returns the specified Jive property as a boolean or returns defaultValue if the property doesn't exist or isn't parseable. |
static String |
getJiveHome()
Returns the location of the jiveHome directory. |
static int |
getJiveIntProperty(String name,
int defaultValue)
Returns the specified Jive property as an integer or returns the defaultValue if the property does't exist or the value isn't a number. |
static List<String> |
getJiveProperties(String parent)
Return all immediate children property values of a parent Jive property as a list of strings, or an empty list if there are no children. |
static String |
getJiveProperty(String name)
Returns the value of the specified property or null if the value doesn't exist. |
static String |
getJiveProperty(String name,
String defaultValue)
Returns a Jive property. |
static List<String> |
getJivePropertyNames()
Returns all Jive property names. |
static List<String> |
getJivePropertyNames(String parent)
Return all immediate children property names of a parent Jive property as a list of strings, or an empty list if there are no children. |
static Locale |
getLocale()
Returns the global Locale used by Jive. |
static String |
getLocalizedJiveProperty(String name,
Locale locale)
Returns a localized Jive property given its name and locale. |
static List<Locale> |
getLocalizedPropertyLocales(String name)
Returns a list of locales where this property is set. |
static List<String> |
getLocalProperties(String parent)
Return all immediate children property values of a parent local property as a list of strings, or an empty list if there are no children. |
static String |
getLocalProperty(String name)
Returns a local property. |
static int |
getLocalProperty(String name,
int defaultValue)
Returns a local property as an integer. |
static String |
getLocalProperty(String name,
String defaultValue)
Returns a local property. |
static String |
getPluginDirectory()
Returns the directory that plugins are locally cached for a particular clearspace instance. |
static Map<String,String> |
getSpiProperties(String spiClass)
|
static String |
getSpiProperty(String spiClass,
String name)
|
static Date |
getStartupDate()
Returns the date the Jive system was started. |
static TimeZone |
getTimeZone()
Returns the global TimeZone used by Jive. |
static Map<String,String> |
getUnmodifiableMap()
|
static boolean |
isDebugMode()
|
static boolean |
isHidden(String propName)
Determine if a property should be hidden. |
static boolean |
isSetup()
Returns true if the application has been set up, false otherwise. |
static boolean |
isWhiteLabel()
Returns true if the application is running in white label mode, false otherwise. |
static JiveContainer |
jiveContainerFor(JiveObject source)
|
static void |
reset()
For testing purposes only! |
static void |
resetLocalization()
Resets locale specific settings so they will be reread from properties. |
static void |
setCharacterEncoding(String characterEncoding)
Sets the character set that Jive uses for encoding. |
static void |
setConfigName(String configName)
Allows the name of the local config file name to be changed. |
static void |
setJiveHome(String jHome)
Sets the location of the jiveHome directory. |
static void |
setJiveProperties(Map<String,String> propertyMap)
Sets multiple Jive properties at once. |
static void |
setJiveProperty(String name,
String value)
Sets a Jive property. |
static void |
setLocale(Locale newLocale)
Sets the global locale used by Jive. |
static void |
setLocalizedJiveProperty(String name,
String value,
Locale locale)
Sets a localized Jive property. |
static void |
setLocalProperties(Map<String,String> propertyMap)
Sets multiple local properties at once. |
static void |
setLocalProperty(String name,
String value)
Sets a local property. |
static void |
setSpiProperties(String spiClass,
Map<String,String> config)
|
static void |
setSpiProperty(String clazz,
String name,
String value)
|
static void |
setTimeZone(TimeZone newTimeZone)
Sets the global time zone used by Jive. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String JIVE_INSTANCE_ID
public static final String JIVE_NODE_ID
public static String jiveHome
| Method Detail |
|---|
public static void reset()
public static void resetLocalization()
public static Date getStartupDate()
public static Locale getLocale()
Locale used by Jive. A locale specifies language and country
codes, and is used for internationalization. The default locale is system dependant
and is determined by calling Locale.getDefault().
public static void setLocale(Locale newLocale)
Locale.getDefault().
newLocale - the global locale for Jive.public static String getCharacterEncoding()
com.jivesoftware.community.web.filter.SetResponseCharacterEncodingFilter
is installed in this application's web.xml file, which will set the incoming character encoding
to the one reported by this method.
public static void setCharacterEncoding(String characterEncoding)
throws UnsupportedEncodingException
getCharacterEncoding().
characterEncoding - the global Jive character encoding.
UnsupportedEncodingException - if the specified character encoding is invalid.public static TimeZone getTimeZone()
TimeZone used by Jive. The default is the JDK's default time zone.
public static void setTimeZone(TimeZone newTimeZone)
newTimeZone - the new global time zone used by this application.public static String formatDate(Date date)
Date object and returns a formatted String. This uses the date formatter
which in turn uses the default locale.
date - the Date to format.
public static String formatDateTime(Date date)
Date object to return a date and time using the global locale.
date - the Date to format.
public static String getDefaultBaseURL()
public static String getJiveHome()
public static String getPluginDirectory()
public static void setJiveHome(String jHome)
jiveHome directory. This method is only intended to be
used during setup and should not set called in normal operations.
jHome - the path to jiveHomepublic static void setConfigName(String configName)
configName - the name of the config file.public static boolean isSetup()
public static String getLocalProperty(String name)
<foo>
<bar>
<prop>some value</prop>
</bar>
</foo>
name - the name of the property to return.
public static int getLocalProperty(String name,
int defaultValue)
name - the name of the property to return.defaultValue - the value returned if the property could not be loaded or was not a
number.
public static String getLocalProperty(String name,
String defaultValue)
name - the name of the property to return.defaultValue - the value returned if the property could not be loaded.
public static List<String> getLocalProperties(String parent)
parent - the name of the parent property to return the children for.
public static void setLocalProperty(String name,
String value)
name - the name of the property being set.value - the value of the property being set.public static void setLocalProperties(Map<String,String> propertyMap)
propertyMap - a map of properties, keyed on property name.public static void deleteLocalProperty(String name)
name - the name of the property to delete.public static String getJiveProperty(String name)
name - the name of the property to return.
public static String getJiveProperty(String name,
String defaultValue)
name - the name of the property.defaultValue - value returned if the property doesn't exist.
public static List<String> getJivePropertyNames()
public static List<String> getJivePropertyNames(String parent)
parent - the parent property to return all child properties for
public static List<String> getJiveProperties(String parent)
parent - the name of the parent property to return the children for.
public static int getJiveIntProperty(String name,
int defaultValue)
name - the name of the property.defaultValue - value returned if the property doesn't exist or was not a number.
public static boolean getJiveBooleanProperty(String name)
name - the name of the property to return.
public static boolean getJiveBooleanProperty(String name,
boolean defaultValue)
name - the name of the property.defaultValue - value returned if the property doesn't exist.
public static void setJiveProperty(String name,
String value)
name - the name of the property being set.value - the value of the property being set.public static void setJiveProperties(Map<String,String> propertyMap)
propertyMap - a map of properties, keyed on property name.public static void deleteJiveProperty(String name)
name - the name of the property to delete.
public static String getLocalizedJiveProperty(String name,
Locale locale)
name - the name of the propertylocale - the locale this property applies to
public static List<Locale> getLocalizedPropertyLocales(String name)
locales where this property is set. If the property doesn't
exist or is not set then an empty list is returned.
name - the name of the property to check.
Locale objects where this property is set or an empty list
if the property doesn't exist.
public static void setLocalizedJiveProperty(String name,
String value,
Locale locale)
name - the name of the property being set.value - the value of the property being set.locale - the locale of the property
public static void deleteLocalizedJiveProperty(String name,
Locale locale)
name - the name of the property to delete.locale - the locale of the propertypublic static boolean isWhiteLabel()
public static String getBuildProperty(String name)
name - the name of the proeprty
public static Map<String,String> getUnmodifiableMap()
public static void setSpiProperty(String clazz,
String name,
String value)
public static String getSpiProperty(String spiClass,
String name)
public static Map<String,String> getSpiProperties(String spiClass)
public static void setSpiProperties(String spiClass,
Map<String,String> config)
public static boolean isHidden(String propName)
propName - the name of the property.
public static JiveContainer jiveContainerFor(JiveObject source)
public static boolean isDebugMode()
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||