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
ea63943b
Commit
ea63943b
authored
12 years ago
by
brinn
Browse files
Options
Downloads
Patches
Plain Diff
Fix ScreeningPlateListReadOnlyPredicate for plates without a space.
SVN: 26177
parent
caad4550
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/internal/authorization/ScreeningPlateListReadOnlyPredicate.java
+5
-5
5 additions, 5 deletions
...al/authorization/ScreeningPlateListReadOnlyPredicate.java
with
5 additions
and
5 deletions
screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/internal/authorization/ScreeningPlateListReadOnlyPredicate.java
+
5
−
5
View file @
ea63943b
...
...
@@ -71,7 +71,7 @@ public class ScreeningPlateListReadOnlyPredicate extends
}
final
String
spaceCodeOrNull
=
SpaceCodeHelper
.
g
etSpaceCode
(
person
,
plate
.
tryGetSpaceCode
());
SpaceCodeHelper
.
tryG
etSpaceCode
(
person
,
plate
.
tryGetSpaceCode
());
if
(
spaceCodeOrNull
==
null
&&
hasPermId
==
false
)
{
throw
new
UndefinedSpaceException
();
...
...
@@ -103,7 +103,7 @@ public class ScreeningPlateListReadOnlyPredicate extends
return
Status
.
OK
;
}
private
final
static
int
SAMPLE_PERM_ID
_LIMIT
=
999
;
private
final
static
int
ARRAY_SIZE
_LIMIT
=
999
;
interface
ISampleToSpaceQuery
extends
BaseQuery
{
...
...
@@ -117,13 +117,13 @@ public class ScreeningPlateListReadOnlyPredicate extends
final
ISampleToSpaceQuery
query
=
QueryTool
.
getQuery
(
authorizationDataProvider
.
getConnection
(),
ISampleToSpaceQuery
.
class
);
if
(
permIds
.
size
()
>
SAMPLE_PERM_ID
_LIMIT
)
if
(
permIds
.
size
()
>
ARRAY_SIZE
_LIMIT
)
{
final
Set
<
Long
>
spaceIds
=
new
HashSet
<
Long
>(
permIds
.
size
());
for
(
int
startIdx
=
0
;
startIdx
<
permIds
.
size
();
startIdx
+=
SAMPLE_PERM_ID
_LIMIT
)
for
(
int
startIdx
=
0
;
startIdx
<
permIds
.
size
();
startIdx
+=
ARRAY_SIZE
_LIMIT
)
{
final
List
<
String
>
permIdSubList
=
permIds
.
subList
(
startIdx
,
Math
.
min
(
permIds
.
size
(),
startIdx
+
SAMPLE_PERM_ID
_LIMIT
));
Math
.
min
(
permIds
.
size
(),
startIdx
+
ARRAY_SIZE
_LIMIT
));
spaceIds
.
addAll
(
query
.
getSampleSpaceIds
(
permIdSubList
.
toArray
(
new
String
[
permIdSubList
.
size
()])));
}
...
...
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