org.apache.taglibs.random
Class RandomStrg

java.lang.Object
  extended byorg.apache.taglibs.random.RandomStrg

public class RandomStrg
extends java.lang.Object

RandomStrg class will produce a variable set of random characters.

Version:
1.0
Author:
Rich Catlett

Constructor Summary
RandomStrg()
           
 
Method Summary
 void generateRandomObject()
          generate the Random object that will be used for this random number generator
 java.lang.String getRandom()
          get the randomly created string for use with the <jsp:getProperty name="id" property="randomstr"/>
 void setAlgorithm(java.lang.String value)
          set the algorithm name
 void setAllchars(boolean value)
          set the allchars flag
 void setHmap(java.util.HashMap map)
          set the hashmap that is used to check the uniqueness of random strings
 void setLength(java.lang.Integer value)
          set the length of the random string
 void setProvider(java.lang.String value)
          set the provider name
 void setRanges(java.util.ArrayList low, java.util.ArrayList up)
          set the ranges from which to choose the characters for the random string
 void setSingle(char[] chars, int value)
          set the array of single chars to choose from for this random string and the number of chars in the array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomStrg

public RandomStrg()
Method Detail

generateRandomObject

public final void generateRandomObject()
                                throws javax.servlet.jsp.JspException
generate the Random object that will be used for this random number generator

Throws:
javax.servlet.jsp.JspException

getRandom

public final java.lang.String getRandom()
get the randomly created string for use with the <jsp:getProperty name="id" property="randomstr"/>

Returns:
- randomly created string

setRanges

public final void setRanges(java.util.ArrayList low,
                            java.util.ArrayList up)
set the ranges from which to choose the characters for the random string

Parameters:
low - set of lower ranges
up - set of upper ranges

setHmap

public final void setHmap(java.util.HashMap map)
set the hashmap that is used to check the uniqueness of random strings

Parameters:
map - hashmap whose keys are used to insure uniqueness of random strgs

setLength

public final void setLength(java.lang.Integer value)
set the length of the random string

Parameters:
value - length of the random string

setAlgorithm

public final void setAlgorithm(java.lang.String value)
set the algorithm name

Parameters:
value - name of the algorithm to use for a SecureRandom object

setProvider

public final void setProvider(java.lang.String value)
set the provider name

Parameters:
value - name of the package to check for the algorithm

setAllchars

public final void setAllchars(boolean value)
set the allchars flag

Parameters:
value - boolean value of the allchars flag

setSingle

public final void setSingle(char[] chars,
                            int value)
set the array of single chars to choose from for this random string and the number of chars in the array

Parameters:
chars - the array of single chars
value - the number of single chars


Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.