adapforms.util
Class Util

java.lang.Object
  extended by adapforms.util.Util

public class Util
extends java.lang.Object

Various static utility methods used throughout the framework.

Author:
Henrik Gammelmark, geemark@cs.au.dk

Constructor Summary
Util()
           
 
Method Summary
static boolean checkAccess(java.lang.Object[] roles, java.lang.Object currentRole)
          Given a list of allowed roles and the current role of the instance, determine if access should be granted.
static boolean convertBoolean(java.lang.String input)
          Attempt to convert a string into a boolean value.
static javax.xml.parsers.DocumentBuilderFactory createXMLFactory()
          Obtain a pre-configured generic document builder factory for building and parsing XML documents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

checkAccess

public static boolean checkAccess(java.lang.Object[] roles,
                                  java.lang.Object currentRole)
Given a list of allowed roles and the current role of the instance, determine if access should be granted.


createXMLFactory

public static javax.xml.parsers.DocumentBuilderFactory createXMLFactory()
Obtain a pre-configured generic document builder factory for building and parsing XML documents.


convertBoolean

public static boolean convertBoolean(java.lang.String input)
                              throws java.lang.IllegalArgumentException
Attempt to convert a string into a boolean value.

Parameters:
input - Input string
Throws:
java.lang.IllegalArgumentException - If no proper conversion can be made