02/28/2005
 

com.epicentric.common
Class Props

java.lang.Object
  |
  +--com.epicentric.common.Props

Deprecated. as of 7.2, to be removed in 9.0. Replaced by PortalSystem

public class Props
extends Object

Handles loading the Vignette Portal configuration file and other configuration information into Java's System.properties. Note: Historically, the loading of Props has meant loading the properties into the java.lang.System properties. With the deprecation of this class, that feature is also deprecated and should not be relied upon when this class is removed (i.e. you should always use PortalSystem and not the System properties).


Constructor Summary
Props()
          Deprecated.  
 
Method Summary
static Map enrichDataStructure(Properties props)
          Deprecated. as of 7.2, to be removed in 9.0. Use java's built-in capabilities for this.
static Properties filter(Properties props, String base)
          Deprecated. as of 7.2, to be removed in 9.0. Use java's built-in capabilities for this.
static String getCustomPropertiesFilename()
          Deprecated. as of 7.2, to be removed in 9.0. No replacement.
static Properties getProperties()
          Deprecated. as of 7.2, to be removed in 9.0. Replaced by PortalSystem.getProperties()
static Properties getPropertiesFromFile(File file)
          Deprecated. as of 7.2, to be removed in 9.0. Use java's built-in capabilities for this.
static Properties getPropertiesFromFile(Properties defaults, File file)
          Deprecated. as of 7.2, to be removed in 9.0. Use java's built-in capabilities for this.
static String getProperty(String key)
          Deprecated. as of 7.2, to be removed in 9.0. Replaced by PortalSystem.getProperties()
static String getProperty(String key, String defaultValue)
          Deprecated. as of 7.2, to be removed in 9.0. Replaced by PortalSystem.getProperties()
static boolean isCustomPropertiesFileLoaded()
          Deprecated. as of 7.2, to be removed in 9.0. No replacement.
static boolean isLoaded()
          Deprecated. as of 7.2, to be removed in 9.0. No replacement.
static void justLoadProperties(String custom_properties_filename, boolean verbose)
          Deprecated. as of 7.2, to be removed in 9.0. No replacement.
static void load()
          Deprecated. as of 7.2, to be removed in 9.0. No replacement.
static void load(String custom_properties_filename)
          Deprecated. as of 7.2, to be removed in 9.0. No replacement.
static void load(String custom_properties_filename, boolean verbose)
          Deprecated. as of 7.2, to be removed in 9.0. No replacement.
static boolean save(File file, Properties properties)
          Deprecated. as of 7.2, to be removed in 9.0. Use java's built-in capabilities for this.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Props

public Props()
Deprecated. 
Method Detail

isLoaded

public static boolean isLoaded()
Deprecated. as of 7.2, to be removed in 9.0. No replacement.

Checks whether properties have been loaded and other initialization has occurred.
Returns:
true if loading and initializing was successful; otherwise false

load

public static void load()
Deprecated. as of 7.2, to be removed in 9.0. No replacement.

Loads "properties.txt" as the local override file, on top of core properties. Use load(String) to load a different properties file. (This method has been "undeprecated". The default properties file to be loaded is "properties.txt".)
See Also:
Props.load(String)

load

public static void load(String custom_properties_filename)
Deprecated. as of 7.2, to be removed in 9.0. No replacement.

Loads the default Vignette system properties (from the default Vignette properties file), then loads any properties found in the specified custom properties file. This method looks for the custom properties file only in the config subdirectory of the Vignette Portal installation directory. This method also sets the existing properties' "user.dir" and "user.home" to the Vignette Portal install directory,

load

public static void load(String custom_properties_filename,
                        boolean verbose)
Deprecated. as of 7.2, to be removed in 9.0. No replacement.

Loads properties, as in load(String), but makes the printing of diagnostic messages optional.

justLoadProperties

public static void justLoadProperties(String custom_properties_filename,
                                      boolean verbose)
Deprecated. as of 7.2, to be removed in 9.0. No replacement.

