1 24 package org.ofbiz.minilang.method.entityops; 25 26 import org.w3c.dom.*; 27 28 import org.ofbiz.minilang.*; 29 import org.ofbiz.minilang.method.*; 30 31 38 public class NowDateToEnv extends MethodOperation { 39 40 ContextAccessor envAcsr; 41 42 public NowDateToEnv(Element element, SimpleMethod simpleMethod) { 43 super(element, simpleMethod); 44 envAcsr = new ContextAccessor(element.getAttribute("env-name")); 45 } 46 47 public boolean exec(MethodContext methodContext) { 48 envAcsr.put(methodContext, new java.sql.Date (System.currentTimeMillis())); 49 return true; 50 } 51 52 public String rawString() { 53 return "<now-date-to-env/>"; 55 } 56 public String expandedString(MethodContext methodContext) { 57 return this.rawString(); 59 } 60 } 61 | Popular Tags |