com.arsdigita.populate
Class Utilities

java.lang.Object
  extended bycom.arsdigita.populate.Utilities

public class Utilities
extends Object

Author:
bche

Constructor Summary
Utilities()
           
 
Method Summary
static User getAdminUser()
          Method getAdminUser.
static String getBaseString(String sSeed)
          Returns a string appropriate for using in data fields, based upon the String sSeed.
static File getBinaryFile()
          Returns a binary (image/gif) file
static String getUniqueBaseString()
          Returns a string guranteed to be unique for every second that this method is run.
static List getUsersIDs(int numUsers)
          Returns a list of at most numUsers BigDecimal User ID's
static String makeText(int iIndex)
          Method makeText.
static String makeTextBody()
          Method makeText.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utilities

public Utilities()
Method Detail

getUniqueBaseString

public static String getUniqueBaseString()
Returns a string guranteed to be unique for every second that this method is run. Appropriate for using in data fields that require unique values

Returns:
a string guranteed to be unique for every second that this method is run.

getBaseString

public static String getBaseString(String sSeed)
Returns a string appropriate for using in data fields, based upon the String sSeed. If sSeed is null or empty, returns a random string. Otherwise, always returns the same string based upon sSeed.

Parameters:
sSeed - the seed String value for constructing the base String
Returns:
a base String based upon sSeed if sSeed is not null or empty. Otherwise, a random base String.

getBinaryFile

public static File getBinaryFile()
Returns a binary (image/gif) file

Returns:
a binary (image/gif) File

makeText

public static String makeText(int iIndex)
Method makeText. Returns a text string

Parameters:
iIndex - an index to place at the beginning of the returned string in order to make it unique
Returns:
String

makeTextBody

public static String makeTextBody()
Method makeText. Returns a text string

Returns:
String

getAdminUser

public static User getAdminUser()
Method getAdminUser. Returns a system administrator user

Returns:
User

getUsersIDs

public static List getUsersIDs(int numUsers)
Returns a list of at most numUsers BigDecimal User ID's

Parameters:
numUsers - at most the number of User ID's to return
Returns:
a List of BigDecimal User ID's


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC