1 18 19 package sync4j.framework.server; 20 21 import org.apache.commons.lang.builder.ToStringBuilder; 22 23 31 public class Sync4jSource { 32 33 private String uri; private String config; private String sourceTypeId; private String sourceName; 38 39 public Sync4jSource() { 40 this(null, null, null, null); 41 } 42 43 public Sync4jSource(String uri) { 44 this(uri, null, null, null); 45 } 46 47 public Sync4jSource(String uri, String config) { 48 this(uri,config, null, null); 49 } 50 51 public Sync4jSource(String uri , 52 String config , 53 String sourceTypeId, 54 String sourceName ) { 55 this.uri = uri ; 56 this.config = config; 57 this.sourceTypeId = sourceTypeId; 58 this.sourceName = sourceName; 59 } 60 61 65 public String getUri() { 66 return uri; 67 } 68 69 73 public void setUri(String uri) { 74 int qMark = uri.indexOf('?'); 75 if (qMark == -1) { 76 this.uri = uri; 77 } else { 78 this.uri = uri.substring(0, qMark); 79 } 80 } 81 82 86 public String getConfig() { 87 return config; 88 } 89 90 94 public void setConfig(String config) { 95 this.config = config; 96 } 97 98 102 public String getSourceTypeId() { 103 return sourceTypeId; 104 } 105 106 110 public void setSourceTypeId(String sourceTypeId) { 111 this.sourceTypeId = sourceTypeId; 112 } 113 114 118 public String getSourceName() { 119 return sourceName; 120 } 121 122 126 public void setSourceName(String sourceName) { 127 this.sourceName = sourceName; 128 } 129 130 public String toString() { 131 ToStringBuilder sb = new ToStringBuilder(this); 132 133 sb.append("uri", uri ); 134 sb.append("config", config); 135 sb.append("sourceTypeId", sourceTypeId); 136 sb.append("sourceName", sourceName); 137 138 return sb.toString(); 139 } 140 141 } 142 | Popular Tags |