Skip to content
Snippets Groups Projects
Commit fdb1d8a2 authored by juanf's avatar juanf
Browse files

SSDM-1809 : Share is now configurable on the ingestion service properties file

SVN: 33986
parent 9b0b8ed2
No related branches found
No related tags found
No related merge requests found
...@@ -75,7 +75,9 @@ public abstract class IngestionService<T extends DataSetInformation> extends Agg ...@@ -75,7 +75,9 @@ public abstract class IngestionService<T extends DataSetInformation> extends Agg
{ {
private static final String AGGREGATION_SERVICE_SCRATCH_DIR_NAME = "aggregation-service"; private static final String AGGREGATION_SERVICE_SCRATCH_DIR_NAME = "aggregation-service";
private static final String AGGREGATION_SERVICE_SHARE_ID = "share-id";
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static IMailClient getMailClientFromProperties(Properties dssProperties) private static IMailClient getMailClientFromProperties(Properties dssProperties)
...@@ -115,6 +117,8 @@ public abstract class IngestionService<T extends DataSetInformation> extends Agg ...@@ -115,6 +117,8 @@ public abstract class IngestionService<T extends DataSetInformation> extends Agg
getMailClientFromProperties(dssProperties)); getMailClientFromProperties(dssProperties));
} }
private String shareId;
/** /**
* Internal constructor that allows explicit configuration of all services. Used in testing. * Internal constructor that allows explicit configuration of all services. Used in testing.
* *
...@@ -131,6 +135,7 @@ public abstract class IngestionService<T extends DataSetInformation> extends Agg ...@@ -131,6 +135,7 @@ public abstract class IngestionService<T extends DataSetInformation> extends Agg
this.dssProperties = dssProperties; this.dssProperties = dssProperties;
this.openBisService = openBisService; this.openBisService = openBisService;
this.mailClient = mailClient; this.mailClient = mailClient;
this.shareId = dssProperties.getProperty(AGGREGATION_SERVICE_SHARE_ID);
} }
@Override @Override
...@@ -373,8 +378,11 @@ public abstract class IngestionService<T extends DataSetInformation> extends Agg ...@@ -373,8 +378,11 @@ public abstract class IngestionService<T extends DataSetInformation> extends Agg
protected String getShareId() protected String getShareId()
{ {
// hard coded to share 1 -- could be made configurable in the future. if(this.shareId != null) {
return "1"; return this.shareId;
} else {
return "1";
}
} }
protected boolean shouldNotifySuccessfulRegistration() protected boolean shouldNotifySuccessfulRegistration()
......
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