View Javadoc

1   package org.kuali.ole.ingest.function;
2   
3   import org.kuali.rice.krms.framework.engine.Function;
4   
5   import java.util.ArrayList;
6   import java.util.Date;
7   
8   /**
9    * Created with IntelliJ IDEA.
10   * User: vivekb
11   * Date: 6/25/12
12   * Time: 3:45 PM
13   * To change this template use File | Settings | File Templates.
14   */
15  public class PatronMembershipExpiration implements Function {
16      @Override
17      public Object invoke(Object... arguments) {
18          Object argument = arguments[0];
19          Date expirationDate =(Date)((ArrayList) argument).get(0);
20          return checkMembershipExpirationDate(expirationDate);
21      }
22      private boolean checkMembershipExpirationDate(Date expDate){
23          Date curDat = new Date();
24          if(expDate.compareTo(curDat)>=0){
25              return  true;
26          }
27          return false;
28      }
29  }