public OnmsGroupList getOnmsGroupList()
      throws MarshalException, ValidationException, IOException {
    final OnmsGroupList list = new OnmsGroupList();

    for (final String name : getGroupNames()) {
      list.add(getOnmsGroup(name));
    }
    list.setTotalCount(list.getCount());

    return list;
  }
Ejemplo n.º 2
0
 public OnmsGroupList map(Collection<OnmsGroup> groups) {
   final OnmsGroupList list = new OnmsGroupList();
   list.addAll(groups);
   list.setTotalCount(list.getCount());
   return list;
 }