/** * @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; }
/** * @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; }
/** * @param name The name of this turn. Not empty. * @param destination The URI of the destination (telephone, IP telephony address). Not empty. */ public Transfer(String name, String destination) { super(name); Assert.notEmpty(destination, "destination"); mDestination = destination; }
/** @param variables The list of variables to declare. Not null. */ public final void setVariables(VariableDeclarationList variables) { Assert.notNull(variables, "variables"); mVariables = variables; }
/** @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; }
/** * @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); }
/** * @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; }
public Builder setMethod(SubmitMethod method) { Assert.notNull(method, "method"); mMethod = method; return this; }
public Builder addSubmitParameterString(String name, String string) { Assert.notEmpty(name, "name"); mSubmitParameters.addWithString(name, string); return this; }
public Builder addSubmitParameterExpression(String name, String expression) { Assert.notEmpty(name, "name"); mSubmitParameters.addWithExpression(name, expression); return this; }
public Builder addVoiceXmlParameter(Parameter parameter) { Assert.notNull(parameter, "parameter"); mParameters.add(parameter); return this; }
public Builder uri(String uri) { Assert.notEmpty(uri, "uri"); mUri = uri; return this; }
private Parameter(String name) { Assert.notEmpty(name, "name"); mName = name; }
/** * @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()); }