Examples of PlaceholderResolver


Examples of io.fabric8.api.PlaceholderResolver

        FabricService fabricService = createMock(FabricService.class);
        expect(fabricService.adapt(CuratorFramework.class)).andReturn(curator).anyTimes();
        replay(fabricService);

        PlaceholderResolver resolver = getEncryptedPropertyResolver();
        assertEquals("encryptedpassword",resolver.resolve(fabricService, null, null, null, "crypt:URdoo9++D3tsoC9ODrTfLNK5WzviknO3Ig6qbI2HuvQ="));
        verify(curator);
        verify(getDataBuilder);
    }
View Full Code Here

Examples of io.fabric8.api.PlaceholderResolver

        FabricService fabricService = createMock(FabricService.class);
        expect(fabricService.adapt(CuratorFramework.class)).andReturn(curator).anyTimes();
        replay(fabricService);

        PlaceholderResolver resolver = getEncryptedPropertyResolver();
        assertEquals("encryptedpassword",resolver.resolve(fabricService, null, null, null, "crypt:URdoo9++D3tsoC9ODrTfLNK5WzviknO3Ig6qbI2HuvQ="));
        verify(curator);
        verify(getDataBuilder);
    }
View Full Code Here

Examples of io.fabric8.api.PlaceholderResolver

        expect(fabricService.getContainer(EasyMock.<String > anyObject())).andReturn(new ContainerImpl(null, "root", fabricService));

        replay(fabricService);
        replay(dataStore);

        PlaceholderResolver resolver = getContainerPlaceholderResolver();
        assertEquals("root",resolver.resolve(fabricService, null, null, null, "container:name"));
        verify(fabricService);
        verify(dataStore);
    }
View Full Code Here

Examples of io.fabric8.api.PlaceholderResolver

        verify(dataStore);
    }

    @Test
    public void testResolveCurrentAttributes() throws Exception {
        PlaceholderResolver resolver = getContainerPlaceholderResolver();
        assertEquals(ip,resolver.resolve(fabricService, null, null, null, "container:ip"));
        assertEquals(localhostname,resolver.resolve(fabricService, null, null, null, "container:localhostname"));
        assertEquals(bindaddress,resolver.resolve(fabricService, null, null, null, "container:bindaddress"));
        assertEquals(containerResolver,resolver.resolve(fabricService, null, null, null, "container:resolver"));

        verify(fabricService);
        verify(dataStore);
    }
View Full Code Here

Examples of io.fabric8.api.PlaceholderResolver

        verify(dataStore);
    }

    @Test
    public void testResolveNameContainerAttributes() throws Exception {
        PlaceholderResolver resolver = getContainerPlaceholderResolver();
        assertEquals(ip,resolver.resolve(fabricService, null, null, null, "container:root/ip"));
        assertEquals(localhostname,resolver.resolve(fabricService, null, null, null, "container:root/localhostname"));
        assertEquals(bindaddress,resolver.resolve(fabricService, null, null, null, "container:root/bindaddress"));
        assertEquals(containerResolver,resolver.resolve(fabricService, null, null, null, "container:root/resolver"));

        verify(fabricService);
        verify(dataStore);
    }
View Full Code Here

Examples of io.fabric8.api.PlaceholderResolver

        verify(dataStore);
    }

    @Test
    public void testResolveAttributeCase() throws Exception {
        PlaceholderResolver resolver = getContainerPlaceholderResolver();
        assertEquals(ip,resolver.resolve(fabricService, null, null, null, "container:root/IP"));
        assertEquals(localhostname,resolver.resolve(fabricService, null, null, null, "container:root/LocalHostName"));
        assertEquals(bindaddress,resolver.resolve(fabricService, null, null, null, "container:root/Bindaddress"));
        assertEquals(containerResolver,resolver.resolve(fabricService, null, null, null, "container:root/Resolver"));

        verify(fabricService);
        verify(dataStore);
    }
View Full Code Here

Examples of org.eclipse.e4.ui.internal.workbench.PlaceholderResolver

    }
   
    appContext.set(Logger.class.getName(), serviceContext.get(ILoggerProvider.class).getClassLogger(E4Workbench.class));

    appContext.set(EModelService.class, new ModelServiceImpl(appContext));
    appContext.set(EPlaceholderResolver.class, new PlaceholderResolver());

    // translation
    String locale = Locale.getDefault().toString();
    appContext.set(TranslationService.LOCALE, locale);
    TranslationService bundleTranslationProvider = TranslationProviderFactory.bundleTranslationService(appContext);
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

    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
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.