-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avniproject/avni-media#152 | Introduce end-point to create a download…
… request on media server for all images matching a search criterion
- Loading branch information
Suhas Vishwanath
committed
Sep 21, 2023
1 parent
934b5d0
commit 3ac31e4
Showing
10 changed files
with
162 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package org.avniproject.etl.dto; | ||
|
||
public record AddressLevelType(String uuid, long id, String name, int level) { | ||
} |
49 changes: 49 additions & 0 deletions
49
src/main/java/org/avniproject/etl/dto/DownloadAllMediaRequest.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,49 @@ | ||
package org.avniproject.etl.dto; | ||
|
||
import java.util.List; | ||
|
||
public class DownloadAllMediaRequest { | ||
private MediaSearchRequest mediaSearchRequest; | ||
private String username; | ||
private String description; | ||
private List<AddressLevelType> addressLevelTypes; | ||
|
||
public DownloadAllMediaRequest (MediaSearchRequest mediaSearchRequest, String username, String description, List<AddressLevelType> addressLevelTypes){ | ||
this.mediaSearchRequest = mediaSearchRequest; | ||
this.username = username; | ||
this.description = description; | ||
this.addressLevelTypes = addressLevelTypes; | ||
} | ||
|
||
public void setMediaSearchRequest(MediaSearchRequest mediaSearchRequest) { | ||
this.mediaSearchRequest = mediaSearchRequest; | ||
} | ||
|
||
public void setUsername(String username) { | ||
this.username = username; | ||
} | ||
|
||
public void setDescription(String description) { | ||
this.description = description; | ||
} | ||
|
||
public void setAddressLevelTypes(List<AddressLevelType> addressLevelTypes) { | ||
this.addressLevelTypes = addressLevelTypes; | ||
} | ||
|
||
public MediaSearchRequest getMediaSearchRequest() { | ||
return (mediaSearchRequest == null) ? new MediaSearchRequest(): mediaSearchRequest; | ||
} | ||
|
||
public String getUsername() { | ||
return username; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public List<AddressLevelType> getAddressLevelTypes() { | ||
return addressLevelTypes; | ||
} | ||
} |
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,9 @@ | ||
package org.avniproject.etl.dto; | ||
|
||
import java.util.List; | ||
|
||
public record DownloadRequest(String username, | ||
String description, | ||
List<AddressLevelType> addressLevelTypes, | ||
List<ImageData> data) { | ||
} |
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,17 @@ | ||
package org.avniproject.etl.dto; | ||
|
||
public record ImageData( | ||
String uuid, | ||
String subjectFirstName, | ||
String subjectLastName, | ||
String url, | ||
String conceptName, | ||
String subjectTypeName, | ||
String programEnrolment, | ||
String encounterTypeName, | ||
String syncConcept1Name, | ||
String syncConcept2Name, | ||
String syncParameterValue1, | ||
String syncParameterValue2, | ||
String address) { | ||
} |
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
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