handling of created and cancelled properties
This commit is contained in:
parent
984d169e2c
commit
c1ac39ec78
@ -25,6 +25,10 @@ public class PacRemote extends AbstractRemote {
|
|||||||
resultMap.put("customer", pac.getCustomer().getName());
|
resultMap.put("customer", pac.getCustomer().getName());
|
||||||
resultMap.put("curinetaddr", pac.getCurINetAddr().getInetAddr());
|
resultMap.put("curinetaddr", pac.getCurINetAddr().getInetAddr());
|
||||||
resultMap.put("created", TextUtil.format(pac.getCreated()));
|
resultMap.put("created", TextUtil.format(pac.getCreated()));
|
||||||
|
Date cancelled = pac.getCancelled();
|
||||||
|
if (cancelled != null) {
|
||||||
|
resultMap.put("cancelled", TextUtil.format(cancelled));
|
||||||
|
}
|
||||||
resultMap.put("basepac", pac.getBasepac().getName());
|
resultMap.put("basepac", pac.getBasepac().getName());
|
||||||
|
|
||||||
Map<String, Object> components = new HashMap<String, Object>();
|
Map<String, Object> components = new HashMap<String, Object>();
|
||||||
@ -75,7 +79,17 @@ public class PacRemote extends AbstractRemote {
|
|||||||
basePac.setName(basePacName);
|
basePac.setName(basePacName);
|
||||||
pac.setBasepac(basePac);
|
pac.setBasepac(basePac);
|
||||||
}
|
}
|
||||||
pac.setCreated(new Date());
|
// pac.setCreated(new Date());
|
||||||
|
String createdStr = (String) setParams.get("created");
|
||||||
|
if (createdStr != null && !createdStr.isEmpty()) {
|
||||||
|
Date createdDate = TextUtil.parse(createdStr);
|
||||||
|
pac.setCreated(createdDate);
|
||||||
|
}
|
||||||
|
String cancelledStr = (String) setParams.get("cancelled");
|
||||||
|
if (cancelledStr != null && !cancelledStr.isEmpty()) {
|
||||||
|
Date cancelledDate = TextUtil.parse(cancelledStr);
|
||||||
|
pac.setCancelled(cancelledDate);
|
||||||
|
}
|
||||||
INetAddress curINetAddr = pac.getCurINetAddr();
|
INetAddress curINetAddr = pac.getCurINetAddr();
|
||||||
String inetAddrString = (String) setParams.get("curinetaddr");
|
String inetAddrString = (String) setParams.get("curinetaddr");
|
||||||
if ((curINetAddr == null || curINetAddr.getInetAddr() == null) && assertNotNull(inetAddrString)) {
|
if ((curINetAddr == null || curINetAddr.getInetAddr() == null) && assertNotNull(inetAddrString)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user