예제 #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;
    }
예제 #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;
    }
예제 #3
0
 private void assertInvariant() {
   Assert.ensure(
       mSpeechRecognitionConfiguration != null || mDtmfRecognitionConfiguration != null,
       "Must provide a non-null configuration for speech or DTMF");
 }
예제 #4
0
 /**
  * @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;
 }
예제 #5
0
 /** @param variables The list of variables to declare. Not null. */
 public final void setVariables(VariableDeclarationList variables) {
   Assert.notNull(variables, "variables");
   mVariables = variables;
 }
예제 #6
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;
 }
예제 #7
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);
 }
예제 #8
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;
 }
예제 #9
0
 public Builder setMethod(SubmitMethod method) {
   Assert.notNull(method, "method");
   mMethod = method;
   return this;
 }
예제 #10
0
 public Builder addSubmitParameterString(String name, String string) {
   Assert.notEmpty(name, "name");
   mSubmitParameters.addWithString(name, string);
   return this;
 }
예제 #11
0
 public Builder addSubmitParameterExpression(String name, String expression) {
   Assert.notEmpty(name, "name");
   mSubmitParameters.addWithExpression(name, expression);
   return this;
 }
예제 #12
0
 public Builder addVoiceXmlParameter(Parameter parameter) {
   Assert.notNull(parameter, "parameter");
   mParameters.add(parameter);
   return this;
 }
예제 #13
0
 public Builder uri(String uri) {
   Assert.notEmpty(uri, "uri");
   mUri = uri;
   return this;
 }
예제 #14
0
 private Parameter(String name) {
   Assert.notEmpty(name, "name");
   mName = name;
 }
예제 #15
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());
 }