Style Intelligence v12.0

inetsoft.sree
Class SreeEnv

java.lang.Object
  extended by inetsoft.sree.SreeEnv

public class SreeEnv
extends Object

StyleReport/EE environment properties setting. It loads the sree.properties file and inherits all properties from the system properties. If an application needs to modify properties used in SREE, it should change the property through this class. Some of the property is used at replet engine initialization time. Subsequent changes to the property may not affect the report generation.


Constructor Summary
SreeEnv()
           
 
Method Summary
static void clear()
          Clear and reload the properties.
static void clear(boolean all)
          Clear and reload the properties.
static inetsoft.util.Catalog.CatalogGetter getCatalogGetter()
          Get catalog getter.
static inetsoft.util.Catalog getEMCatalog()
          Get catalog for EM localization.
static String getPassword(String name)
          Get the value of a password property.
static String getPath(String path)
          Get physical file path.
static String getPath(String name, String def)
          Get a property value as a file path.
static Properties getProperties()
          Get all properties.
static String getProperty(String name)
          Get the value of a property.
static String getProperty(String name, String def)
          Get the value of a property.
static String getRelativePath(String name, String def)
          Get a property value from specific properties set as a file path, which is relative to the sree.home if sree.home is set
static AnalyticRepository getRepletRepository()
          Get a repository instance based on configuration parameters.
static inetsoft.util.Catalog getReportCatalog()
          Get catalog for report localization.
static void init()
          Initialize the environment.
static void init(String path)
          Initialize the environment.
static void load(String sreeHome)
          Deprecated. since 6.5
static void remove(String name)
          Remove the named property.
static void save()
          Saves the in-memory properties to the property file specified by the argument.
static void save(String location)
          Saves the in-memory properties to the property file specified by the argument.
static void setLogLevel(inetsoft.util.log.LogUtil.LogContext context, String name, Level level)
          Sets the level for a log context.
static void setPassword(String name, String value)
          Set the value of a password property.
static void setProperty(String name, String val)
          Set the value of a property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SreeEnv

public SreeEnv()
Method Detail

getCatalogGetter

public static inetsoft.util.Catalog.CatalogGetter getCatalogGetter()
Get catalog getter.


getProperty

public static String getProperty(String name)
Get the value of a property.

Parameters:
name - property name.
Returns:
property value.

getProperty

public static String getProperty(String name,
                                 String def)
Get the value of a property.

Parameters:
name - property name.
def - default value if the property is null.

getPath

public static String getPath(String name,
                             String def)
Get a property value as a file path. If the path is not absolute a sree.home is defined, the sree.home is prepended to the file name.

Parameters:
name - property name.
def - default value if the property is null.

getPath

public static String getPath(String path)
Get physical file path.

Parameters:
path - the specified logical file path.
Returns:
physical file path.

getRelativePath

public static String getRelativePath(String name,
                                     String def)
Get a property value from specific properties set as a file path, which is relative to the sree.home if sree.home is set

Parameters:
name - property name.
def - default value if the property is null.

setProperty

public static void setProperty(String name,
                               String val)
Set the value of a property.


setPassword

public static void setPassword(String name,
                               String value)
Set the value of a password property.

Parameters:
name - the name of the property.
value - the value of the property.

getPassword

public static String getPassword(String name)
Get the value of a password property.

Parameters:
name - the name of the property.
Returns:
the value of the property.

setLogLevel

public static void setLogLevel(inetsoft.util.log.LogUtil.LogContext context,
                               String name,
                               Level level)
Sets the level for a log context.

Parameters:
context - the type of log context.
name - the name of the log context.
level - the new level.

remove

public static void remove(String name)
Remove the named property.


getProperties

public static Properties getProperties()
Get all properties.


getRepletRepository

public static AnalyticRepository getRepletRepository()
                                              throws Exception
Get a repository instance based on configuration parameters.

Throws:
Exception

init

public static void init(String path)
                 throws IOException
Initialize the environment.

Parameters:
path - the initial property file path.
Throws:
IOException

clear

public static void clear()
Clear and reload the properties.


clear

public static void clear(boolean all)
Clear and reload the properties.

Parameters:
all - to clear properties in ReportEnv.

init

public static void init()
Initialize the environment.


load

public static void load(String sreeHome)
Deprecated. since 6.5

Loads the properties into memory from sree.properties in the specified directory. This file will load the property files but if the sree home is already set, and the new value is different from the original value, it may not re-initialize other components that depend on the sree home location.

Parameters:
sreeHome - - the directory containing the initial property file.

save

public static void save()
                 throws IOException
Saves the in-memory properties to the property file specified by the argument.

Throws:
IOException

save

public static void save(String location)
                 throws IOException
Saves the in-memory properties to the property file specified by the argument.

Parameters:
location - - the full (system-dependent) path of the file to which the properties are to be saved.
Throws:
IOException

getEMCatalog

public static inetsoft.util.Catalog getEMCatalog()
Get catalog for EM localization.


getReportCatalog

public static inetsoft.util.Catalog getReportCatalog()
Get catalog for report localization.


Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.