Search in sources :

Example 1 with SimpleParameterSetter

use of org.pentaho.platform.engine.services.solution.SimpleParameterSetter in project pentaho-platform by pentaho.

the class ActionSequenceParameterContentGenerator method getPathParameters.

@SuppressWarnings("unchecked")
public IParameterProvider getPathParameters() {
    if (this.pathParameters != null) {
        return this.pathParameters;
    }
    // $NON-NLS-1$
    IParameterProvider pathParams = this.parameterProviders.get("path");
    SimpleParameterSetter parameters = new SimpleParameterSetter();
    if (pathParams != null) {
        Iterator pathParamIterator = pathParams.getParameterNames();
        while (pathParamIterator.hasNext()) {
            String param = (String) pathParamIterator.next();
            parameters.setParameter(param, pathParams.getParameter(param));
        }
    }
    this.pathParameters = parameters;
    return parameters;
}
Also used : IParameterProvider(org.pentaho.platform.api.engine.IParameterProvider) SimpleParameterSetter(org.pentaho.platform.engine.services.solution.SimpleParameterSetter) Iterator(java.util.Iterator)

Example 2 with SimpleParameterSetter

use of org.pentaho.platform.engine.services.solution.SimpleParameterSetter in project pentaho-platform by pentaho.

the class ActionSequenceParameterContentGenerator method getRequestParameters.

@SuppressWarnings("unchecked")
private IParameterProvider getRequestParameters() {
    if (this.requestParameters != null) {
        return this.requestParameters;
    }
    if (this.parameterProviders == null) {
        return new SimpleParameterProvider();
    }
    // $NON-NLS-1$
    IParameterProvider requestParams = this.parameterProviders.get("request");
    SimpleParameterSetter parameters = new SimpleParameterSetter();
    Iterator requestParamIterator = requestParams.getParameterNames();
    while (requestParamIterator.hasNext()) {
        String param = (String) requestParamIterator.next();
        parameters.setParameter(param, requestParams.getParameter(param));
    }
    this.requestParameters = parameters;
    return parameters;
}
Also used : IParameterProvider(org.pentaho.platform.api.engine.IParameterProvider) SimpleParameterSetter(org.pentaho.platform.engine.services.solution.SimpleParameterSetter) Iterator(java.util.Iterator) SimpleParameterProvider(org.pentaho.platform.engine.core.solution.SimpleParameterProvider)

Example 3 with SimpleParameterSetter

use of org.pentaho.platform.engine.services.solution.SimpleParameterSetter in project pentaho-platform by pentaho.

the class ActionSequenceParameterUiContentGenerator method getRequestParameters.

@SuppressWarnings("unchecked")
private IParameterProvider getRequestParameters() {
    if (this.parameterProviders == null) {
        return new SimpleParameterProvider();
    }
    // $NON-NLS-1$
    IParameterProvider requestParams = this.parameterProviders.get("request");
    SimpleParameterSetter parameters = new SimpleParameterSetter();
    Iterator requestParamIterator = requestParams.getParameterNames();
    while (requestParamIterator.hasNext()) {
        String param = (String) requestParamIterator.next();
        parameters.setParameter(param, requestParams.getParameter(param));
    }
    this.requestParameters = parameters;
    return parameters;
}
Also used : IParameterProvider(org.pentaho.platform.api.engine.IParameterProvider) SimpleParameterSetter(org.pentaho.platform.engine.services.solution.SimpleParameterSetter) Iterator(java.util.Iterator) SimpleParameterProvider(org.pentaho.platform.engine.core.solution.SimpleParameterProvider)

Example 4 with SimpleParameterSetter

use of org.pentaho.platform.engine.services.solution.SimpleParameterSetter in project pentaho-platform by pentaho.

the class ActionSequenceContentGenerator method getPathParameters.

@SuppressWarnings("unchecked")
public IParameterProvider getPathParameters() {
    if (this.pathParameters != null) {
        return this.pathParameters;
    }
    // $NON-NLS-1$
    IParameterProvider pathParams = this.parameterProviders.get("path");
    SimpleParameterSetter parameters = new SimpleParameterSetter();
    Iterator pathParamIterator = pathParams.getParameterNames();
    while (pathParamIterator.hasNext()) {
        String param = (String) pathParamIterator.next();
        parameters.setParameter(param, pathParams.getParameter(param));
    }
    this.pathParameters = parameters;
    return parameters;
}
Also used : IParameterProvider(org.pentaho.platform.api.engine.IParameterProvider) SimpleParameterSetter(org.pentaho.platform.engine.services.solution.SimpleParameterSetter) Iterator(java.util.Iterator)

Example 5 with SimpleParameterSetter

use of org.pentaho.platform.engine.services.solution.SimpleParameterSetter in project pentaho-platform by pentaho.

the class ActionSequenceContentGenerator method getRequestParameters.

@SuppressWarnings("unchecked")
private IParameterProvider getRequestParameters() {
    if (this.requestParameters != null) {
        return this.requestParameters;
    }
    if (this.parameterProviders == null) {
        return new SimpleParameterProvider();
    }
    // $NON-NLS-1$
    IParameterProvider requestParams = this.parameterProviders.get("request");
    SimpleParameterSetter parameters = new SimpleParameterSetter();
    Iterator requestParamIterator = requestParams.getParameterNames();
    while (requestParamIterator.hasNext()) {
        String param = (String) requestParamIterator.next();
        parameters.setParameter(param, requestParams.getParameter(param));
    }
    this.requestParameters = parameters;
    return parameters;
}
Also used : IParameterProvider(org.pentaho.platform.api.engine.IParameterProvider) SimpleParameterSetter(org.pentaho.platform.engine.services.solution.SimpleParameterSetter) Iterator(java.util.Iterator) SimpleParameterProvider(org.pentaho.platform.engine.core.solution.SimpleParameterProvider)

Aggregations

Iterator (java.util.Iterator)6 IParameterProvider (org.pentaho.platform.api.engine.IParameterProvider)6 SimpleParameterSetter (org.pentaho.platform.engine.services.solution.SimpleParameterSetter)6 SimpleParameterProvider (org.pentaho.platform.engine.core.solution.SimpleParameterProvider)3