|
|
|
@ -3,6 +3,7 @@ package com.fr.plugin.file.submit.oss.script;
|
|
|
|
|
import com.fr.base.BaseFormula; |
|
|
|
|
import com.fr.base.Parameter; |
|
|
|
|
import com.fr.base.ParameterMapNameSpace; |
|
|
|
|
import com.fr.base.ResultFormula; |
|
|
|
|
import com.fr.general.GeneralUtils; |
|
|
|
|
import com.fr.general.xml.GeneralXMLTools; |
|
|
|
|
import com.fr.js.Hyperlink; |
|
|
|
@ -25,6 +26,11 @@ import com.fr.stable.xml.XMLPrintWriter;
|
|
|
|
|
import com.fr.stable.xml.XMLableReader; |
|
|
|
|
import com.fr.web.session.SessionIDInfo; |
|
|
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.HashSet; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.Set; |
|
|
|
|
|
|
|
|
|
public class OssDownloadHyperlink extends Hyperlink { |
|
|
|
|
|
|
|
|
|
private String bucket; |
|
|
|
@ -65,12 +71,14 @@ public class OssDownloadHyperlink extends Hyperlink {
|
|
|
|
|
if (ArrayUtils.isEmpty(providers)) { |
|
|
|
|
providers = ArrayUtils.add(providers, new Parameter(parameterName, variableValue.getValue())); |
|
|
|
|
} else { |
|
|
|
|
Map<String, ParameterProvider> map = new HashMap<String, ParameterProvider>(); |
|
|
|
|
for (ParameterProvider provider : providers) { |
|
|
|
|
if (AssistUtils.equals(provider.getValue(), parameterName)) { |
|
|
|
|
provider.setValue(variableValue.getValue()); |
|
|
|
|
} else { |
|
|
|
|
providers = ArrayUtils.add(providers, new Parameter(parameterName, variableValue.getValue())); |
|
|
|
|
} |
|
|
|
|
map.put(provider.getName(), provider); |
|
|
|
|
} |
|
|
|
|
if (map.containsKey(parameterName)) { |
|
|
|
|
map.get(parameterName).setValue(variableValue.getValue()); |
|
|
|
|
} else { |
|
|
|
|
providers = ArrayUtils.add(providers, new Parameter(parameterName, variableValue.getValue())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
setParameters(providers); |
|
|
|
@ -102,6 +110,9 @@ public class OssDownloadHyperlink extends Hyperlink {
|
|
|
|
|
Object value = provider.getValue(); |
|
|
|
|
if (value instanceof BaseFormula) { |
|
|
|
|
result = ((BaseFormula) value).getResult(); |
|
|
|
|
if (result instanceof ResultFormula) { |
|
|
|
|
result = ((ResultFormula)result).getResult(); |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
} else { |
|
|
|
|
result = value; |
|
|
|
|