net.firstpartners.rp.common.util
Class Util

java.lang.Object
  extended by net.firstpartners.rp.common.util.Util

public class Util
extends java.lang.Object

Utility class

Version:
1.1
Author:
Firstpartners.net

Field Summary
(package private) static java.lang.String pathSep
          Path separator
 
Constructor Summary
Util()
           
 
Method Summary
static java.lang.String addFolder(java.lang.String startFolder, java.lang.String addedFolder)
          Get the folder using a base location and absolute path
static java.io.File[] getFileList(java.lang.String root)
          Get the file list of the specified path
static long getHash(java.lang.String value)
          Get the hashing value for the specified value
static java.lang.String getSearchTerm(java.lang.String value)
          Get the search term based upon the searcg query
static boolean isEmpty(java.lang.String value)
          Validate if one string is empty
static boolean isTimeExpired(long starttime, int maxTimeWaiting)
          Validate if the time is expired reported to a starttime
private static java.lang.String replacePathSep(java.lang.String value)
          Replace the characters from string iwth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pathSep

static final java.lang.String pathSep
Path separator

Constructor Detail

Util

public Util()
Method Detail

isEmpty

public static boolean isEmpty(java.lang.String value)
Validate if one string is empty

Parameters:
value - String to validate
Returns:
True if the value is empty, false otherwise

addFolder

public static java.lang.String addFolder(java.lang.String startFolder,
                                         java.lang.String addedFolder)
Get the folder using a base location and absolute path

Parameters:
startFolder - Base location
addedFolder - Absolute path
Returns:
The folder path by adding th absolute path to the base path

replacePathSep

private static java.lang.String replacePathSep(java.lang.String value)
Replace the characters from string iwth

Parameters:
value - Value to be process
Returns:
Replaced string

isTimeExpired

public static boolean isTimeExpired(long starttime,
                                    int maxTimeWaiting)
Validate if the time is expired reported to a starttime

Parameters:
starttime - Starttime
maxTimeWaiting - Wait time in msec
Returns:
True if there are more than maxtimemsec reported to starttime

getFileList

public static java.io.File[] getFileList(java.lang.String root)
Get the file list of the specified path

Parameters:
root - Root folder
Returns:
The list

getSearchTerm

public static java.lang.String getSearchTerm(java.lang.String value)
Get the search term based upon the searcg query

Parameters:
value - Search query
Returns:

getHash

public static long getHash(java.lang.String value)
Get the hashing value for the specified value

Parameters:
value - The value
Returns: