com.flexive.shared
Class CacheAdmin

java.lang.Object
  extended by com.flexive.shared.CacheAdmin

public class CacheAdmin
extends java.lang.Object

FxCache access

Author:
Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)

Field Summary
static java.lang.String CACHE_SERVICE_NAME
           
static java.lang.String CONTENTCACHE_BASE
           
static java.lang.String ENVIRONMENT_BASE
           
static java.lang.Object ENVIRONMENT_RUNTIME
           
static java.lang.String LANGUAGES_ALL
           
static java.lang.String LANGUAGES_ID
           
static java.lang.String LANGUAGES_ISO
           
static java.lang.String ROOT_USERTICKETSTORE
           
static java.lang.String ROOT_WEBDAV_USERTICKETSTORE
           
static java.lang.String STREAMSERVER_BASE
           
static java.lang.String STREAMSERVER_EJB_KEY
           
 
Constructor Summary
CacheAdmin()
           
 
Method Summary
static void cacheContent(FxCachedContent content)
          Put a content and its security info in the cache
static void environmentChanged()
          Called from external methods when the environment changed.
static void expireCachedContent(long id)
          Expire all cached versions of a content with the requested id
static void expireCachedContents()
          Expire all cached contents
static FxCachedContent getCachedContent(FxPK pk)
          Try to obtain a cached copy of a content identified by its primary key, will return null if not cached
static FxEnvironment getEnvironment()
          Get the FxEnvironment runtime from the cache
static FxEnvironment getFilteredEnvironment()
          Return a FxFilteredEnvironment for the calling user.
static FxCacheMBean getInstance()
          Returns the FxCache instance.
static java.util.List<com.flexive.stream.ServerLocation> getStreamServers()
          Get a list of all available StreamServers
static boolean isCacheMBeanInstalled()
          Check if the cache MBean is installed in the application server
static boolean isEnvironmentLoaded()
          Has the environment been loaded (yet) - internal helper
static boolean isNewInstallation()
          Is this a new and uninitialized flexive installation? Useful to display splashscreens etc.
static void reloadEnvironment()
          Force reloading of the environment for the current division.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT_USERTICKETSTORE

public static final java.lang.String ROOT_USERTICKETSTORE
See Also:
Constant Field Values

ROOT_WEBDAV_USERTICKETSTORE

public static final java.lang.String ROOT_WEBDAV_USERTICKETSTORE
See Also:
Constant Field Values

CACHE_SERVICE_NAME

public static final java.lang.String CACHE_SERVICE_NAME
See Also:
Constant Field Values

LANGUAGES_ID

public static final java.lang.String LANGUAGES_ID
See Also:
Constant Field Values

LANGUAGES_ISO

public static final java.lang.String LANGUAGES_ISO
See Also:
Constant Field Values

LANGUAGES_ALL

public static final java.lang.String LANGUAGES_ALL
See Also:
Constant Field Values

ENVIRONMENT_BASE

public static final java.lang.String ENVIRONMENT_BASE
See Also:
Constant Field Values

ENVIRONMENT_RUNTIME

public static final java.lang.Object ENVIRONMENT_RUNTIME

STREAMSERVER_BASE

public static final java.lang.String STREAMSERVER_BASE
See Also:
Constant Field Values

STREAMSERVER_EJB_KEY

public static final java.lang.String STREAMSERVER_EJB_KEY
See Also:
Constant Field Values

CONTENTCACHE_BASE

public static final java.lang.String CONTENTCACHE_BASE
See Also:
Constant Field Values
Constructor Detail

CacheAdmin

public CacheAdmin()
Method Detail

getInstance

public static FxCacheMBean getInstance()
Returns the FxCache instance.

Returns:
the cache instance

isCacheMBeanInstalled

public static boolean isCacheMBeanInstalled()
Check if the cache MBean is installed in the application server

Returns:
cache MBean installed

isNewInstallation

public static boolean isNewInstallation()
Is this a new and uninitialized flexive installation? Useful to display splashscreens etc.

Returns:
if this is a new flexive installation

isEnvironmentLoaded

public static boolean isEnvironmentLoaded()
Has the environment been loaded (yet) - internal helper

Returns:
if the environment has been loaded yet

getEnvironment

public static FxEnvironment getEnvironment()
Get the FxEnvironment runtime from the cache

Returns:
FxEnvironment

getFilteredEnvironment

public static FxEnvironment getFilteredEnvironment()
Return a FxFilteredEnvironment for the calling user.

Returns:
a FxFilteredEnvironment for the calling user.

reloadEnvironment

public static void reloadEnvironment()
                              throws java.lang.Exception
Force reloading of the environment for the current division. May only be called by the supervisor user.

Throws:
java.lang.Exception - on errors

cacheContent

public static void cacheContent(FxCachedContent content)
Put a content and its security info in the cache

Parameters:
content - the content to cache

getCachedContent

public static FxCachedContent getCachedContent(FxPK pk)
Try to obtain a cached copy of a content identified by its primary key, will return null if not cached

Parameters:
pk - requested primary key
Returns:
the cached content or null if not found

expireCachedContent

public static void expireCachedContent(long id)
Expire all cached versions of a content with the requested id

Parameters:
id - requested id

expireCachedContents

public static void expireCachedContents()
Expire all cached contents


environmentChanged

public static void environmentChanged()
Called from external methods when the environment changed.


getStreamServers

public static java.util.List<com.flexive.stream.ServerLocation> getStreamServers()
Get a list of all available StreamServers

Returns:
list of all available StreamServers