-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
443 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
connector/src/main/java/org/isf/patientportal/connector/common/SyncReport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.isf.patientportal.connector.common; | ||
|
||
import java.util.ArrayList; | ||
|
||
import org.isf.patientportal.connector.sync.common.SyncResult; | ||
|
||
public class SyncReport { | ||
|
||
protected ArrayList<SyncResult> results; | ||
|
||
public SyncReport() { | ||
results = new ArrayList<SyncResult>(); | ||
} | ||
|
||
|
||
public void addResult(SyncResult result) { | ||
results.add(result); | ||
} | ||
|
||
public ArrayList<SyncResult> getResults() { | ||
return results; | ||
} | ||
|
||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("Sync report:\n"); | ||
for (SyncResult result : results) { | ||
sb.append("Synced " + result.getObjectId() + "[" + result.getObjectType() + "] OP " + result.getOp().name() + " with result " + result.isSuccess() + " and message " + result.getMessage() + "\n"); | ||
sb.append("\n"); | ||
} | ||
return sb.toString(); | ||
} | ||
|
||
} |
8 changes: 7 additions & 1 deletion
8
...ortal/connector/config/Configuration.java → ...nector/config/ConnectorConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 0 additions & 37 deletions
37
connector/src/main/java/org/isf/patientportal/connector/patient/PatientSyncer.java
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
connector/src/main/java/org/isf/patientportal/connector/runner/ImportRunner.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
connector/src/main/java/org/isf/patientportal/connector/sync/common/SyncResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package org.isf.patientportal.connector.sync.common; | ||
|
||
|
||
public class SyncResult { | ||
|
||
public enum Op { | ||
NOOP, UPDATE, CREATE, DELETE, ERROR | ||
} | ||
|
||
private int objectId; | ||
private String objectType; | ||
private boolean success; | ||
private String message; | ||
private Op resultType; | ||
|
||
public SyncResult() { | ||
} | ||
|
||
public SyncResult(int objectId, String objectType, boolean success, String message, Op resultType) { | ||
this.objectId = objectId; | ||
this.objectType = objectType; | ||
this.success = success; | ||
this.message = message; | ||
this.resultType = resultType; | ||
} | ||
|
||
public int getObjectId() { | ||
return objectId; | ||
} | ||
public void setObjectId(int objectId) { | ||
this.objectId = objectId; | ||
} | ||
public String getObjectType() { | ||
return objectType; | ||
} | ||
public void setObjectType(String objectType) { | ||
this.objectType = objectType; | ||
} | ||
public boolean isSuccess() { | ||
return success; | ||
} | ||
public void setSuccess(boolean success) { | ||
this.success = success; | ||
} | ||
public String getMessage() { | ||
return message; | ||
} | ||
public void setMessage(String message) { | ||
this.message = message; | ||
} | ||
public Op getOp() { | ||
return resultType; | ||
} | ||
public void setOp(Op resultType) { | ||
this.resultType = resultType; | ||
} | ||
} |
Oops, something went wrong.