congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
jodd.madvoc
Code IndexAdd Tabnine to your IDE (free)

How to use jodd.madvoc

Best Java code snippets using jodd.madvoc (Showing top 20 results out of 315)

origin: oblac/jodd

/**
 * Maps a DELETE path.
 */
public ActionBuilder delete(final String path) {
  return new ActionBuilder().path(path).httpMethod("DELETE");
}
/**
origin: oblac/jodd

/**
 * Defines HTTP method name and action path.
 * @see #path(String)
 */
public ActionBuilder path(final String method, final String path) {
  this.method = method;
  return path(path);
}
origin: oblac/jodd

public AutomagicMadvocConfigurator(final ClassScanner classScanner) {
  actionClassSuffix = "Action";
  this.classScanner = classScanner;
  registerAsConsumer(classScanner);
}
origin: oblac/jodd

@Test
void testFiltersPassAndInterceptorsStop3() throws Exception {
  MyActionRequest actionRequest = createMyActionRequest(
      arr(new FilterPass(1), new FilterPass(2)),
      arr(new InterceptorPass(1), new InterceptorStop(), new InterceptorPass(3))
  );
  actionRequest.invoke();
  assertEquals("-F1-F2-I1-x-i1-R-f2-f1", actionRequest.data);
}
origin: oblac/jodd

  @Override
  public Object intercept(ActionRequest actionRequest) throws Exception {
    ((MyActionRequest)actionRequest).data += "-I"+i;
    Object result = actionRequest.invoke();
    ((MyActionRequest)actionRequest).data += "-i"+i;
    return result;
  }
}
origin: oblac/jodd

/**
 * Throws an exception, as stack can not be invoked.
 */
@Override
public Object apply(final ActionRequest actionRequest) {
  throw new MadvocException("Wrapper stack can not be invoked");
}
origin: oblac/jodd

/**
 * Stops Madvoc.
 */
@Override
public void contextDestroyed(final ServletContextEvent servletContextEvent) {
  madvoc.stopWebApplication();
}
origin: oblac/jodd

  @Override
  protected Object invokeActionMethod() throws Exception {
    data += "-A";
    return super.invokeActionMethod();
  }
}
origin: oblac/jodd

/**
 * Invokes the action and returns action result value object.
 * Invokes all interceptors before and after action invocation.
 */
public Object invoke() throws Exception {
  return executionArray[executionIndex++].apply(this);
}
origin: oblac/jodd

/**
 * Starts with action registration i.e. route binding.
 */
public ActionBuilder route() {
  return new ActionBuilder();
}
origin: oblac/jodd

@Test
void testFiltersStopAndInterceptorsPass2() throws Exception {
  MyActionRequest actionRequest = createMyActionRequest(
      arr(new FilterPass(1), new FilterStop()),
      arr(new InterceptorPass(1), new InterceptorPass(2))
  );
  actionRequest.invoke();
  assertEquals("-F1-X-f1", actionRequest.data);
}
origin: oblac/jodd

/**
 * Maps a GET path.
 */
public ActionBuilder get(final String path) {
  return new ActionBuilder().path(path).httpMethod("GET");
}
/**
origin: oblac/jodd

  @Override
  public Object filter(ActionRequest actionRequest) throws Exception {
    ((MyActionRequest)actionRequest).data += "-F" + i;
    Object result = actionRequest.invoke();
    ((MyActionRequest)actionRequest).data += "-f" + i;
    return result;
  }
}
origin: oblac/jodd

@Test
void testFiltersStopAndInterceptorsPass1() throws Exception {
  MyActionRequest actionRequest = createMyActionRequest(
      arr(new FilterStop(), new FilterPass(2)),
      arr(new InterceptorPass(1), new InterceptorPass(2))
  );
  actionRequest.invoke();
  assertEquals("-X", actionRequest.data);
}
origin: oblac/jodd

/**
 * Maps a PUT path.
 */
public ActionBuilder put(final String path) {
  return new ActionBuilder().path(path).httpMethod("PUT");
}
/**
origin: oblac/jodd

@Test
void testFiltersPassAndInterceptorsStop1() throws Exception {
  MyActionRequest actionRequest = createMyActionRequest(
      arr(new FilterPass(1), new FilterPass(2)),
      arr(new InterceptorPass(1), new InterceptorStop())
  );
  actionRequest.invoke();
  assertEquals("-F1-F2-I1-x-i1-R-f2-f1", actionRequest.data);
}
origin: oblac/jodd

/**
 * Maps an OPTION path.
 */
public ActionBuilder options(final String path) {
  return new ActionBuilder().path(path).httpMethod("OPTIONS");
}
origin: oblac/jodd

@Test
void testFiltersPassAndInterceptorsStop2() throws Exception {
  MyActionRequest actionRequest = createMyActionRequest(
      arr(new FilterPass(1), new FilterPass(2)),
      arr(new InterceptorStop(), new InterceptorPass(2))
  );
  actionRequest.invoke();
  assertEquals("-F1-F2-x-R-f2-f1", actionRequest.data);
}
origin: oblac/jodd

/**
 * Maps a POST path.
 */
public ActionBuilder post(final String path) {
  return new ActionBuilder().path(path).httpMethod("POST");
}
/**
origin: oblac/jodd

@Test
void testFiltersPassAndInterceptorsPass() throws Exception {
  MyActionRequest actionRequest = createMyActionRequest(
      arr(new FilterPass(1), new FilterPass(2)),
      arr(new InterceptorPass(1), new InterceptorPass(2))
  );
  actionRequest.invoke();
  assertEquals("-F1-F2-I1-I2-A-i2-i1-R-f2-f1", actionRequest.data);
}
jodd.madvoc

Most used classes

  • ActionRequest
    Encapsulates single action invocation and acts as an action proxy. It invokes all assigned action in
  • In
  • ActionsManager
    Manages all Madvoc action registrations.
  • MadvocUtil
    Few madvoc utilities.
  • MadvocContainer
  • MadvocEncoding,
  • ResultMapper,
  • ActionRuntime,
  • DefaultActionConfig,
  • ActionConfigManager,
  • ActionMethodParser,
  • InterceptorsManager,
  • EchoInterceptor,
  • MadvocAction,
  • Out,
  • MadvocContext,
  • ProxettaSupplier,
  • JsonResult,
  • ActionConfig
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now