diff --git a/datastore_server/source/java/ch/systemsx/cisd/etlserver/registrator/api/v2/DataSetRegistrationTransactionV2Delegate.java b/datastore_server/source/java/ch/systemsx/cisd/etlserver/registrator/api/v2/DataSetRegistrationTransactionV2Delegate.java index 5764add123708908c114b850ff14ad50eddb82ef..11de0a73b04368e5efd944dedbbecedd38767310 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/etlserver/registrator/api/v2/DataSetRegistrationTransactionV2Delegate.java +++ b/datastore_server/source/java/ch/systemsx/cisd/etlserver/registrator/api/v2/DataSetRegistrationTransactionV2Delegate.java @@ -50,6 +50,11 @@ public class DataSetRegistrationTransactionV2Delegate implements IDataSetRegistr this.transaction = transaction; } + @Override + public String getOpenBisServiceSessionToken() { + return transaction.getOpenBisServiceSessionToken(); + } + @Override public IDataSet createNewDataSet() { diff --git a/datastore_server/source/java/ch/systemsx/cisd/etlserver/registrator/api/v2/IDataSetRegistrationTransactionV2.java b/datastore_server/source/java/ch/systemsx/cisd/etlserver/registrator/api/v2/IDataSetRegistrationTransactionV2.java index 4de166aeaef64814cae1c2bd3d2610b96b7db2f0..31910ffe58bfb176afad67546c5f8e5230b9cba8 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/etlserver/registrator/api/v2/IDataSetRegistrationTransactionV2.java +++ b/datastore_server/source/java/ch/systemsx/cisd/etlserver/registrator/api/v2/IDataSetRegistrationTransactionV2.java @@ -471,6 +471,11 @@ public interface IDataSetRegistrationTransactionV2 */ List<IAttachmentImmutable> listAttachments(ISampleImmutable sample); + /** + * Returns the currently used session token by the openBIS service + */ + String getOpenBisServiceSessionToken(); + /** * Returns the logger object that logs messages to openbis operation log and data store server registration logs. */ diff --git a/datastore_server/source/java/ch/systemsx/cisd/etlserver/registrator/api/v2/impl/DataSetRegistrationTransaction.java b/datastore_server/source/java/ch/systemsx/cisd/etlserver/registrator/api/v2/impl/DataSetRegistrationTransaction.java index dd94e5215edefd364596e2738fed0e76eb806f6a..1d9f2ed4cfebe38e7e0773508780a20a2f5effc3 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/etlserver/registrator/api/v2/impl/DataSetRegistrationTransaction.java +++ b/datastore_server/source/java/ch/systemsx/cisd/etlserver/registrator/api/v2/impl/DataSetRegistrationTransaction.java @@ -240,6 +240,11 @@ public class DataSetRegistrationTransaction<T extends DataSetInformation> implem dssRegistrationLog.info(operationLog, "Start registration"); } + @Override + public String getOpenBisServiceSessionToken() { + return openBisService.getSessionToken(); + } + @Override public IDSSRegistrationLogger getLogger() { diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedFilteredBasicOpenBISService.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedFilteredBasicOpenBISService.java index 75c012f1b66237aa5b43d1e8ce14955b6794bb2b..d014e2757bff52a1941a3b1c17692686740c7512 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedFilteredBasicOpenBISService.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedFilteredBasicOpenBISService.java @@ -272,4 +272,10 @@ public class EncapsulatedFilteredBasicOpenBISService implements IEncapsulatedBas return AuthorizationHelper.filterToVisible(encapsulatedService, userName, data, externalDataCodeMapper, AuthorizationHelper.EntityKind.DATA_SET); } + + @Override + public String getSessionToken() + { + return systemSessionToken; + } } diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedOpenBISService.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedOpenBISService.java index 392f831cfbabae69fb2f626a8e25b7aab7576d2b..e59d6d7bb2257a29514a42242aad6e09197df059 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedOpenBISService.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedOpenBISService.java @@ -290,7 +290,11 @@ public final class EncapsulatedOpenBISService implements IEncapsulatedOpenBISSer // // IEncapsulatedOpenBISService // - + @Override + public String getSessionToken() { + return session.getSessionToken(); + } + @Override public Experiment tryGetExperiment(ExperimentIdentifier experimentIdentifier) { diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/IEncapsulatedBasicOpenBISService.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/IEncapsulatedBasicOpenBISService.java index 0019ad9ab7c460e4d0dc4844d9f0cd35be4ae0ff..b1e81e60090ba155f92ad441ae3405e76c52d7e6 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/IEncapsulatedBasicOpenBISService.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/IEncapsulatedBasicOpenBISService.java @@ -195,4 +195,9 @@ public interface IEncapsulatedBasicOpenBISService @ManagedAuthentication public Map<IObjectId, List<Metaproject>> listMetaprojectsForEntities(Collection<? extends IObjectId> entityIds); + /** + * Returns the session token used by the service. + */ + @ManagedAuthentication + public String getSessionToken(); }