Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
9b69461b
Commit
9b69461b
authored
12 years ago
by
cramakri
Browse files
Options
Downloads
Patches
Plain Diff
BIS-67 SP-105 : Make ShareId more robust by checking with the AS if a data set is not found
SVN: 28649
parent
83e929b0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/ShareIdManager.java
+22
-0
22 additions, 0 deletions
...temsx/cisd/openbis/dss/generic/server/ShareIdManager.java
with
22 additions
and
0 deletions
datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/ShareIdManager.java
+
22
−
0
View file @
9b69461b
...
@@ -34,6 +34,8 @@ import ch.systemsx.cisd.common.logging.LogFactory;
...
@@ -34,6 +34,8 @@ import ch.systemsx.cisd.common.logging.LogFactory;
import
ch.systemsx.cisd.openbis.dss.generic.shared.Constants
;
import
ch.systemsx.cisd.openbis.dss.generic.shared.Constants
;
import
ch.systemsx.cisd.openbis.dss.generic.shared.IEncapsulatedOpenBISService
;
import
ch.systemsx.cisd.openbis.dss.generic.shared.IEncapsulatedOpenBISService
;
import
ch.systemsx.cisd.openbis.dss.generic.shared.IShareIdManager
;
import
ch.systemsx.cisd.openbis.dss.generic.shared.IShareIdManager
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.AbstractExternalData
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.PhysicalDataSet
;
import
ch.systemsx.cisd.openbis.generic.shared.dto.DataSetShareId
;
import
ch.systemsx.cisd.openbis.generic.shared.dto.DataSetShareId
;
/**
/**
...
@@ -317,6 +319,13 @@ public class ShareIdManager implements IShareIdManager
...
@@ -317,6 +319,13 @@ public class ShareIdManager implements IShareIdManager
GuardedShareID
shareId
=
getDataSetCodeToShareIdMap
().
get
(
dataSetCode
);
GuardedShareID
shareId
=
getDataSetCodeToShareIdMap
().
get
(
dataSetCode
);
if
(
shareId
==
null
)
if
(
shareId
==
null
)
{
{
updateValueForDataSet
(
dataSetCode
);
shareId
=
getDataSetCodeToShareIdMap
().
get
(
dataSetCode
);
}
if
(
shareId
==
null
)
{
throw
new
IllegalArgumentException
(
"Unknown data set: "
+
dataSetCode
);
throw
new
IllegalArgumentException
(
"Unknown data set: "
+
dataSetCode
);
}
}
return
shareId
;
return
shareId
;
...
@@ -343,4 +352,17 @@ public class ShareIdManager implements IShareIdManager
...
@@ -343,4 +352,17 @@ public class ShareIdManager implements IShareIdManager
}
}
}
}
private
void
updateValueForDataSet
(
String
dataSetCode
)
{
// We assume that the dataSetCodeToShareIdMap is already initialized -- otherwise we
// wouldn't be here.
AbstractExternalData
abstractDataSet
=
service
.
tryGetDataSet
(
dataSetCode
);
if
(
null
==
abstractDataSet
||
false
==
abstractDataSet
instanceof
PhysicalDataSet
)
{
return
;
}
PhysicalDataSet
dataSet
=
(
PhysicalDataSet
)
abstractDataSet
;
String
shareId
=
dataSet
.
getShareId
();
addShareId
(
dataSetCodeToShareIdMap
,
dataSetCode
,
shareId
);
}
}
}
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