uPortal 2.3.2
API Documentation

org.jasig.portal
Class PropertiesManager

java.lang.Object
  extended byorg.jasig.portal.PropertiesManager

public class PropertiesManager
extends java.lang.Object

Provides access to properties and manages the portal base directory.

Since:
uPortal 2.0
Version:
$Revision: 1.9 $
Author:
Ken Weiner, kweiner@interactivebusiness.com

Constructor Summary
PropertiesManager()
           
 
Method Summary
static java.lang.String getProperty(java.lang.String name)
          Returns the value of a property for a given name.
static boolean getPropertyAsBoolean(java.lang.String name)
          Returns the value of a property for a given name.
static byte getPropertyAsByte(java.lang.String name)
          Returns the value of a property for a given name as a byte
static double getPropertyAsDouble(java.lang.String name)
          Returns the value of a property for a given name as a long
static float getPropertyAsFloat(java.lang.String name)
          Returns the value of a property for a given name as a float
static int getPropertyAsInt(java.lang.String name)
          Returns the value of a property for a given name as an int
static long getPropertyAsLong(java.lang.String name)
          Returns the value of a property for a given name as a long
static short getPropertyAsShort(java.lang.String name)
          Returns the value of a property for a given name as a short
static java.lang.String getPropertyUntrimmed(java.lang.String name)
          Returns the value of a property for a given name including any whitespace that may be at the beginning or end of the property value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesManager

public PropertiesManager()
Method Detail

getProperty

public static java.lang.String getProperty(java.lang.String name)
Returns the value of a property for a given name. Any whitespace is trimmed off the beginning and end of the property value.

Parameters:
name - the name of the requested property
Returns:
value the value of the property matching the requested name

getPropertyUntrimmed

public static java.lang.String getPropertyUntrimmed(java.lang.String name)
Returns the value of a property for a given name including any whitespace that may be at the beginning or end of the property value. A runtime exception is thrown if the property cannot be found.

Parameters:
name - the name of the requested property
Returns:
value the value of the property matching the requested name

getPropertyAsBoolean

public static boolean getPropertyAsBoolean(java.lang.String name)
Returns the value of a property for a given name. This method can be used if the property is boolean in nature and you want to make sure that true is returned if the property is set to "true", "yes", "y", or "on" (regardless of case), and false is returned in all other cases.

Parameters:
name - the name of the requested property
Returns:
value true if property is set to "true", "yes", "y", or "on" regardless of case, otherwise false

getPropertyAsByte

public static byte getPropertyAsByte(java.lang.String name)
Returns the value of a property for a given name as a byte

Parameters:
name - the name of the requested property
Returns:
value the property's value as a byte

getPropertyAsShort

public static short getPropertyAsShort(java.lang.String name)
Returns the value of a property for a given name as a short

Parameters:
name - the name of the requested property
Returns:
value the property's value as a short

getPropertyAsInt

public static int getPropertyAsInt(java.lang.String name)
Returns the value of a property for a given name as an int

Parameters:
name - the name of the requested property
Returns:
value the property's value as an int

getPropertyAsLong

public static long getPropertyAsLong(java.lang.String name)
Returns the value of a property for a given name as a long

Parameters:
name - the name of the requested property
Returns:
value the property's value as a long

getPropertyAsFloat

public static float getPropertyAsFloat(java.lang.String name)
Returns the value of a property for a given name as a float

Parameters:
name - the name of the requested property
Returns:
value the property's value as a float

getPropertyAsDouble

public static double getPropertyAsDouble(java.lang.String name)
Returns the value of a property for a given name as a long

Parameters:
name - the name of the requested property
Returns:
value the property's value as a long

uPortal 2.3.2
API Documentation