Package jodd.madvoc

Examples of jodd.madvoc.MadvocException


   */
  protected <R extends T> R createWrapper(Class<R> wrapperClass) {
    try {
        return wrapperClass.newInstance();
    } catch (Exception ex) {
      throw new MadvocException("Invalid Madvoc wrapper: " + wrapperClass, ex);
    }
  }
View Full Code Here


* during action registration.
*/
public final class DefaultWebAppInterceptors extends BaseActionInterceptor {

  public String intercept(ActionRequest actionRequest) throws Exception {
    throw new MadvocException(this.getClass().getSimpleName() + " is just a marker");
  }
View Full Code Here

   */
  protected PathMacros createPathMacro() {
    try {
      return madvocConfig.getPathMacroClass().newInstance();
    } catch (Exception ex) {
      throw new MadvocException(ex);
    }
  }
View Full Code Here

* during action registration.
*/
public final class DefaultWebAppFilters extends BaseActionFilter {

  public String filter(ActionRequest actionRequest) throws Exception {
    throw new MadvocException(this.getClass().getSimpleName() + " is just a marker");
  }
View Full Code Here

  private static FileInputStream createFileInputStream(File file) {
    try {
      return new FileInputStream(file);
    } catch (FileNotFoundException fis) {
      throw new MadvocException(fis);
    }
  }
View Full Code Here

    try {
      namingStrategy = actionPathNamingStrategy.newInstance();

      contextInjectorComponent.injectContext(new Target(namingStrategy));
    } catch (Exception ex) {
      throw new MadvocException(ex);
    }

    return namingStrategy.buildActionDef(actionClass, actionMethod, actionNames);
  }
View Full Code Here

   * Resolves action method for given action class ane method name.
   */
  public Method resolveActionMethod(Class<?> actionClass, String methodName) {
    MethodDescriptor methodDescriptor = ClassIntrospector.lookup(actionClass).getMethodDescriptor(methodName, false);
    if (methodDescriptor == null) {
      throw new MadvocException("Public method not found: " + actionClass.getSimpleName() + "#" + methodName);
    }
    return methodDescriptor.getMethod();
  }
View Full Code Here

   * Registers action with provided action signature.
   */
  public ActionConfig register(String actionSignature, ActionDef actionDef) {
    int ndx = actionSignature.indexOf('#');
    if (ndx == -1) {
      throw new MadvocException("Madvoc action signature syntax error: " + actionSignature);
    }
    String actionClassName = actionSignature.substring(0, ndx);
    String actionMethodName = actionSignature.substring(ndx + 1);
    Class actionClass;
    try {
      actionClass = ClassLoaderUtil.loadClass(actionClassName);
    } catch (ClassNotFoundException cnfex) {
      throw new MadvocException("Madvoc action class not found: " + actionClassName, cnfex);
    }
    return register(actionClass, actionMethodName, actionDef);
  }
View Full Code Here

    }
    boolean isDuplicate = set.add(actionConfig);

    if (madvocConfig.isDetectDuplicatePathsEnabled()) {
      if (isDuplicate) {
        throw new MadvocException("Duplicate action path for " + actionConfig);
      }
    }

    // finally
View Full Code Here

   */
  protected ActionResult createResult(Class<? extends ActionResult> actionResultClass) {
    try {
      return actionResultClass.newInstance();
    } catch (Exception ex) {
      throw new MadvocException("Invalid Madvoc result: " + actionResultClass, ex);
    }
  }
View Full Code Here

TOP

Related Classes of jodd.madvoc.MadvocException

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.