Package org.ngrinder.infra.spring

Examples of org.ngrinder.infra.spring.SpringContext


  @Before(EXECUTION_SAVE)
  public void beforeSave(JoinPoint joinPoint) {
    for (Object object : joinPoint.getArgs()) {
      // If the object is base model and it's on the servlet
      // context, It's not executed by task scheduling.
      SpringContext springContext = getSpringContext();
      if (object instanceof BaseModel
          && (springContext.isServletRequestContext() || springContext.isUnitTestContext())) {
        BaseModel<?> model = (BaseModel<?>) object;
        Date lastModifiedDate = new Date();
        model.setLastModifiedDate(lastModifiedDate);
        User currentUser = userContext.getCurrentUser();
        model.setLastModifiedUser(userRepository.findOne(currentUser.getId()));
View Full Code Here

TOP

Related Classes of org.ngrinder.infra.spring.SpringContext

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.