Commit 98b3d5b7 authored by Rasko Leinonen's avatar Rasko Leinonen

3.2.2. Fix to mg-Webin authentication.

parent 3059304c
......@@ -11,7 +11,7 @@ plugins {
apply plugin: 'io.spring.dependency-management'
group = 'uk.ac.ebi.ena.webin-cli'
version = '3.2.1'
version = '3.2.2'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
......
......@@ -15,180 +15,176 @@ import java.io.File;
import uk.ac.ebi.ena.webin.cli.manifest.processor.MetadataProcessorParameters;
import uk.ac.ebi.ena.webin.cli.manifest.processor.metadata.*;
public class WebinCliParameters implements MetadataProcessorParameters
{
private String submissionAccount;
private WebinCliContext context;
private File manifestFile;
private String username;
private String password;
private File outputDir;
private File inputDir = new File( "." );
private String centerName;
private boolean validate;
private boolean submit;
private boolean test;
private boolean ascp;
private SampleProcessor sampleProcessor;
private StudyProcessor studyProcessor;
private SampleXmlProcessor sampleXmlProcessor;
private RunProcessor runProcessor;
private AnalysisProcessor analysisProcessor;
public WebinCliParameters() {
}
/*
public String getSubmissionAccount() {
return submissionAccount;
}
*/
public void setSubmissionAccount(String submissionAccount) {
this.submissionAccount = submissionAccount;
}
public WebinCliContext getContext() {
return context;
}
public void setContext(WebinCliContext context) {
this.context = context;
}
public File getManifestFile() {
return manifestFile;
}
public void setManifestFile(File manifestFile) {
this.manifestFile = manifestFile;
}
/*
public String getUsername() {
return username;
}
*/
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public File getOutputDir() {
return outputDir;
}
public void setOutputDir(File outputDir) {
this.outputDir = outputDir;
}
public File getInputDir() {
return inputDir;
}
public void setInputDir(File inputDir) {
this.inputDir = inputDir;
}
public String getCenterName() {
return centerName;
}
public void setCenterName(String centerName) {
this.centerName = centerName;
}
public boolean isValidate() {
return validate;
}
public void setValidate(boolean validate) {
this.validate = validate;
}
public boolean isSubmit() {
return submit;
}
public void setSubmit(boolean submit) {
this.submit = submit;
}
public boolean isTest() {
return test;
}
public void setTest(boolean test) {
this.test = test;
}
public boolean isAscp() {
return ascp;
}
public void setAscp(boolean ascp) {
this.ascp = ascp;
}
public SampleProcessor getSampleProcessor() {
return sampleProcessor;
}
public void setSampleProcessor(SampleProcessor sampleProcessor) {
this.sampleProcessor = sampleProcessor;
}
public StudyProcessor getStudyProcessor() {
return studyProcessor;
}
public void setStudyProcessor(StudyProcessor studyProcessor) {
this.studyProcessor = studyProcessor;
}
public SampleXmlProcessor getSampleXmlProcessor() {
return sampleXmlProcessor;
}
public void setSampleXmlProcessor(SampleXmlProcessor sampleXmlProcessor) {
this.sampleXmlProcessor = sampleXmlProcessor;
}
public RunProcessor getRunProcessor() {
return runProcessor;
}
public void setRunProcessor(RunProcessor runProcessor) {
this.runProcessor = runProcessor;
}
public AnalysisProcessor getAnalysisProcessor() {
return analysisProcessor;
}
public void setAnalysisProcessor(AnalysisProcessor analysisProcessor) {
this.analysisProcessor = analysisProcessor;
}
public String getWebinServiceUserName() {
// Use the submission account given by the Webin authentication
// service for web based authentication. Web based authentication
// supports superuser password for Webin-N submission accounts.
return submissionAccount;
}
public String getFileUploadServiceUserName() {
// Preserve su-Webin-N superuser submission account for FTP and Aspera authentication.
// FTP and Aspera only support superuser password for su-Webin-N submission accounts.
return username.startsWith("su-Webin") ? username : submissionAccount;
}
public class WebinCliParameters implements MetadataProcessorParameters {
private String submissionAccount;
private WebinCliContext context;
private File manifestFile;
private String username;
private String password;
private File outputDir;
private File inputDir = new File(".");
private String centerName;
private boolean validate;
private boolean submit;
private boolean test;
private boolean ascp;
private SampleProcessor sampleProcessor;
private StudyProcessor studyProcessor;
private SampleXmlProcessor sampleXmlProcessor;
private RunProcessor runProcessor;
private AnalysisProcessor analysisProcessor;
public WebinCliParameters() {}
/*
public String getSubmissionAccount() {
return submissionAccount;
}
*/
public void setSubmissionAccount(String submissionAccount) {
this.submissionAccount = submissionAccount;
}
public WebinCliContext getContext() {
return context;
}
public void setContext(WebinCliContext context) {
this.context = context;
}
public File getManifestFile() {
return manifestFile;
}
public void setManifestFile(File manifestFile) {
this.manifestFile = manifestFile;
}
/*
public String getUsername() {
return username;
}
*/
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public File getOutputDir() {
return outputDir;
}
public void setOutputDir(File outputDir) {
this.outputDir = outputDir;
}
public File getInputDir() {
return inputDir;
}
public void setInputDir(File inputDir) {
this.inputDir = inputDir;
}
public String getCenterName() {
return centerName;
}
public void setCenterName(String centerName) {
this.centerName = centerName;
}
public boolean isValidate() {
return validate;
}
public void setValidate(boolean validate) {
this.validate = validate;
}
public boolean isSubmit() {
return submit;
}
public void setSubmit(boolean submit) {
this.submit = submit;
}
public boolean isTest() {
return test;
}
public void setTest(boolean test) {
this.test = test;
}
public boolean isAscp() {
return ascp;
}
public void setAscp(boolean ascp) {
this.ascp = ascp;
}
public SampleProcessor getSampleProcessor() {
return sampleProcessor;
}
public void setSampleProcessor(SampleProcessor sampleProcessor) {
this.sampleProcessor = sampleProcessor;
}
public StudyProcessor getStudyProcessor() {
return studyProcessor;
}
public void setStudyProcessor(StudyProcessor studyProcessor) {
this.studyProcessor = studyProcessor;
}
public SampleXmlProcessor getSampleXmlProcessor() {
return sampleXmlProcessor;
}
public void setSampleXmlProcessor(SampleXmlProcessor sampleXmlProcessor) {
this.sampleXmlProcessor = sampleXmlProcessor;
}
public RunProcessor getRunProcessor() {
return runProcessor;
}
public void setRunProcessor(RunProcessor runProcessor) {
this.runProcessor = runProcessor;
}
public AnalysisProcessor getAnalysisProcessor() {
return analysisProcessor;
}
public void setAnalysisProcessor(AnalysisProcessor analysisProcessor) {
this.analysisProcessor = analysisProcessor;
}
public String getWebinServiceUserName() {
return username;
}
public String getFileUploadServiceUserName() {
// Preserve su-Webin-N and mg-Webin-N for FTP and Aspera authentication.
return (username.startsWith("su-Webin") || username.startsWith("mg-Webin"))
? username
: submissionAccount;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment