Exemple #1
0
 public Group map(OnmsGroup inputGroup) {
   if (inputGroup == null) return null;
   Group castorGroup = new Group();
   castorGroup.setName(inputGroup.getName());
   castorGroup.setComments(inputGroup.getComments());
   castorGroup.setUser(inputGroup.getUsers().toArray(EMPTY_STRING_ARRAY));
   return castorGroup;
 }
Exemple #2
0
  public synchronized void save(final OnmsGroup group) throws Exception {
    Group castorGroup = getGroup(group.getName());
    if (castorGroup == null) {
      castorGroup = new Group();
      castorGroup.setName(group.getName());
    }
    castorGroup.setComments(group.getComments());
    castorGroup.setUser(group.getUsers().toArray(EMPTY_STRING_ARRAY));

    saveGroup(group.getName(), castorGroup);
  }