示例#1
0
 private static Facility createFacility(Map<String, String> beanAttr) {
   if (beanAttr == null) return null;
   Facility facility = new Facility();
   facility.setId(Integer.valueOf(beanAttr.get("id")).intValue());
   facility.setName(BeansUtils.eraseEscaping(beanAttr.get("name")));
   facility.setType(BeansUtils.eraseEscaping(beanAttr.get("type")));
   return facility;
 }
  private Facility setUpFacility() throws Exception {

    Facility facility = new Facility();
    facility.setName("IsUnixGroupTestFacility");
    facility.setType("Testing");
    facility = perun.getFacilitiesManager().createFacility(sess, facility);

    return facility;
  }