Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
Schema
Commits
64e2fdca
Commit
64e2fdca
authored
Sep 11, 2020
by
Abhishek Kumar (SLB)
Browse files
Removing local changes
parent
4855f0fa
Pipeline
#7980
failed with stage
in 8 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
schema-core/src/main/java/org/opengroup/osdu/schema/api/SchemaController.java
View file @
64e2fdca
package
org.opengroup.osdu.schema.api
;
import
javax.validation.Valid
;
import
org.opengroup.osdu.schema.constants.SchemaConstants
;
import
org.opengroup.osdu.schema.exceptions.ApplicationException
;
import
org.opengroup.osdu.schema.exceptions.BadRequestException
;
...
...
@@ -33,21 +32,21 @@ public class SchemaController {
ISchemaService
schemaService
;
@PostMapping
()
//
@PreAuthorize("@authorizationFilter.hasRole('" + SchemaConstants.ENTITLEMENT_SERVICE_GROUP_EDITORS + "')")
@PreAuthorize
(
"@authorizationFilter.hasRole('"
+
SchemaConstants
.
ENTITLEMENT_SERVICE_GROUP_EDITORS
+
"')"
)
public
ResponseEntity
<
SchemaInfo
>
createSchema
(
@Valid
@RequestBody
SchemaRequest
schemaRequest
)
throws
ApplicationException
,
BadRequestException
{
return
new
ResponseEntity
<>(
schemaService
.
createSchema
(
schemaRequest
),
HttpStatus
.
CREATED
);
}
@GetMapping
(
"/{id}"
)
//
@PreAuthorize("@authorizationFilter.hasRole('" + SchemaConstants.ENTITLEMENT_SERVICE_GROUP_VIEWERS + "')")
@PreAuthorize
(
"@authorizationFilter.hasRole('"
+
SchemaConstants
.
ENTITLEMENT_SERVICE_GROUP_VIEWERS
+
"')"
)
public
ResponseEntity
<
Object
>
getSchema
(
@PathVariable
(
"id"
)
String
id
)
throws
ApplicationException
,
NotFoundException
,
BadRequestException
{
return
new
ResponseEntity
<>(
schemaService
.
getSchema
(
id
),
HttpStatus
.
OK
);
}
@GetMapping
()
//
@PreAuthorize("@authorizationFilter.hasRole('" + SchemaConstants.ENTITLEMENT_SERVICE_GROUP_VIEWERS + "')")
@PreAuthorize
(
"@authorizationFilter.hasRole('"
+
SchemaConstants
.
ENTITLEMENT_SERVICE_GROUP_VIEWERS
+
"')"
)
public
ResponseEntity
<
SchemaInfoResponse
>
getSchemaInfoList
(
@RequestParam
(
required
=
false
,
name
=
"authority"
)
String
authority
,
@RequestParam
(
required
=
false
,
name
=
"source"
)
String
source
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment