implemented the system administrator function "Import User Accounts," allowing

a sysadmin to create mass quantities of user accounts automatically by
uploading an XML file
This commit is contained in:
Eric J. Bowersox
2001-11-24 05:04:10 +00:00
parent f5a5009932
commit 4e251e72e1
29 changed files with 2285 additions and 922 deletions

View File

@@ -49,7 +49,7 @@ public class StringUtil
* @return The SQL-encoded equivalent of <CODE>str</CODE>. If <CODE>str</CODE> is
* <B><CODE>null</CODE></B>, returns <B><CODE>null</CODE></B>.
*/
public static String encodeStringSQL(String str)
public static final String encodeStringSQL(String str)
{
if (str==null)
return null; // safety feature
@@ -81,7 +81,7 @@ public class StringUtil
* @return The HTML-encoded equivalent of <CODE>str</CODE>. If <CODE>str</CODE> is
* <B><CODE>null</CODE></B>, returns <B><CODE>null</CODE></B>.
*/
public static String encodeHTML(String str)
public static final String encodeHTML(String str)
{
if (str==null)
return null; // safety feature
@@ -134,7 +134,7 @@ public class StringUtil
* @return <B><CODE>true</CODE></B> if the given string is <B><CODE>null</CODE></B> or a string of
* length 0, <B><CODE>false</CODE></B> otherwise.
*/
public static boolean isStringEmpty(String s)
public static final boolean isStringEmpty(String s)
{
return ((s==null) || (s.length()==0));
@@ -157,7 +157,7 @@ public class StringUtil
* of the <CODE>find</CODE> string will be deleted.
* @return The <CODE>base</CODE> string with all replacements made as detailed above.
*/
public static String replaceAllInstances(String base, String find, String replace)
public static final String replaceAllInstances(String base, String find, String replace)
{
if ((base==null) || isStringEmpty(find))
return base; // safety feature
@@ -204,7 +204,7 @@ public class StringUtil
* <CODE>base</CODE>.
* @return The <CODE>base</CODE> string with all variable substitutions made as detailed above.
*/
public static String replaceAllVariables(String base, Map vars)
public static final String replaceAllVariables(String base, Map vars)
{
if ((base==null) || (vars==null) || (vars.size()==0))
return base; // safety feature
@@ -244,5 +244,39 @@ public class StringUtil
} // end replaceAllVariables
public static final String join(Object[] arr, String separator)
{
StringBuffer buf = null;
for (int i=0; i<arr.length; i++)
{ // put it all together
if (buf==null)
buf = new StringBuffer(arr[i].toString());
else
buf.append(separator).append(arr[i].toString());
} // end for
return (buf==null) ? null : buf.toString();
} // end join
public static final String join(List l, String separator)
{
StringBuffer buf = null;
Iterator it = l.iterator();
while (it.hasNext())
{ // put it all together
Object o = it.next();
if (buf==null)
buf = new StringBuffer(o.toString());
else
buf.append(separator).append(o.toString());
} // end for
return (buf==null) ? null : buf.toString();
} // end join
} // end class StringUtil