HSAdmin Backend Domains, E-Mail, Datenbanken
peter
2012-10-16 c1ac39ec784ee417f14ff604d4d413132c6d613c
handling of created and cancelled properties
1 files modified
16 ■■■■■ changed files
hsarback/src/de/hsadmin/remote/PacRemote.java 16 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/remote/PacRemote.java
@@ -25,6 +25,10 @@
        resultMap.put("customer", pac.getCustomer().getName());
        resultMap.put("curinetaddr", pac.getCurINetAddr().getInetAddr());
        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());
        
        Map<String, Object> components = new HashMap<String, Object>();
@@ -75,7 +79,17 @@
            basePac.setName(basePacName);
            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();
        String inetAddrString = (String) setParams.get("curinetaddr");
        if ((curINetAddr == null || curINetAddr.getInetAddr() == null) && assertNotNull(inetAddrString)) {