Skip to content

Commit

Permalink
change JavaProcess.loadParameterValueNoFail
Browse files Browse the repository at this point in the history
take out isParameterTo param

metasfresh/metasfresh-webui-api-legacy#491
  • Loading branch information
teosarca committed Sep 15, 2017
1 parent 72b3950 commit 686a153
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -406,13 +406,13 @@ protected void loadParametersFromContext(final boolean failIfNotValid)
* @param isParameterTo
* @param source
*/
public final void loadParameterValueNoFail(final String parameterName, final boolean isParameterTo, final IRangeAwareParams source)
public final void loadParameterValueNoFail(final String parameterName, final IRangeAwareParams source)
{
final ProcessInfo pi = getProcessInfo();
final ProcessClassInfo processClassInfo = pi.getProcessClassInfo();

// No parameters => nothing to do
final Collection<ProcessClassParamInfo> parameterInfos = processClassInfo.getParameterInfos(parameterName, isParameterTo);
final Collection<ProcessClassParamInfo> parameterInfos = processClassInfo.getParameterInfos(parameterName);
if (parameterInfos.isEmpty())
{
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;
Expand Down Expand Up @@ -370,6 +371,15 @@ public List<ProcessClassParamInfo> getParameterInfos(final String parameterName,
{
return parameterInfos.get(ProcessClassParamInfo.createParameterUniqueKey(parameterName, parameterTo));
}

public List<ProcessClassParamInfo> getParameterInfos(final String parameterName)
{
final List<ProcessClassParamInfo> params = new ArrayList<>();
params.addAll(parameterInfos.get(ProcessClassParamInfo.createParameterUniqueKey(parameterName, false)));
params.addAll(parameterInfos.get(ProcessClassParamInfo.createParameterUniqueKey(parameterName, true)));
return params;
}


/**
* @return true if a current record needs to be selected when this process is called from gear/window.
Expand Down

0 comments on commit 686a153

Please sign in to comment.