Jive API (3.0.13) Core Javadocs

com.jivesoftware.community
Class JiveHome

java.lang.Object
  extended by com.jivesoftware.community.JiveHome

public final class JiveHome
extends Object

Self-contained abstraction of the logic used to derive the home directory of the application.

This class also exposes various commonly used resources from the application home.

It is intentionally staticly initialized as access to its information is usually needed in early application bootstrap initialization.

The contract of this file is then, that jive home can never be null. It may not exist but the configured value will always exist or be defaulted.


Field Summary
static String CLASSPATH_RESOURCE_ROOT
           
static String CONFIG_FILE
           
static String JIVE_HOME_KEY
           
static String JIVE_LOG_KEY
           
static String JIVE_ROOT_ENV_KEY
           
static String JIVE_ROOT_KEY
           
static String LICENSE_FILE
           
 
Method Summary
static File getAttachmentCache()
          Returns the attachement cache directory located in the jive home path.
static File getAttachmentImageCache()
          Returns the attachment image cache directory located in the jive home path.
static File getAttachmentImages()
          Returns the attachment image directory located in the jive home path.
static File getAttachments()
          Returns the attachment directory located in the jive home path.
static File getBlogImports()
          Returns the blog imports directory located in the jive home path.
static File getBlogs()
          Returns the blogs directory located in the jive home path.
static File getCache()
          Returns the cache directory located in the jive home path.
static File getConfigurationFile()
          Returns the application configuration file in the jive home path.
static File getCrypto()
          Returns the crypto directory located in the jive home path.
static String getEnvironmentJiveHomePath()
          Returns the envrionment configured value for Jive Home.
static String getEnvironmentJiveLogsPath()
          Returns the log path given the current runtime environment.
static String getEnvironmentJiveRootPath()
          Returns the root path given the current runtime environment.
static File getEtc()
          Returns the etc configuration directory located in the jive home path.
static File getGeoIP()
          Returns the GeoIP data directory located in the jive home path.
static File getImageCache()
          Returns the image cache directory located in the jive home path.
static File getImages()
          Returns the image directory located in the jive home path.
static File getJiveHome()
          Returns the home directory of the application.
static String getJiveHomePath()
          Returns the path to the jive home application within the system.
static String getJiveLogPath()
          Returns the log path for the runtime.
static File getJiveLogs()
          Returns the log directory of the application.
static String getJiveLogsPath()
          Returns the path to the jive log application within the system.
static File getJiveRoot()
          Returns the root of the jive installation on the local system.
static String getJiveRootPath()
          Returns the root path for the runtime.
static File getLicenseFile()
          Returns the path to the jive license file which may not exist depending on the context of the application.
static UUID getNodeID()
           
static File getPlugins()
          Returns the plugin directory located in the jive home path.
static File getResources()
          Returns the resources directory located in the jive home path.
static File getSearch()
          Returns the search directory located in the jive home path.
static File getSpelling()
          Returns the spelling directory located in the jive home path.
static String getStartupJiveHomePath()
          Returns the root path that was present at startup.
static String getStartupJiveLogsPath()
          Returns the path to application log files that was present at startup.
static String getStartupJiveRootPath()
           
static File getStats()
          Returns the stats directory located in the jive home path.
static File getTemp()
          Returns the temp directory located in the jive home path.
static File getThemes()
          Returns the themes directory located in the jive home path.
static File getWww()
          Returns the static HTTP resource directory located in the jive home path.
static void initialize()
          Causes the system to initialize all expected files to the effective Jive Home.
static boolean isInitialized()
          Indicates if JiveHome has been initialized - this will almost always be yes except for the case where JiveGlobals has a circular dependency on this class.
static boolean isManagedInstall()
          Validates the root structure provided to the runtime to determine if the runtime is hosted by a managed installation.
static void setEffectiveJiveHomePath(String path)
          Resets the effective Jive Home path for the running application, overriding system defaults.
static void setEffectiveJiveLogsPath(String path)
          Resets the effective Jive log path for the running application, overriding system defaults.
static void setEffectiveJiveRootPath(String path)
          Resets the effective Jive Root path for the running application, overriding system defaults.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LICENSE_FILE

public static final String LICENSE_FILE
See Also:
Constant Field Values

CONFIG_FILE

public static final String CONFIG_FILE
See Also:
Constant Field Values

JIVE_ROOT_KEY

public static final String JIVE_ROOT_KEY
See Also:
Constant Field Values

JIVE_LOG_KEY

public static final String JIVE_LOG_KEY
See Also:
Constant Field Values

JIVE_HOME_KEY

public static final String JIVE_HOME_KEY
See Also:
Constant Field Values

JIVE_ROOT_ENV_KEY

public static final String JIVE_ROOT_ENV_KEY
See Also:
Constant Field Values

CLASSPATH_RESOURCE_ROOT

public static final String CLASSPATH_RESOURCE_ROOT
See Also:
Constant Field Values
Method Detail

getStartupJiveHomePath

public static String getStartupJiveHomePath()
Returns the root path that was present at startup. This will not be the same as the effective path if an outside entity has established a different home path.

Returns:

getStartupJiveRootPath

public static String getStartupJiveRootPath()

getStartupJiveLogsPath

public static String getStartupJiveLogsPath()
Returns the path to application log files that was present at startup. This will not be the same as the effective path if an outside entity has established a different log path.

Returns:

setEffectiveJiveHomePath

public static void setEffectiveJiveHomePath(String path)
Resets the effective Jive Home path for the running application, overriding system defaults. This method is intentionally not thread-safe and is not intended for use in a running system. The only intended use is during startup or setup operations which may need to alter this path. Setting this value to null will effectively result in a re-initialization of the path from the runtime environment.

Parameters:
path -

