org.apache.myfaces.extensions.cdi.scripting.impl.util
Class ExceptionUtils

java.lang.Object
  extended by org.apache.myfaces.extensions.cdi.scripting.impl.util.ExceptionUtils

@Typed
public abstract class ExceptionUtils
extends Object

Helper methods for exceptions


Method Summary
static RuntimeException ambiguousLanguageDefinition(Class<? extends Language> id, Language foundLanguage, Language newLanguage)
          Creates an exception if there are multiple language types
static RuntimeException noScriptingLanguageAvailable()
          Creates an exception if there is no script-language type available
static RuntimeException noScriptingLanguageAvailableFor(Class<? extends Language> languageType)
          Creates an exception if the type of the script-language isn't known
static RuntimeException overrideBuilderState(String newValueHint)
          Creates an exception if e.g. bindings would be overruled
static RuntimeException unknownScriptingLanguage(String name)
          Creates an exception if the script-language isn't known
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

unknownScriptingLanguage

public static RuntimeException unknownScriptingLanguage(String name)
Creates an exception if the script-language isn't known

Parameters:
name - unknown name
Returns:
exception which can be thrown

noScriptingLanguageAvailable

public static RuntimeException noScriptingLanguageAvailable()
Creates an exception if there is no script-language type available

Returns:
exception which can be thrown

noScriptingLanguageAvailableFor

public static RuntimeException noScriptingLanguageAvailableFor(Class<? extends Language> languageType)
Creates an exception if the type of the script-language isn't known

Parameters:
languageType - unknown language type
Returns:
exception which can be thrown

ambiguousLanguageDefinition

public static RuntimeException ambiguousLanguageDefinition(Class<? extends Language> id,
                                                           Language foundLanguage,
                                                           Language newLanguage)
Creates an exception if there are multiple language types

Parameters:
id - language id
foundLanguage - registered language
newLanguage - found language
Returns:
exception which can be thrown

overrideBuilderState

public static RuntimeException overrideBuilderState(String newValueHint)
Creates an exception if e.g. bindings would be overruled

Parameters:
newValueHint - name of the argument
Returns:
exception which can be thrown


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.