Example #1
0
    /**
     * @param name The name of the parameter. Not empty.
     * @param expression The ECMAScript expression of the parameter. Not null.
     * @return The newly created subdialogue parameter
     */
    public static Parameter createWithExpression(String name, String expression) {
      Assert.notNull(expression, "expression");

      Parameter parameter = new Parameter(name);
      parameter.mExpression = expression;
      return parameter;
    }
Example #2
0
    /**
     * @param name The name of the parameter. Not empty.
     * @param value The string value of the parameter. Not null.
     * @return The newly created subdialogue parameter
     */
    public static Parameter createWithValue(String name, String value) {
      Assert.notNull(value, "value");

      Parameter parameter = new Parameter(name);
      parameter.mValue = value;
      return parameter;
    }
Example #3
0
 /** @param submitParameters A list of variable to submit when invoking the URI. Not null. */
 public final void setSubmitParameters(VariableList submitParameters) {
   Assert.notNull(submitParameters, "submitParameters");
   mSubmitParameters = submitParameters;
 }
Example #4
0
 /**
  * @param parameters A list of {@link Parameter} that will be passed to the subdialogue. Not null.
  */
 public final void setSubdialogueParameters(Collection<Parameter> parameters) {
   Assert.noNullValues(parameters, "parameters");
   mParameters = new ArrayList<Parameter>(parameters);
 }
Example #5
0
 /**
  * @param name The name of this turn. Not empty.
  * @param uri The URI of the subdialogue. Not empty.
  */
 public SubdialogueCall(String name, String uri) {
   super(name);
   Assert.notEmpty(uri, "uri");
   mUri = uri;
 }
Example #6
0
 public Builder setMethod(SubmitMethod method) {
   Assert.notNull(method, "method");
   mMethod = method;
   return this;
 }
Example #7
0
 public Builder addSubmitParameterString(String name, String string) {
   Assert.notEmpty(name, "name");
   mSubmitParameters.addWithString(name, string);
   return this;
 }
Example #8
0
 public Builder addSubmitParameterExpression(String name, String expression) {
   Assert.notEmpty(name, "name");
   mSubmitParameters.addWithExpression(name, expression);
   return this;
 }
Example #9
0
 public Builder addVoiceXmlParameter(Parameter parameter) {
   Assert.notNull(parameter, "parameter");
   mParameters.add(parameter);
   return this;
 }
Example #10
0
 public Builder uri(String uri) {
   Assert.notEmpty(uri, "uri");
   mUri = uri;
   return this;
 }
Example #11
0
 private Parameter(String name) {
   Assert.notEmpty(name, "name");
   mName = name;
 }
Example #12
0
 /**
  * @param name The name of the parameter. Not empty.
  * @param json The JSON value of the parameter. Not null.
  * @return The newly created subdialogue parameter
  */
 public static Parameter createWithJson(String name, JsonValue json) {
   Assert.notNull(json, "json");
   return createWithExpression(name, json.toString());
 }