1 18 package org.apache.tools.ant.taskdefs.cvslib; 19 20 import org.apache.tools.ant.BuildException; 21 22 26 public class CvsUser { 27 28 private String userID; 29 30 private String displayName; 31 32 33 38 public void setDisplayname(final String displayName) { 39 this.displayName = displayName; 40 } 41 42 43 48 public void setUserid(final String userID) { 49 this.userID = userID; 50 } 51 52 53 58 public String getUserID() { 59 return userID; 60 } 61 62 63 68 public String getDisplayname() { 69 return displayName; 70 } 71 72 73 79 public void validate() throws BuildException { 80 if (null == userID) { 81 final String message = "Username attribute must be set."; 82 83 throw new BuildException(message); 84 } 85 if (null == displayName) { 86 final String message = 87 "Displayname attribute must be set for userID " + userID; 88 89 throw new BuildException(message); 90 } 91 } 92 } 93 94 | Popular Tags |