setEffectiveJiveRootPath

public static void setEffectiveJiveRootPath(String path)
Resets the effective Jive Root path for the running application, overriding system defaults. This method is intentionally not thread-safe and is not intended for use in a running system. The only intended use is during startup or setup operations which may need to alter this path. Setting this value to null will effectively result in a re-initialization of the path from the runtime environment.

Parameters:
path -

setEffectiveJiveLogsPath

public static void setEffectiveJiveLogsPath(String path)
Resets the effective Jive log path for the running application, overriding system defaults. This method is intentionally not thread-safe and is not intended for use in a running system. The only intended use is during startup or setup operations which may need to alter this path. Setting this value to null will effectively result in a re-initialization of the path from the runtime environment.

Parameters:
path -

getEnvironmentJiveLogsPath

public static String getEnvironmentJiveLogsPath()
Returns the log path given the current runtime environment. This is not necessarily the same as the effective runtime path which may be changed programatically.

Returns:

getEnvironmentJiveRootPath

public static String getEnvironmentJiveRootPath()
Returns the root path given the current runtime environment. This is not necessarily the same as the effective runtime path which may be changed programatically.

Returns:

getEnvironmentJiveHomePath

public static String getEnvironmentJiveHomePath()
Returns the envrionment configured value for Jive Home. In normal operation, this should be the same as the effective Jive Home. If an entity has explicitly changed the effective Jive Home, this will return the equivalent of the startup value but not the effective value.

Returns:

initialize

public static void initialize()
Causes the system to initialize all expected files to the effective Jive Home. If the Jive Home is reset, this method should be called to populate the content into the new directory. This method may be invoked multiple times safely and in most cases, multiple invocations will not alter the jive home directory contents. Only if the effective home value is changed will re-invocations of this method have an impact on the filesystem contents.


getEtc

public static File getEtc()
Returns the etc configuration directory located in the jive home path.

Returns:

getWww

public static File getWww()
Returns the static HTTP resource directory located in the jive home path.

Returns:

getCache

public static File getCache()
Returns the cache directory located in the jive home path.

Returns:

getPlugins

public static File getPlugins()
Returns the plugin directory located in the jive home path.

Returns:

getAttachments

public static File getAttachments()
Returns the attachment directory located in the jive home path.

Returns:

getAttachmentCache

public static File getAttachmentCache()
Returns the attachement cache directory located in the jive home path.

Returns:

getAttachmentImages

public static File getAttachmentImages()
Returns the attachment image directory located in the jive home path.

Returns:

getAttachmentImageCache

public static File getAttachmentImageCache()
Returns the attachment image cache directory located in the jive home path.

Returns:

getBlogs

public static File getBlogs()
Returns the blogs directory located in the jive home path.

Returns:

getBlogImports

public static File getBlogImports()
Returns the blog imports directory located in the jive home path.

Returns:

getCrypto

public static File getCrypto()
Returns the crypto directory located in the jive home path.

Returns:

getImages

public static File getImages()
Returns the image directory located in the jive home path.

Returns:

getImageCache

public static File getImageCache()
Returns the image cache directory located in the jive home path.

Returns:

getResources

public static File getResources()
Returns the resources directory located in the jive home path.

Returns:

getSpelling

public static File getSpelling()
Returns the spelling directory located in the jive home path.

Returns:

getGeoIP

public static File getGeoIP()
Returns the GeoIP data directory located in the jive home path.

Returns:

getSearch

public static File getSearch()
Returns the search directory located in the jive home path.

Returns:

getStats

public static File getStats()
Returns the stats directory located in the jive home path.

Returns:

getTemp

public static File getTemp()
Returns the temp directory located in the jive home path.

Returns:

getThemes

public static File getThemes()
Returns the themes directory located in the jive home path.

Returns:

getConfigurationFile

public static File getConfigurationFile()
Returns the application configuration file in the jive home path.

Returns:

getLicenseFile

public static File getLicenseFile()
Returns the path to the jive license file which may not exist depending on the context of the application.

Returns:

getJiveLogs

public static File getJiveLogs()
Returns the log directory of the application. This may be overwritten via code or environment values. The file retuened will never be null, but may not exist.

Returns:

getJiveLogsPath

public static String getJiveLogsPath()
Returns the path to the jive log application within the system. This may be overwritten via code or environment values. The path returned will never be null, but may not exist.

Returns:

getJiveHome

public static File getJiveHome()
Returns the home directory of the application. This may be overwritten via code or environment values. The file retuened will never be null, but may not exist.

Returns:

getJiveHomePath

public static String getJiveHomePath()
Returns the path to the jive home application within the system. This may be overwritten via code or environment values. The path returned will never be null, but may not exist.

Returns:

getJiveRoot

public static File getJiveRoot()
Returns the root of the jive installation on the local system. This may be overridden by environment configurations. The file returned will never be null, but may not exist.

Returns:

getJiveRootPath

public static String getJiveRootPath()
Returns the root path for the runtime. This will varry depending on the environment and programmatic changes to the runtime in some cases. The value returned should never be null but may not exist on the filesystem.

Returns:

getJiveLogPath

public static String getJiveLogPath()
Returns the log path for the runtime. This will varry depending on the environment and programmatic changes to the runtime in some cases. The value returned should never be null but may not exist on the filesystem.

Returns:

isManagedInstall

public static boolean isManagedInstall()
Validates the root structure provided to the runtime to determine if the runtime is hosted by a managed installation.

Returns:

getNodeID

public static UUID getNodeID()

isInitialized

public static boolean isInitialized()
Indicates if JiveHome has been initialized - this will almost always be yes except for the case where JiveGlobals has a circular dependency on this class.

Returns:

Jive Product Page

Copyright © 1999-2007 Jive Software.