Package org.strecks.exceptions

Examples of org.strecks.exceptions.ApplicationConfigurationException


      // check for implicity controllers
      controllerClass = checkImplicitController(actionClass);

      if (controllerClass == null)
      {
        throw new ApplicationConfigurationException(actionClass.getName()
            + " is not a Struts Action subclass and does not have a " + Controller.class.getName()
            + " annotation");
      }
    }
    else
    {
      controllerClass = controller.name();
    }

    if (!ControllerAction.class.isAssignableFrom(controllerClass))
    {
      throw new ApplicationConfigurationException(actionClass.getName() + " has a controller class "
          + controllerClass.getName() + " which does not implement the " + ControllerAction.class.getName()
          + " interface");
    }
    if (!Action.class.isAssignableFrom(controllerClass))
    {
      throw new ApplicationConfigurationException(actionClass.getName() + " is has a "
          + Controller.class.getName() + " annotation which points to the class " + controllerClass.getName()
          + " which is not a Struts Action subclass");
    }
    return controllerClass;
  }
View Full Code Here


    ValidatorWrapper wrapper = next.getWrapper();
    converterType = wrapper.getParameterizedType();

    if (converterType.isInterface())
    {
      throw new ApplicationConfigurationException("Class " + declaringClass.getName() + ", property "
          + orderedProperty.getPropertyName()
          + " uses validators for which the most concrete parameterized type " + converterType.getName()
          + " is an interface. It must be an instantiable concrete class");
    }

    if (Modifier.isAbstract(converterType.getModifiers()))
    {
      throw new ApplicationConfigurationException("Class " + declaringClass.getName() + ", property "
          + orderedProperty.getPropertyName()
          + " uses validators for which the most concrete parameterized type " + converterType.getName()
          + " is an abstract class. It must be an instantiable concrete class");
    }
View Full Code Here

      Class<?> currentClass = current.getWrapper().getParameterizedType();
      Class<?> nextClass = next.getWrapper().getParameterizedType();

      if (!nextClass.isAssignableFrom(currentClass))
      {
        throw new ApplicationConfigurationException("Class " + declaringClass.getName() + ", property "
            + orderedProperty.getPropertyName() + " uses validators with parameterized types "
            + currentClass.getName() + " and " + nextClass.getName() + " which are not type compatible");
      }

      current = next;
View Full Code Here

  {
    Method getter = ReflectHelper.getGetter(method);

    if (getter == null)
    {
      throw new ApplicationConfigurationException("Setter method " + method
          + " has no corresponding getter method");
    }
    return getter;
  }
View Full Code Here

    if (!isTypeCompatible)
    {
      Class genericClass = ReflectHelper.getGenericType(validatorClass, interfaceClass);

      throw new ApplicationConfigurationException("Class " + getter.getDeclaringClass().getName()
          + " has property " + propertyName + " whose return type " + getter.getReturnType().getName()
          + " does not match the type " + genericClass.getName() + " of the validator used by annotation @"
          + annotationType.getSimpleName());

    }
View Full Code Here

  private void checkIsSetter(Method method)
  {
    if (!ReflectHelper.isSetter(method))
    {
      throw new ApplicationConfigurationException("Invalid Validation annotation for method " + method
          + ": annotation only supports setter properties");
    }
  }
View Full Code Here

      if (factoryClass != null)
      {

        if (found)
        {
          throw new ApplicationConfigurationException(
              "Only one converter annotation may be placed in method " + method.getName()
                  + "() in class " + method.getDeclaringClass().getName());
        }

        ConverterFactory factory = ReflectHelper.createInstance(factoryClass.value(),
View Full Code Here

      if (beanSourceReaderClass != null)
      {
        if (found == true)
        {
          throw new ApplicationConfigurationException(
              "Action bean class "
                  + actionClass.getName()
                  + " has more than one bean source annotation, that is, annotations which themselves use the annotation "
                  + BeanSourceReaderClass.class.getName());
        }
View Full Code Here

      return true;
    }
    else
    {
      throw new ApplicationConfigurationException("No annotation using the @"
          + NavigationInfo.class.getSimpleName()
          + " annotation found. This is needed to determine the navigation for the action bean "
          + actionBeanClass);
    }
View Full Code Here

    {
      Class returnType = extractionMethod.getReturnType();

      if (!genericType.isAssignableFrom(returnType))
      {
        throw new ApplicationConfigurationException("The return type of " + extractionMethod.getName()
            + "() in " + extractionMethod.getDeclaringClass().getName()
            + " is not compatible with the parameterized generic type " + genericType
            + " of the navigation handler " + navigationHandlerClass.getName());

      }
View Full Code Here

TOP

Related Classes of org.strecks.exceptions.ApplicationConfigurationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.