Examples of PlaceholderResolver


Examples of org.springframework.util.PropertyPlaceholderHelper.PlaceholderResolver

    return new PropertyPlaceholderHelper(this.placeholderPrefix, this.placeholderSuffix,
        this.valueSeparator, ignoreUnresolvablePlaceholders);
  }

  private String doResolvePlaceholders(String text, PropertyPlaceholderHelper helper) {
    return helper.replacePlaceholders(text, new PlaceholderResolver() {
      public String resolvePlaceholder(String placeholderName) {
        return getProperty(placeholderName);
      }
    });
  }
View Full Code Here

Examples of org.springframework.util.PropertyPlaceholderHelper.PlaceholderResolver

   */
  @Deprecated
  protected String parseStringValue(String strVal, Properties props, Set visitedPlaceholders) {
    PropertyPlaceholderHelper helper = new PropertyPlaceholderHelper(
        placeholderPrefix, placeholderSuffix, valueSeparator, ignoreUnresolvablePlaceholders);
    PlaceholderResolver resolver = new PropertyPlaceholderConfigurerResolver(props);
    return helper.replacePlaceholders(strVal, resolver);
  }
View Full Code Here

Examples of org.springframework.util.PropertyPlaceholderHelper.PlaceholderResolver

  public SpelView(String template) {
    this.template = template;
    this.context.addPropertyAccessor(new MapAccessor());
    this.helper = new PropertyPlaceholderHelper("${", "}");
    this.resolver = new PlaceholderResolver() {
      public String resolvePlaceholder(String name) {
        Expression expression = parser.parseExpression(name);
        Object value = expression.getValue(context);
        return value == null ? null : value.toString();
      }
View Full Code Here

Examples of org.springframework.util.PropertyPlaceholderHelper.PlaceholderResolver

   */
  @Deprecated
  protected String parseStringValue(String strVal, Properties props, Set<?> visitedPlaceholders) {
    PropertyPlaceholderHelper helper = new PropertyPlaceholderHelper(
        placeholderPrefix, placeholderSuffix, valueSeparator, ignoreUnresolvablePlaceholders);
    PlaceholderResolver resolver = new PropertyPlaceholderConfigurerResolver(props);
    return helper.replacePlaceholders(strVal, resolver);
  }
View Full Code Here

Examples of org.springframework.util.PropertyPlaceholderHelper.PlaceholderResolver

    private final PlaceholderResolver resolver;

    public StaticStringValueResolver(final Map<String, String> values) {
      this.helper = new PropertyPlaceholderHelper("${", "}", ":", false);
      this.resolver = new PlaceholderResolver() {
        @Override
        public String resolvePlaceholder(String placeholderName) {
          return values.get(placeholderName);
        }
      };
View Full Code Here

Examples of org.springframework.util.PropertyPlaceholderHelper.PlaceholderResolver

   */
  @Deprecated
  protected String parseStringValue(String strVal, Properties props, Set visitedPlaceholders) {
    PropertyPlaceholderHelper helper = new PropertyPlaceholderHelper(
        placeholderPrefix, placeholderSuffix, valueSeparator, ignoreUnresolvablePlaceholders);
    PlaceholderResolver resolver = new PropertyPlaceholderConfigurerResolver(props);
    return helper.replacePlaceholders(strVal, resolver);
  }
View Full Code Here

Examples of org.springframework.util.PropertyPlaceholderHelper.PlaceholderResolver

  }

  public ModuleOptionsMetadata collect(ConfigurableListableBeanFactory beanFactory) {
    final SimpleModuleOptionsMetadata result = new SimpleModuleOptionsMetadata();

    final PlaceholderResolver placeholderResolver = new PlaceholderResolver() {

      @Override
      public String resolvePlaceholder(String placeholderName) {
        int colon = placeholderName.indexOf(':');
        String optionName = colon >= 0 ? placeholderName.substring(0, colon) : placeholderName;
View Full Code Here

Examples of rocket.beans.rebind.placeholder.PlaceHolderResolver

    final InputStream inputStream = generator.getResource(fileName);
    final Document document = this.getDocumentBuilder().parse(inputStream);
    this.setDocument(document);

    // process the local tags within this document
    final PlaceHolderResolver placeHolderResolver = this.loadPlaceholderFiles(document);
    this.setPlaceHolderResolver(placeHolderResolver);
    final List<IncludeTag> included = this.visitIncludedFiles(document, fileName, placeHolderResolver);

    this.visitBeans();
    this.visitRpcs();
View Full Code Here

Examples of rocket.beans.rebind.placeholder.PlaceHolderResolver

   * Loads all placeholders for the given document
   *
   * @return A PlaceHolderResolver holding all values.
   */
  protected PlaceHolderResolver loadPlaceholderFiles(final Document document) {
    final PlaceHolderResolver placeHolderResolver = new PlaceHolderResolver();

    final NodeList tags = document.getElementsByTagName(Constants.PLACE_HOLDERS_TAG);
    final int count = tags.getLength();
    for (int i = 0; i < count; i++) {
      final Element element = (Element) tags.item(i);
      final String fileName = element.getAttribute(Constants.PLACE_HOLDERS_FILE_ATTRIBUTE);
      if (Tester.isNullOrEmpty(fileName)) {
        continue;
      }

      placeHolderResolver.load(fileName);
    }

    return placeHolderResolver;
  }
View Full Code Here

Examples of rocket.beans.rebind.placeholder.PlaceHolderResolver

  }

  protected Set<Property> visitProperties(final List<Element> propertys) {
    final Set<Property> properties = new TreeSet<Property>(PROPERTY_NAME_SORTER);

    final PlaceHolderResolver placeHolderResolver = this.getPlaceHolderResolver();

    final Iterator<Element> iterator = propertys.iterator();
    while (iterator.hasNext()) {
      final Element element = iterator.next();
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.