no message

This commit is contained in:
Ioannis Kalyvas 2018-01-26 18:08:17 +02:00
parent f8e848ba1d
commit 56531976de
2 changed files with 4 additions and 4 deletions

View File

@ -38,16 +38,16 @@ public class DatasetProfileController extends BaseController {
}
@RequestMapping(method = RequestMethod.GET, value = {"/datasetwizard/get/{id}"}, produces = "application/json")
public ResponseEntity<ResponseItem<DatasetProfile>> getSingle(@PathVariable String id) {
public ResponseEntity<ResponseItem<PagedDatasetProfile>> getSingle(@PathVariable String id) {
try {
eu.eudat.entities.DatasetProfile profile = this.getApiContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(id));
eu.eudat.models.user.composite.DatasetProfile datasetprofile = UserManager.generateDatasetProfileModel(profile);
PagedDatasetProfile pagedDatasetProfile = new PagedDatasetProfile();
pagedDatasetProfile.buildPagedDatasetProfile(datasetprofile);
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<DatasetProfile>().status(ApiMessageCode.NO_MESSAGE).payload(datasetprofile));
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<PagedDatasetProfile>().status(ApiMessageCode.NO_MESSAGE).payload(pagedDatasetProfile));
} catch (Exception ex) {
ex.printStackTrace();
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<DatasetProfile>().status(ApiMessageCode.DEFAULT_ERROR_MESSAGE).message(ex.getMessage()));
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<PagedDatasetProfile>().status(ApiMessageCode.DEFAULT_ERROR_MESSAGE).message(ex.getMessage()));
}
}

View File

@ -128,7 +128,7 @@ export class DatasetWizardComponent {
getDefinition() {
if (this.isNew) {
this.datasetWizardService.getDefinition(this.formGroup.get("profile").get("id").value).subscribe(item => {
this.datasetWizardModel.datasetProfileDefinition = item;
this.datasetWizardModel.datasetProfileDefinition = JsonSerializer.fromJSONObject(item,DatasetProfileDefinitionModel);
//this.datasetProfileDefinitionModel = this.datasetWizardModel.datasetProfileDefinition;
//this.form = this.datasetProfileDefinitionModel.buildForm();