public void save(Group group, Writer out) throws PerforceException { // A bit of validation to make sure we are correct. Perforce does NOT freaking tell us about // this during the save... if (group.getOwnersAsString().equals("")) { throw new IllegalArgumentException("Group owner is a required field."); } /* form looks like: Group: tekdev MaxResults: unlimited MaxScanRows: unlimited MaxLockTime: unlimited Timeout: 43200 Subgroups: Owners: Users: anil mwille */ try { out.write("Group: " + group.getName() + "\n"); out.write("MaxResults: " + group.getMaxResults() + "\n"); out.write("MaxScanRows: " + group.getMaxScanRows() + "\n"); out.write("MaxLockTime: " + group.getMaxLockTime() + "\n"); out.write("Timeout: " + group.getTimeout() + "\n"); out.write("Subgroups:\n"); for (String s : group.getSubgroups()) { out.write(" " + s + "\n"); } out.write("Owners:\n"); for (String s : group.getOwners()) { out.write(" " + s + "\n"); } out.write("Users:\n"); for (String s : group.getUsers()) { out.write(" " + s + "\n"); } } catch (IOException e) { throw new PerforceException("Failed to save group: " + group.getName(), e); } }