Skip to content
Snippets Groups Projects
Commit c7c704a4 authored by cramakri's avatar cramakri
Browse files

LMS-1527 Made RawDataService extend IRpcService.

SVN: 15974
parent 0d08a5f8
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,7 @@ import ch.systemsx.cisd.openbis.plugin.phosphonetx.shared.dto.MsInjectionSample; ...@@ -39,7 +39,7 @@ import ch.systemsx.cisd.openbis.plugin.phosphonetx.shared.dto.MsInjectionSample;
/** /**
* Imlementation of {@link IRawDataService}. * Imlementation of {@link IRawDataService}.
* *
* @author Franz-Josef Elmer * @author Franz-Josef Elmer
*/ */
public class RawDataService extends AbstractServer<IRawDataService> implements IRawDataService public class RawDataService extends AbstractServer<IRawDataService> implements IRawDataService
...@@ -50,13 +50,13 @@ public class RawDataService extends AbstractServer<IRawDataService> implements I ...@@ -50,13 +50,13 @@ public class RawDataService extends AbstractServer<IRawDataService> implements I
{ {
} }
public RawDataService(final ISessionManager<Session> sessionManager, final IDAOFactory daoFactory, public RawDataService(final ISessionManager<Session> sessionManager,
IRawDataServiceInternal service) final IDAOFactory daoFactory, IRawDataServiceInternal service)
{ {
super(sessionManager, daoFactory); super(sessionManager, daoFactory);
this.service = service; this.service = service;
} }
public IRawDataService createLogger(IInvocationLoggerContext context) public IRawDataService createLogger(IInvocationLoggerContext context)
{ {
return new RawDataServiceLogger(getSessionManager(), context); return new RawDataServiceLogger(getSessionManager(), context);
...@@ -75,7 +75,7 @@ public class RawDataService extends AbstractServer<IRawDataService> implements I ...@@ -75,7 +75,7 @@ public class RawDataService extends AbstractServer<IRawDataService> implements I
result.add(sample.getSample()); result.add(sample.getSample());
} }
return result; return result;
} finally } finally
{ {
service.logout(session.getSessionToken()); service.logout(session.getSessionToken());
...@@ -116,7 +116,7 @@ public class RawDataService extends AbstractServer<IRawDataService> implements I ...@@ -116,7 +116,7 @@ public class RawDataService extends AbstractServer<IRawDataService> implements I
service.logout(session.getSessionToken()); service.logout(session.getSessionToken());
} }
} }
private SessionContextDTO login(String userID) private SessionContextDTO login(String userID)
{ {
SessionContextDTO session = service.tryToAuthenticate(userID, "dummy-password"); SessionContextDTO session = service.tryToAuthenticate(userID, "dummy-password");
...@@ -126,5 +126,15 @@ public class RawDataService extends AbstractServer<IRawDataService> implements I ...@@ -126,5 +126,15 @@ public class RawDataService extends AbstractServer<IRawDataService> implements I
} }
return session; return session;
} }
public int getMajorVersion()
{
return 1;
}
public int getMinorVersion()
{
return 0;
}
} }
...@@ -27,15 +27,12 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.Session; ...@@ -27,15 +27,12 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.Session;
import ch.systemsx.cisd.openbis.plugin.phosphonetx.shared.api.v1.IRawDataService; import ch.systemsx.cisd.openbis.plugin.phosphonetx.shared.api.v1.IRawDataService;
/** /**
*
*
* @author Franz-Josef Elmer * @author Franz-Josef Elmer
*/ */
class RawDataServiceLogger extends AbstractServerLogger implements IRawDataService class RawDataServiceLogger extends AbstractServerLogger implements IRawDataService
{ {
RawDataServiceLogger(ISessionManager<Session> sessionManager, RawDataServiceLogger(ISessionManager<Session> sessionManager, IInvocationLoggerContext context)
IInvocationLoggerContext context)
{ {
super(sessionManager, context); super(sessionManager, context);
} }
...@@ -61,4 +58,14 @@ class RawDataServiceLogger extends AbstractServerLogger implements IRawDataServi ...@@ -61,4 +58,14 @@ class RawDataServiceLogger extends AbstractServerLogger implements IRawDataServi
dataSetProcessingKey, numberOfDataSets); dataSetProcessingKey, numberOfDataSets);
} }
public int getMajorVersion()
{
return 1;
}
public int getMinorVersion()
{
return 0;
}
} }
...@@ -20,6 +20,7 @@ import java.util.List; ...@@ -20,6 +20,7 @@ import java.util.List;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import ch.systemsx.cisd.common.api.IRpcService;
import ch.systemsx.cisd.openbis.generic.shared.IServer; import ch.systemsx.cisd.openbis.generic.shared.IServer;
import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RoleSet; import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RoleSet;
import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RolesAllowed; import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RolesAllowed;
...@@ -28,10 +29,10 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample; ...@@ -28,10 +29,10 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample;
/** /**
* Service for querying raw data. * Service for querying raw data.
* *
* @author Franz-Josef Elmer * @author Franz-Josef Elmer
*/ */
public interface IRawDataService extends IServer public interface IRawDataService extends IServer, IRpcService
{ {
/** /**
* Returns all samples of type MS_INJECTION in space MS_DATA which have a parent sample which * Returns all samples of type MS_INJECTION in space MS_DATA which have a parent sample which
...@@ -47,11 +48,11 @@ public interface IRawDataService extends IServer ...@@ -47,11 +48,11 @@ public interface IRawDataService extends IServer
@Transactional(readOnly = true) @Transactional(readOnly = true)
@RolesAllowed(RoleSet.INSTANCE_ADMIN_OBSERVER) @RolesAllowed(RoleSet.INSTANCE_ADMIN_OBSERVER)
public List<DatastoreServiceDescription> listDataStoreServices(String sessionToken); public List<DatastoreServiceDescription> listDataStoreServices(String sessionToken);
/** /**
* Processes the data sets of specified samples by the DSS processing plug-in of specified key * Processes the data sets of specified samples by the DSS processing plug-in of specified key
* for the specified user. Implementations should check that the specified user is allowed * for the specified user. Implementations should check that the specified user is allowed to
* to read specified samples. * read specified samples.
*/ */
@Transactional(readOnly = true) @Transactional(readOnly = true)
@RolesAllowed(RoleSet.INSTANCE_ADMIN_OBSERVER) @RolesAllowed(RoleSet.INSTANCE_ADMIN_OBSERVER)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment