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 abstract class SyncOperationStatusImpl implements SyncOperationStatus { 34 35 37 40 private SyncOperation operation = null; 41 42 46 public SyncOperation getOperation() { 47 return operation; 48 } 49 50 53 private SyncSource syncSource = null; 54 55 59 public SyncSource getSyncSource() { 60 return syncSource; 61 } 62 63 64 66 74 public SyncOperationStatusImpl(SyncOperation operation, SyncSource syncSource) { 75 if (operation == null) { 76 throw new IllegalArgumentException ("operation cannnot be null"); 77 } 78 if (syncSource == null) { 79 throw new IllegalArgumentException ("syncSource cannnot be null"); 80 } 81 82 this.operation = operation ; 83 this.syncSource = syncSource; 84 } 85 86 88 public String toString() { 89 return new ToStringBuilder(this). 90 append("operation", operation.toString() ). 91 append("syncSource", syncSource.toString()). 92 toString(); 93 } 94 95 99 abstract public int getStatusCode(); 100 101 } | Popular Tags |