Package jodd.madvoc

Source Code of jodd.madvoc.AppendingInterceptor$Hey

// Copyright (c) 2003-2014, Jodd Team (jodd.org). All Rights Reserved.

package jodd.madvoc;

import jodd.madvoc.action.IntcptAction;
import jodd.madvoc.interceptor.BaseActionInterceptor;

public class AppendingInterceptor extends BaseActionInterceptor {

  public static class Hey extends AppendingInterceptor {
  }

  private String addon = "<?>";
  public String getAddon() {
    return addon;
  }

  public void setAddon(String addon) {
    this.addon = addon;
  }

  public Object intercept(ActionRequest actionRequest) throws Exception {
    Object result =  actionRequest.invoke();

    Object action = actionRequest.getAction();

    if (action instanceof IntcptAction) {
      IntcptAction intcptAction = (IntcptAction) action;
      intcptAction.value += addon;
    }

    return result;
  }
}
TOP

Related Classes of jodd.madvoc.AppendingInterceptor$Hey

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.