Examples of MadvocException


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

Examples of jodd.madvoc.MadvocException

* 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

Examples of jodd.madvoc.MadvocException

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

Examples of jodd.madvoc.MadvocException

* 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

Examples of jodd.madvoc.MadvocException

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

Examples of jodd.madvoc.MadvocException

    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

Examples of jodd.madvoc.MadvocException

   * 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

Examples of jodd.madvoc.MadvocException

   * 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

Examples of jodd.madvoc.MadvocException

    }
    boolean isDuplicate = set.add(actionConfig);

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

    // finally
View Full Code Here

Examples of jodd.madvoc.MadvocException

   */
  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
Copyright © 2018 www.massapi.com. 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.