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
e17afa90
Commit
e17afa90
authored
1 year ago
by
Adam Laskowski
Browse files
Options
Downloads
Patches
Plain Diff
BIS-711: Added missing JythonBasedCustomDSSService
parent
b1391fb4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!40
SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server-original-data-store/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/JythonBasedCustomDSSService.java
+61
-0
61 additions, 0 deletions
...neric/server/dss/plugins/JythonBasedCustomDSSService.java
with
61 additions
and
0 deletions
server-original-data-store/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/JythonBasedCustomDSSService.java
0 → 100644
+
61
−
0
View file @
e17afa90
/*
* Copyright ETH 2023 Zürich, Scientific IT Services
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
ch.ethz.sis.openbis.generic.server.dss.plugins
;
import
ch.ethz.sis.openbis.generic.asapi.v3.IApplicationServerApi
;
import
ch.ethz.sis.openbis.generic.dssapi.v3.IDataStoreServerApi
;
import
ch.ethz.sis.openbis.generic.dssapi.v3.dto.service.CustomDSSServiceExecutionOptions
;
import
ch.ethz.sis.openbis.generic.dssapi.v3.dto.service.execute.ExecuteCustomDSSServiceOperationResult
;
import
ch.ethz.sis.openbis.generic.dssapi.v3.dto.service.id.ICustomDSSServiceId
;
import
ch.ethz.sis.openbis.generic.server.dssapi.v3.executor.service.ICustomDSSServiceExecutor
;
import
ch.ethz.sis.openbis.generic.server.dssapi.v3.helper.IDssServiceScriptRunner
;
import
ch.ethz.sis.openbis.generic.server.dssapi.v3.helper.ScriptRunnerFactory
;
import
ch.systemsx.cisd.common.properties.PropertyUtils
;
import
ch.systemsx.cisd.openbis.dss.generic.shared.ServiceProvider
;
import
java.io.Serializable
;
import
java.util.Properties
;
public
class
JythonBasedCustomDSSService
implements
ICustomDSSServiceExecutor
{
private
static
final
String
SCRIPT_PATH
=
"script-path"
;
private
final
String
scriptPath
;
public
JythonBasedCustomDSSService
(
Properties
properties
)
{
scriptPath
=
PropertyUtils
.
getMandatoryProperty
(
properties
,
SCRIPT_PATH
);
}
@Override
public
Serializable
executeService
(
String
sessionToken
,
ICustomDSSServiceId
serviceId
,
CustomDSSServiceExecutionOptions
options
)
{
IDssServiceScriptRunner
runner
=
new
ScriptRunnerFactory
(
scriptPath
,
getApplicationServerApi
(),
getDataStoreServerApi
())
.
createServiceRunner
(
sessionToken
);
return
new
ExecuteCustomDSSServiceOperationResult
(
runner
.
process
(
options
));
}
private
IApplicationServerApi
getApplicationServerApi
()
{
return
ServiceProvider
.
getV3ApplicationService
();
}
private
IDataStoreServerApi
getDataStoreServerApi
()
{
return
ServiceProvider
.
getV3DataStoreService
();
}
}
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