public OnmsGroup map(Group inputGroup) { if (inputGroup == null) return null; final OnmsGroup xmlGroup = new OnmsGroup(inputGroup.getName()); xmlGroup.setComments(inputGroup.getComments()); xmlGroup.setUsers(inputGroup.getUserCollection()); return xmlGroup; }
public OnmsGroup getOnmsGroup(final String groupName) throws MarshalException, ValidationException, IOException { final Group castorGroup = getGroup(groupName); if (castorGroup == null) return null; final OnmsGroup group = new OnmsGroup(groupName); group.setComments(castorGroup.getComments()); group.setUsers(castorGroup.getUserCollection()); return group; }