Esempio n. 1
0
 private static ExtSource createExtSource(Map<String, String> beanAttr) {
   if (beanAttr == null) return null;
   ExtSource extSource = new ExtSource();
   extSource.setId(Integer.valueOf(beanAttr.get("id")).intValue());
   extSource.setName(BeansUtils.eraseEscaping(beanAttr.get("name")));
   extSource.setType(BeansUtils.eraseEscaping(beanAttr.get("type")));
   return extSource;
 }
Esempio n. 2
0
  @Override
  public List<Group> getGroupsWithAssignedExtSourceInVo(PerunSession sess, ExtSource source, Vo vo)
      throws InternalErrorException {
    try {
      return jdbc.query(
          "select "
              + groupMappingSelectQuery
              + " from group_ext_sources g_exts inner join groups on g_exts.group_id=groups.id "
              + " where g_exts.ext_source_id=? and groups.vo_id=?",
          GROUP_MAPPER,
          source.getId(),
          vo.getId());

    } catch (RuntimeException e) {
      throw new InternalErrorException(e);
    }
  }