Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Storage
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSDU
OSDU Data Platform
System
Storage
Commits
da06ee49
Commit
da06ee49
authored
1 year ago
by
Neelesh Thakur
Browse files
Options
Downloads
Patches
Plain Diff
allow id with dot if request with and without dots are in separate requests
parent
03c76893
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!841
Draft: Update version of default branch to 0.26.0-SNAPSHOT
,
!839
allow id with dot if request with and without dots are in separate requests
Pipeline
#240411
failed
1 year ago
Stage: review
Stage: build
Stage: coverage
Stage: containerize
Stage: scan
Stage: deploy
Stage: integration
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
provider/storage-azure/src/main/java/org/opengroup/osdu/storage/provider/azure/util/RecordUtil.java
+11
-6
11 additions, 6 deletions
...pengroup/osdu/storage/provider/azure/util/RecordUtil.java
with
11 additions
and
6 deletions
provider/storage-azure/src/main/java/org/opengroup/osdu/storage/provider/azure/util/RecordUtil.java
+
11
−
6
View file @
da06ee49
...
...
@@ -8,6 +8,7 @@ import org.springframework.stereotype.Component;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.function.Predicate
;
import
java.util.stream.Collectors
;
import
static
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNoneBlank
;
...
...
@@ -45,15 +46,19 @@ public class RecordUtil {
}
}
public
String
getKindForVersion
(
RecordMetadata
record
,
String
version
)
{
String
v
ersionPath
=
record
.
getGcsVersionPaths
()
public
String
getKindForVersion
(
RecordMetadata
record
Metadata
,
String
version
)
{
String
gcsV
ersionPath
=
record
Metadata
.
getGcsVersionPaths
()
.
stream
()
.
filter
(
path
->
isNoneBlank
(
path
)
&&
path
.
contains
(
version
))
.
filter
(
isGcsVersionPathEndsWith
(
version
))
.
findFirst
()
.
orElseThrow
(()
->
throwVersionNotFound
(
record
.
getId
(),
version
));
.
orElseThrow
(()
->
throwVersionNotFound
(
record
Metadata
.
getId
(),
version
));
return
versionPath
.
split
(
"/"
)[
0
];
return
gcsVersionPath
.
split
(
"/"
)[
0
];
}
private
static
Predicate
<
String
>
isGcsVersionPathEndsWith
(
String
version
)
{
return
gcsVersionPath
->
isNoneBlank
(
gcsVersionPath
)
&&
gcsVersionPath
.
endsWith
(
"/"
+
version
);
}
private
AppException
throwVersionNotFound
(
String
id
,
String
version
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment