Package org.magicbox.dto

Examples of org.magicbox.dto.UrlDTO


    }

    private Map mapFromList(List urlsApp) {
        Map map = new FastMap();
        for (Iterator i = urlsApp.iterator(); i.hasNext();) {
            UrlDTO urlRole = (UrlDTO) i.next();
            String inMapRole = (String) map.get(urlRole.getUrl());
            if (inMapRole == null) {
                map.put(urlRole.getUrl(), urlRole.getRoleType());
            } else {
                StringBuilder sb = new StringBuilder(inMapRole).append(",").append(urlRole.getRoleType());
                map.put(urlRole.getUrl(), sb.toString());
            }
        }
        urlsApp = null;
        return map;
    }
View Full Code Here


 
  public void testSelectConfigUrl(){
    DBUrls dbUrls= new DBUrls();
    dbUrls.preparaDb();
   
    UrlDTO urlDto = _dao.getUrls(1);
    assertNotNull(urlDto);
    assertTrue(urlDto.getUrl().equals("/*.admin"));
    assertTrue(urlDto.getRoleType().equals(Constant.ROLE_ADMIN));
   
    dbUrls.pulisciDb();
  }
 
View Full Code Here

 
 
  public void testInsertUrl() {
    DBUrls dbUrls= new DBUrls();
   
    UrlDTO urlDto = new UrlDTO();
    urlDto.setRoleType("ROLE_ROOT");
    urlDto.setUrl("/*");
    assertTrue(_dao.insertUrl(urlDto) > 0);
   
    dbUrls.pulisciDb();
   
  }
View Full Code Here

 
  public void testUpdateUrl() {
    DBUrls dbUrls = new DBUrls();
    dbUrls.preparaDb();
   
    UrlDTO urlDto = new UrlDTO();
    urlDto.setRoleType("ROLE_ROOT");
    urlDto.setUrl("/*.EXOTIC_EXTENSION");
    urlDto.setId(new Long(1));
    assertTrue(_dao.updateUrl(urlDto) == 1);
   
    dbUrls.pulisciDb();
  }
View Full Code Here

TOP

Related Classes of org.magicbox.dto.UrlDTO

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.