1 18 19 package sync4j.framework.engine; 20 21 import sync4j.framework.engine.SyncOperation; 22 import sync4j.framework.engine.source.SyncSource; 23 24 import org.apache.commons.lang.builder.ToStringBuilder; 25 26 33 public class SyncStatus { 34 35 37 40 protected int statusCode; 41 42 47 public int getStatusCode() { 48 return statusCode; 49 } 50 51 56 public void setStatusCode(int statusCode) { 57 this.statusCode = statusCode; 58 } 59 60 63 private String message; 64 65 70 public String getMessage() { 71 return message; 72 } 73 74 79 public void setMessage(String message) { 80 this.message = message; 81 } 82 83 86 protected SyncSource syncSource; 87 88 92 public SyncSource getSyncSource() { 93 return syncSource; 94 } 95 96 97 99 102 protected SyncStatus() { 103 syncSource = null; 104 statusCode = -1; 105 } 106 107 115 public SyncStatus(SyncSource syncSource, int statusCode, String message) { 116 if (syncSource == null) { 117 throw new IllegalArgumentException ("syncSource cannnot be null"); 118 } 119 120 this.syncSource = syncSource; 121 this.statusCode = statusCode; 122 this.message = message ; 123 } 124 125 132 public SyncStatus(SyncSource syncSource) { 133 this(syncSource, -1, ""); 134 } 135 136 138 } 139 | Popular Tags |