Examples of interpolate()


Examples of org.ejbca.core.model.ra.UserNotificationParamGen.interpolate()

                        UserNotificationParamGen paramGen = new UserNotificationParamGen(data, approvalAdminDN, findUser(admin, admin.getUsername()));
                        /*
                         * substitute any $ fields in the receipient and from
                         * fields
                         */
                        rcptemail = paramGen.interpolate(rcptemail);
                        String fromemail = paramGen.interpolate(not.getNotificationSender());
                        String subject = paramGen.interpolate(not.getNotificationSubject());
                        String message = paramGen.interpolate(not.getNotificationMessage());
                        MailSender.sendMailOrThrow(fromemail, Arrays.asList(rcptemail), MailSender.NO_CC, subject, message, MailSender.NO_ATTACHMENTS);
                        String logmsg = intres.getLocalizedMessage("ra.sentnotification", data.getUsername(), rcptemail);
View Full Code Here

Examples of org.geotools.util.InterpolationProperties.interpolate()

        Properties properties = new Properties();
        properties.put("foo.x", "123");
        properties.put("foo.y", "abc");
        properties.put("foo.z", "bar");
        InterpolationProperties props = new InterpolationProperties(properties);
        String result = props.interpolate(
                "123ajh${foo.z} akl ${foo.y}${foo.y} laskj ${foo.x}\n"
                        + "foo.x${foo.x}${foo.x} ${foo.z}${foo.y}");
        assertEquals("123ajhbar akl abcabc laskj 123\nfoo.x123123 barabc", result);
    }
View Full Code Here

Examples of org.gephi.ranking.api.Interpolator.interpolate()

            for (Node node : graph.getNodes()) {
                Number value = ranking.getValue(node);
                if (value != null) {
                    float normalizedValue = ranking.normalize(value);
                    if (transformer.isInBounds(normalizedValue)) {
                        normalizedValue = interpolator.interpolate(normalizedValue);
                        transformer.transform(node, normalizedValue);
                    }
                }
            }
        } else if (ranking.getElementType().equals(Ranking.EDGE_ELEMENT)) {
View Full Code Here

Examples of org.hibernate.validator.internal.engine.messageinterpolation.InterpolationTerm.interpolate()

    while ( matcher.find() ) {
      String match = matcher.group( 1 );
      InterpolationTerm expression = new InterpolationTerm( match, locale );
      if ( expression.needsEvaluation() ) {
        String resolvedExpression = expression.interpolate( context );
        resolvedExpression = Matcher.quoteReplacement( resolvedExpression );
        matcher.appendReplacement( sb, resolvedExpression );
      }
    }
    matcher.appendTail( sb );
View Full Code Here

Examples of org.hibernate.validator.internal.engine.messageinterpolation.ParameterTermResolver.interpolate()

      log.getElUnsupported( term );
      return term;
    }
    else {
      ParameterTermResolver parameterTermResolver = new ParameterTermResolver();
      return parameterTermResolver.interpolate( context, term );
    }
  }

}
View Full Code Here

Examples of org.jboss.seam.core.Interpolator.interpolate()

    @Test
    public void testInterpolation()
    {
        Interpolator interpolator = Interpolator.instance();

        Assert.assertEquals(interpolator.interpolate("#0 #1 #2", 3, 5, 7), "3 5 7");
        Assert.assertEquals(interpolator.interpolate("{0} {1} {2}", 3, 5, 7), "3 5 7");

        // this tests that the result of an expression evaluation is not evaluated again
        Assert.assertEquals(interpolator.interpolate("{1}", "bad", "{0}"), "{0}");
       
View Full Code Here

Examples of org.jboss.seam.core.Interpolator.interpolate()

    public void testInterpolation()
    {
        Interpolator interpolator = Interpolator.instance();

        Assert.assertEquals(interpolator.interpolate("#0 #1 #2", 3, 5, 7), "3 5 7");
        Assert.assertEquals(interpolator.interpolate("{0} {1} {2}", 3, 5, 7), "3 5 7");

        // this tests that the result of an expression evaluation is not evaluated again
        Assert.assertEquals(interpolator.interpolate("{1}", "bad", "{0}"), "{0}");
       
        // this tests that embedded {} expressions are parsed correctly.
View Full Code Here

Examples of org.jboss.seam.core.Interpolator.interpolate()

        Assert.assertEquals(interpolator.interpolate("#0 #1 #2", 3, 5, 7), "3 5 7");
        Assert.assertEquals(interpolator.interpolate("{0} {1} {2}", 3, 5, 7), "3 5 7");

        // this tests that the result of an expression evaluation is not evaluated again
        Assert.assertEquals(interpolator.interpolate("{1}", "bad", "{0}"), "{0}");
       
        // this tests that embedded {} expressions are parsed correctly.
        Assert.assertEquals(interpolator.interpolate(CHOICE_EXPR, 0), "There are no files.");
        Assert.assertEquals(interpolator.interpolate(CHOICE_EXPR, 1), "There is one file.");
        Assert.assertEquals(interpolator.interpolate(CHOICE_EXPR, 2), "There are 2 files.");
View Full Code Here

Examples of org.jboss.seam.core.Interpolator.interpolate()

        // this tests that the result of an expression evaluation is not evaluated again
        Assert.assertEquals(interpolator.interpolate("{1}", "bad", "{0}"), "{0}");
       
        // this tests that embedded {} expressions are parsed correctly.
        Assert.assertEquals(interpolator.interpolate(CHOICE_EXPR, 0), "There are no files.");
        Assert.assertEquals(interpolator.interpolate(CHOICE_EXPR, 1), "There is one file.");
        Assert.assertEquals(interpolator.interpolate(CHOICE_EXPR, 2), "There are 2 files.");

        // test sequences of multiple #
        Assert.assertEquals(interpolator.interpolate("#0",2), "2");
View Full Code Here

Examples of org.jboss.seam.core.Interpolator.interpolate()

        // this tests that the result of an expression evaluation is not evaluated again
        Assert.assertEquals(interpolator.interpolate("{1}", "bad", "{0}"), "{0}");
       
        // this tests that embedded {} expressions are parsed correctly.
        Assert.assertEquals(interpolator.interpolate(CHOICE_EXPR, 0), "There are no files.");
        Assert.assertEquals(interpolator.interpolate(CHOICE_EXPR, 1), "There is one file.");
        Assert.assertEquals(interpolator.interpolate(CHOICE_EXPR, 2), "There are 2 files.");

        // test sequences of multiple #
        Assert.assertEquals(interpolator.interpolate("#0",2), "2");
        Assert.assertEquals(interpolator.interpolate("##0",2), "#2");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.