Examples of resolve()


Examples of org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve()

*/
public class DefaultNamespaceHandlerResolverTests extends TestCase {

  public void testResolvedMappedHandler() {
    DefaultNamespaceHandlerResolver resolver = new DefaultNamespaceHandlerResolver(getClass().getClassLoader());
    NamespaceHandler handler = resolver.resolve("http://www.springframework.org/schema/util");
    assertNotNull("Handler should not be null.", handler);
    assertEquals("Incorrect handler loaded", UtilNamespaceHandler.class, handler.getClass());
  }

  public void testResolvedMappedHandlerWithNoArgCtor() {
View Full Code Here

Examples of org.springframework.beans.factory.xml.NamespaceHandlerResolver.resolve()

                                    "with 'ref' attribute", pc.extractSource(element));
                        }
                    }
                    providers.add(new RuntimeBeanReference(providerElt.getAttribute(ATT_REF)));
                } else {
                    BeanDefinition provider = resolver.resolve(providerElt.getNamespaceURI()).parse(providerElt, pc);
                    Assert.notNull(provider, "Parser for " + providerElt.getNodeName() + " returned a null bean definition");
                    String providerId = pc.getReaderContext().generateBeanName(provider);
                    pc.registerBeanComponent(new BeanComponentDefinition(provider, providerId));
                    providers.add(new RuntimeBeanReference(providerId));
                }
View Full Code Here

Examples of org.springframework.data.hadoop.store.strategy.naming.ChainedFileNamingStrategy.resolve()

    support.setInWritingSuffix(".tmp");
    support.setFileNamingStrategy(strategy);

    TestUtils.callMethod("initOutputContext", support);
    assertThat(strategy.resolve(null).toString(), is("base-fakeuuid-0-1.extension"));
  }

  @Test
  public void testFindFiles2() throws Exception {
    List<FileNamingStrategy> strategies = new ArrayList<FileNamingStrategy>();
View Full Code Here

Examples of org.springframework.expression.BeanResolver.resolve()

    BeanResolver beanResolver = state.getEvaluationContext().getBeanResolver();
    if (beanResolver==null) {
      throw new SpelEvaluationException(getStartPosition(),SpelMessage.NO_BEAN_RESOLVER_REGISTERED, beanname);
    }
    try {
       TypedValue bean = new TypedValue(beanResolver.resolve(state.getEvaluationContext(),beanname));
       return bean;
    } catch (AccessException ae) {
      throw new SpelEvaluationException( getStartPosition(), ae, SpelMessage.EXCEPTION_DURING_BEAN_RESOLUTION,
        beanname, ae.getMessage());
    }
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.internal.model.namespaces.DelegatingNamespaceHandlerResolver.resolve()

        cl = JdtUtils.getClassLoader(file.getProject(), cl);
      }
     
      // Construct NamespaceHandlerResolver using the project's classpath if configured
      DelegatingNamespaceHandlerResolver resolver = new DelegatingNamespaceHandlerResolver(cl, config);
      NamespaceHandler handler = resolver.resolve(namespaceUri);
      if (handler instanceof NamespaceHandlerSupport) {
       
        XmlReaderContext readerContext = new XmlReaderContext((Resource) config.getAdapter(Resource.class),
            new NoOpProblemReporter(), null, null, new XmlBeanDefinitionReader(
                new DefaultBeanDefinitionRegistry()), resolver);
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.internal.model.namespaces.ProjectClasspathExtensibleUriResolver.resolve()

    final String batchUri = ConfigCoreUtils.getSelectedSchemaLocation(document, BatchSchemaConstants.URI);
    IFile file = cEditor.getResourceFile();

    ProjectClasspathExtensibleUriResolver resolver = new ProjectClasspathExtensibleUriResolver();
    final String resolvedBatchUri = resolver.resolve(file, null, batchUri, batchUri);

    final CountDownLatch latch = new CountDownLatch(1);
    if (cache.getStatus(resolvedBatchUri) == CMDocumentCache.STATUS_LOADED) {
      latch.countDown();
    }
View Full Code Here

Examples of org.springframework.test.context.ActiveProfilesResolver.resolve()

            + "type [%s] for test class [%s].", resolverClass.getName(), rootDeclaringClass.getName());
        logger.error(msg);
        throw new IllegalStateException(msg, e);
      }

      String[] profiles = resolver.resolve(rootDeclaringClass);
      if (profiles == null) {
        String msg = String.format(
          "ActiveProfilesResolver [%s] returned a null array of bean definition profiles.",
          resolverClass.getName());
        logger.error(msg);
View Full Code Here

Examples of org.springframework.xd.module.options.DefaultModuleOptionsMetadataResolver.resolve()

  @Test
  public void testModuleProperties() {
    ModuleOptionsMetadataResolver moduleOptionsMetadataResolver = new DefaultModuleOptionsMetadataResolver();
    String resource = "classpath:/";
    ModuleDefinition definition = ModuleDefinitions.simple(moduleName, processor, resource);
    ModuleOptionsMetadata metadata = moduleOptionsMetadataResolver.resolve(definition);

    assertThat(
        metadata,
        containsInAnyOrder(moduleOptionNamed("prefix"), moduleOptionNamed("suffix"),
            moduleOptionNamed("prefixOnly")));
View Full Code Here

Examples of org.springframework.xd.module.options.ModuleOptionsMetadataResolver.resolve()

  @Test
  public void testModuleProperties() {
    ModuleOptionsMetadataResolver moduleOptionsMetadataResolver = new DefaultModuleOptionsMetadataResolver();
    String resource = "classpath:/";
    ModuleDefinition definition = ModuleDefinitions.simple(moduleName, processor, resource);
    ModuleOptionsMetadata metadata = moduleOptionsMetadataResolver.resolve(definition);

    assertThat(
        metadata,
        containsInAnyOrder(moduleOptionNamed("prefix"), moduleOptionNamed("suffix"),
            moduleOptionNamed("prefixOnly")));
View Full Code Here

Examples of org.springframework.yarn.fs.SmartResourceLocalizer.resolve()

    if (resourceLocalizer instanceof SmartResourceLocalizer) {
      SmartResourceLocalizer smartResourceLocalizer = (SmartResourceLocalizer)resourceLocalizer;
      smartResourceLocalizer.setStagingId(applicationId.toString());
      if (!distribute) {
        smartResourceLocalizer.resolve();
      } else {
        smartResourceLocalizer.distribute();
      }
    } else {
      log.warn("Resource localizer is not instance of SmartResourceLocalizer, thus we're unable to resolve and distrute manually");
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.