org.mule.util
Class PropertiesHelper

java.lang.Object
  extended byorg.mule.util.PropertiesHelper

public class PropertiesHelper
extends java.lang.Object

PropertiesHelper is a utility class for manipulating and filtering property Maps.

Version:
$Revision: 1.1.1.1 $
Author:
Ross Mason

Constructor Summary
PropertiesHelper()
           
 
Method Summary
static boolean getBooleanProperty(java.util.Map props, java.lang.Object key, boolean defaultValue)
           
static boolean getBooleanValue(java.lang.Object value)
           
static double getDoubleProperty(java.util.Map props, java.lang.Object key, double defaultValue)
           
static int getIntProperty(java.util.Map props, java.lang.Object key, int defaultValue)
           
static int getIntValue(java.lang.Object value)
           
static long getLongProperty(java.util.Map props, java.lang.Object key, long defaultValue)
           
static long getLongValue(java.lang.Object value)
           
static java.util.Properties getPropertiesFromQueryString(java.lang.String query)
           
static java.util.Map getPropertiesWithoutPrefix(java.util.Map props, java.lang.String prefix)
           
static java.util.Map getPropertiesWithPrefix(java.util.Map props, java.lang.String prefix)
           
static java.lang.Object getProperty(java.util.Map props, java.lang.Object key, java.lang.Object defaultValue)
           
static java.lang.String getStringProperty(java.util.Map props, java.lang.Object key, java.lang.String defaultValue)
           
static java.util.Properties loadProperties(java.lang.String fileName)
          This method reads the file in to a java.util.Properties object and returns it.
static java.lang.String removeNamespacePrefix(java.lang.String eleName)
           
static java.util.HashMap removeNamspaces(java.util.HashMap properties)
           
static java.lang.String removeXmlNamespacePrefix(java.lang.String eleName)
           
static java.util.Map reverseProperties(java.util.Map props)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesHelper

public PropertiesHelper()
Method Detail

loadProperties

public static java.util.Properties loadProperties(java.lang.String fileName)
                                           throws java.lang.Exception
This method reads the file in to a java.util.Properties object and returns it.

Throws:
java.lang.Exception

removeXmlNamespacePrefix

public static java.lang.String removeXmlNamespacePrefix(java.lang.String eleName)

removeNamespacePrefix

public static java.lang.String removeNamespacePrefix(java.lang.String eleName)

removeNamspaces

public static java.util.HashMap removeNamspaces(java.util.HashMap properties)

getProperty

public static java.lang.Object getProperty(java.util.Map props,
                                           java.lang.Object key,
                                           java.lang.Object defaultValue)

getStringProperty

public static java.lang.String getStringProperty(java.util.Map props,
                                                 java.lang.Object key,
                                                 java.lang.String defaultValue)

getIntProperty

public static int getIntProperty(java.util.Map props,
                                 java.lang.Object key,
                                 int defaultValue)

getLongProperty

public static long getLongProperty(java.util.Map props,
                                   java.lang.Object key,
                                   long defaultValue)

getDoubleProperty

public static double getDoubleProperty(java.util.Map props,
                                       java.lang.Object key,
                                       double defaultValue)

getBooleanProperty

public static boolean getBooleanProperty(java.util.Map props,
                                         java.lang.Object key,
                                         boolean defaultValue)

reverseProperties

public static java.util.Map reverseProperties(java.util.Map props)

getIntValue

public static int getIntValue(java.lang.Object value)

getLongValue

public static long getLongValue(java.lang.Object value)

getBooleanValue

public static boolean getBooleanValue(java.lang.Object value)

getPropertiesWithPrefix

public static java.util.Map getPropertiesWithPrefix(java.util.Map props,
                                                    java.lang.String prefix)

getPropertiesWithoutPrefix

public static java.util.Map getPropertiesWithoutPrefix(java.util.Map props,
                                                       java.lang.String prefix)

getPropertiesFromQueryString

public static java.util.Properties getPropertiesFromQueryString(java.lang.String query)


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.