Skip to content
Snippets Groups Projects
Commit 152cd3a2 authored by felmer's avatar felmer
Browse files

LMS-1593 add user ID to DataSetInformation as registrator

SVN: 17914
parent 61773637
No related branches found
No related tags found
No related merge requests found
...@@ -432,6 +432,7 @@ public abstract class DataSetRegistrationAlgorithm ...@@ -432,6 +432,7 @@ public abstract class DataSetRegistrationAlgorithm
private NewExternalData createExternalData() private NewExternalData createExternalData()
{ {
final NewExternalData data = new NewExternalData(); final NewExternalData data = new NewExternalData();
data.setUserId(dataSetInformation.getUploadingUserIdOrNull());
data.setUserEMail(dataSetInformation.tryGetUploadingUserEmail()); data.setUserEMail(dataSetInformation.tryGetUploadingUserEmail());
data.setExtractableData(dataSetInformation.getExtractableData()); data.setExtractableData(dataSetInformation.getExtractableData());
data.setLocatorType(getTypeExtractor().getLocatorType(incomingDataSetFile)); data.setLocatorType(getTypeExtractor().getLocatorType(incomingDataSetFile));
......
...@@ -607,11 +607,7 @@ class PutDataSetExecutor implements IDataSetHandlerRpc ...@@ -607,11 +607,7 @@ class PutDataSetExecutor implements IDataSetHandlerRpc
final SessionContextDTO session = final SessionContextDTO session =
service.getOpenBisService().tryGetSession(sessionToken); service.getOpenBisService().tryGetSession(sessionToken);
dataSetInfo.setUploadingUserEmail(session.getUserEmail()); dataSetInfo.setUploadingUserId(session.getUserName());
// TODO 2010-06-10, CR, LMS-1564: When registering, set the registrator to the session
// owner; only an admin on
// the space or an ETL server can override.
return dataSetInfo; return dataSetInfo;
} }
} }
......
...@@ -88,6 +88,8 @@ public class DataSetInformation implements Serializable ...@@ -88,6 +88,8 @@ public class DataSetInformation implements Serializable
* Email of uploading user. * Email of uploading user.
*/ */
private String uploadingUserEmailOrNull; private String uploadingUserEmailOrNull;
private String uploadingUserIdOrNull;
/** This constructor is for serialization. */ /** This constructor is for serialization. */
public DataSetInformation() public DataSetInformation()
...@@ -104,6 +106,16 @@ public class DataSetInformation implements Serializable ...@@ -104,6 +106,16 @@ public class DataSetInformation implements Serializable
this.uploadingUserEmailOrNull = uploadingUserEmail; this.uploadingUserEmailOrNull = uploadingUserEmail;
} }
public void setUploadingUserId(String uploadingUserIdOrNull)
{
this.uploadingUserIdOrNull = uploadingUserIdOrNull;
}
public String getUploadingUserIdOrNull()
{
return uploadingUserIdOrNull;
}
public final BooleanOrUnknown getIsCompleteFlag() public final BooleanOrUnknown getIsCompleteFlag()
{ {
return isCompleteFlag; return isCompleteFlag;
......
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