Loads properties without doing other Vignette Portal initialization. This method is for utility programs that access Vignette Portal properties.

getPropertiesFromFile

public static Properties getPropertiesFromFile(File file)
Deprecated. as of 7.2, to be removed in 9.0. Use java's built-in capabilities for this.

Returns a Properties object filled with the properties read from the given file. Returns null if there's an error reading the file.

getPropertiesFromFile

public static Properties getPropertiesFromFile(Properties defaults,
                                               File file)
Deprecated. as of 7.2, to be removed in 9.0. Use java's built-in capabilities for this.

Returns a Properties object filled with both the given defaults and with the properties read from the given file. Returns null if there is an error reading the file.

save

public static boolean save(File file,
                           Properties properties)
Deprecated. as of 7.2, to be removed in 9.0. Use java's built-in capabilities for this.

Writes the given Properties object out to a given file.
Parameters:
file - Name of the output file. If file already exists, it is first deleted.
properties - Name of the Properties object
Returns:
true if file written successfully; otherwise false

getCustomPropertiesFilename

public static String getCustomPropertiesFilename()
Deprecated. as of 7.2, to be removed in 9.0. No replacement.

Returns the full absolute pathname of the custom properties file for this installation, or null if no custom file was specified. This method will return the name even if the file doesn't exist or wasn't successfully loaded as a properties file. To see if the custom file was successfully used, use isCustomPropertiesFileLoaded().
See Also:
Props.isCustomPropertiesFileLoaded()

isCustomPropertiesFileLoaded

public static boolean isCustomPropertiesFileLoaded()
Deprecated. as of 7.2, to be removed in 9.0. No replacement.

Returns true if a custom properties file was specified and loaded successfully.
See Also:
Props.getCustomPropertiesFilename()

filter

public static Properties filter(Properties props,
                                String base)
Deprecated. as of 7.2, to be removed in 9.0. Use java's built-in capabilities for this.

Filters a Properties object such that a new Properties object contains a ?scoped? subset of the properties. For example, an original set of properties contains these keys: a.prop1, a.prop2, a.prop3, b.prop4, and b.prop5. If this method is called with the base set to "b", the resulting Properties object will contain these keys: "prop4" and "prop5". Each of the keys returned will have the original value of that key (e.g., if b.prop4="blue", then the returned Property object will contain the property prop4="blue").
Parameters:
props - The properties to be filtered
base - The base scope of the properties to be extracted
Returns:
A subset of properties

enrichDataStructure

public static Map enrichDataStructure(Properties props)
Deprecated. as of 7.2, to be removed in 9.0. Use java's built-in capabilities for this.

Sorts all properties such that the first part of a property name is the key in a mapping between Property sets and the properties for each set. For example, with the keys a.prop1, a.prop2, b.prop3, c.prop4, the resulting Map would contain keys "a", "b", and "c". Key "a" would map to a Properties object containing properties "prop1" and "prop2", key "b" would map to a Properties object containing "prop3", and key "c" would map to a Properties object containing "prop4".
Parameters:
props - The Properties to be enriched/sorted.
Returns:
A Map of property set name to properties in the set.

getProperty

public static String getProperty(String key)
Deprecated. as of 7.2, to be removed in 9.0. Replaced by PortalSystem.getProperties()

Check both the System properties and encrypted properties for the requested property and return it if found. If the property exists in both places, the System property will be returned.

getProperty

public static String getProperty(String key,
                                 String defaultValue)
Deprecated. as of 7.2, to be removed in 9.0. Replaced by PortalSystem.getProperties()

Check both the System properties and encrypted properties for the requested property and return it if found. If the property exists in both places, the System property will be returned. Return the specified default value if the property is not found.

getProperties

public static Properties getProperties()
Deprecated. as of 7.2, to be removed in 9.0. Replaced by PortalSystem.getProperties()

Get the Vignette properties. These include the system properties plus any other Vignette specific properties.

02/28/2005
 

Copyright and Trademark Notices