-
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.
* feat: implement entity config builder * feat: implement subordinate relationship create * feat: implement published entity configuration statement persistence * feat: implement published entity configuration statement persistence * fix: entity configuration database constraint * feat: implement entity configuration metadata * fix: add return on end of files * fix: add return on end of files * fix: return constants on errors
- Loading branch information
Showing
38 changed files
with
857 additions
and
840 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
39 changes: 39 additions & 0 deletions
39
...in/com/sphereon/oid/fed/server/admin/controllers/EntityConfigurationMetadataController.kt
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,39 @@ | ||
package com.sphereon.oid.fed.server.admin.controllers | ||
|
||
import com.sphereon.oid.fed.openapi.models.CreateMetadataDTO | ||
import com.sphereon.oid.fed.persistence.models.EntityConfigurationMetadata | ||
import com.sphereon.oid.fed.services.EntityConfigurationMetadataService | ||
import org.springframework.web.bind.annotation.* | ||
|
||
@RestController | ||
@RequestMapping("/accounts/{accountUsername}/metadata") | ||
class EntityConfigurationMetadataController { | ||
private val entityConfigurationMetadataService = EntityConfigurationMetadataService() | ||
|
||
@GetMapping | ||
fun get( | ||
@PathVariable accountUsername: String | ||
): Array<EntityConfigurationMetadata> { | ||
return entityConfigurationMetadataService.findByAccountUsername(accountUsername) | ||
} | ||
|
||
@PostMapping | ||
fun create( | ||
@PathVariable accountUsername: String, | ||
@RequestBody metadata: CreateMetadataDTO | ||
): EntityConfigurationMetadata { | ||
return entityConfigurationMetadataService.createEntityConfigurationMetadata( | ||
accountUsername, | ||
metadata.key, | ||
metadata.value | ||
) | ||
} | ||
|
||
@DeleteMapping("/{id}") | ||
fun delete( | ||
@PathVariable accountUsername: String, | ||
@PathVariable id: Int | ||
): EntityConfigurationMetadata { | ||
return entityConfigurationMetadataService.deleteEntityConfigurationMetadata(accountUsername, id) | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...rc/main/kotlin/com/sphereon/oid/fed/server/admin/controllers/EntityStatementController.kt
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,21 @@ | ||
package com.sphereon.oid.fed.server.admin.controllers | ||
|
||
import com.sphereon.oid.fed.openapi.models.EntityConfigurationStatement | ||
import com.sphereon.oid.fed.services.EntityStatementService | ||
import org.springframework.web.bind.annotation.* | ||
|
||
@RestController | ||
@RequestMapping("/accounts/{accountUsername}/entity-statement") | ||
class EntityStatementController { | ||
private val entityStatementService = EntityStatementService() | ||
|
||
@GetMapping | ||
fun getEntityStatement(@PathVariable accountUsername: String): EntityConfigurationStatement { | ||
return entityStatementService.findByUsername(accountUsername) | ||
} | ||
|
||
@PostMapping | ||
fun publishEntityStatement(@PathVariable accountUsername: String): EntityConfigurationStatement { | ||
return entityStatementService.publishByUsername(accountUsername) | ||
} | ||
} |
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
28 changes: 22 additions & 6 deletions
28
...rc/main/kotlin/com/sphereon/oid/fed/server/federation/controllers/FederationController.kt
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
Oops, something went wrong.