-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from devgateway/pre-release/v1.0
IATIIMPORT-162 1.0 release
- Loading branch information
Showing
215 changed files
with
56,410 additions
and
1,243 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
rebel.xml | ||
import-core/import-scheduler/target | ||
import-core/import-ui/src/main/resources/static/images | ||
import-core/import-ui/src/main/resources/static/scripts/global.js | ||
import-core/import-ui/src/main/resources/static/scripts/lt-ie9.js | ||
import-core/import-ui/src/main/resources/static/scripts/main.js | ||
import-core/import-ui/src/main/resources/static/styles/global.css | ||
import-core/import-ui/src/main/resources/static/styles/main.css | ||
import-core/import-ui/src/main/webapp/package-lock.json | ||
modernizr.js | ||
package-lock.json | ||
index.html |
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
56 changes: 56 additions & 0 deletions
56
...t-core/import-rest/src/main/java/org/devgateway/importtool/rest/DataSourceController.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,56 @@ | ||
package org.devgateway.importtool.rest; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
|
||
import org.devgateway.importtool.dao.ReportingOrgRepository; | ||
import org.devgateway.importtool.model.DataSource; | ||
import org.devgateway.importtool.model.ReportingOrganization; | ||
import org.devgateway.importtool.services.DataSourceService; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestMethod; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
@RequestMapping(value = "/data-source") | ||
class DataSourceController { | ||
@Autowired | ||
private DataSourceService dataSourceService; | ||
@Autowired | ||
private ReportingOrgRepository reportingOrgRepository; | ||
|
||
@RequestMapping(method = RequestMethod.GET) | ||
ResponseEntity<DataSource> getDataSource(HttpServletRequest request) { | ||
return new ResponseEntity<>(dataSourceService.getDataSource(), HttpStatus.OK); | ||
} | ||
|
||
@RequestMapping(method = RequestMethod.POST) | ||
ResponseEntity<DataSource> saveDataSource(@RequestBody DataSource ds, HttpServletRequest request) { | ||
return new ResponseEntity<>(dataSourceService.save(ds), HttpStatus.OK); | ||
} | ||
|
||
@RequestMapping(method = RequestMethod.GET, value={"/reporting-orgs", "/reporting-orgs/{orgName}"}) | ||
ResponseEntity<List<ReportingOrganization>> getOrganizations(HttpServletRequest request, | ||
@PathVariable Optional<String> orgName) { | ||
List<ReportingOrganization> reportingOrganizations; | ||
if (orgName.isPresent()) { | ||
reportingOrganizations = reportingOrgRepository.findByNameContainsIgnoreCase(orgName.get()); | ||
} else { | ||
reportingOrganizations = reportingOrgRepository.findAll(); | ||
} | ||
return new ResponseEntity<>(reportingOrganizations, HttpStatus.OK); | ||
} | ||
@RequestMapping(method = RequestMethod.GET, value="reporting-orgs/with-updates") | ||
ResponseEntity<List<ReportingOrganization>> getOrganizationsWithUpdates(HttpServletRequest request) { | ||
return new ResponseEntity<>(reportingOrgRepository.groupingCriteriaWithUpdates(), HttpStatus.OK); | ||
} | ||
|
||
} |
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
42 changes: 42 additions & 0 deletions
42
...mport-rest/src/main/java/org/devgateway/importtool/rest/dto/FetchOrganizationDetails.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,42 @@ | ||
package org.devgateway.importtool.rest.dto; | ||
|
||
import org.devgateway.importtool.model.Project; | ||
import org.devgateway.importtool.services.processor.helper.Status; | ||
|
||
import java.util.List; | ||
import java.util.Set; | ||
|
||
public class FetchOrganizationDetails { | ||
private Status status; | ||
private Set<String> versions; | ||
private List<Project> projectWithUpdates; | ||
|
||
public FetchOrganizationDetails(){ | ||
status = Status.NOT_STARTED; | ||
} | ||
|
||
|
||
public Set<String> getVersions() { | ||
return versions; | ||
} | ||
|
||
public void setVersions(Set<String> versions) { | ||
this.versions = versions; | ||
} | ||
|
||
public List<Project> getProjectWithUpdates() { | ||
return projectWithUpdates; | ||
} | ||
|
||
public void setProjectWithUpdates(List<Project> projectWithUpdates) { | ||
this.projectWithUpdates = projectWithUpdates; | ||
} | ||
|
||
public Status getStatus() { | ||
return status; | ||
} | ||
|
||
public void setStatus(Status status) { | ||
this.status = status; | ||
} | ||
} |
Oops, something went wrong.