Examples of ClassPathResource


Examples of org.drools.io.impl.ClassPathResource

        assertNull( processInstance );
    }
   
    public void testProcessListener() {
        KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
        kbuilder.add( new ClassPathResource( "WorkItemsProcess.rf" ),
                      ResourceType.DRF );
        KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
        kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

        EntityManagerFactory emf = Persistence.createEntityManagerFactory( "org.drools.persistence.jpa" );
View Full Code Here

Examples of org.drools.io.impl.ClassPathResource

        assertTrue(events.isEmpty());
    }

    public void testPersistenceSubProcess() {
        KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
        kbuilder.add( new ClassPathResource( "SuperProcess.rf" ),
                      ResourceType.DRF );
        kbuilder.add( new ClassPathResource( "SubProcess.rf" ),
                      ResourceType.DRF );
        KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
        kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

        EntityManagerFactory emf = Persistence.createEntityManagerFactory( "org.drools.persistence.jpa" );
View Full Code Here

Examples of org.drools.io.impl.ClassPathResource

        assertNull( processInstance );
    }
   
    public void testPersistenceVariables() {
        KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
        kbuilder.add( new ClassPathResource( "VariablesProcess.rf" ), ResourceType.DRF );
        for (KnowledgeBuilderError error: kbuilder.getErrors()) {
            System.out.println(error);
        }
        KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
        kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
View Full Code Here

Examples of org.flywaydb.core.internal.util.scanner.classpath.ClassPathResource

     * Prints the version number on the console.
     *
     * @throws java.io.IOException when the version could not be read.
     */
    private static void printVersion() throws IOException {
        String version = new ClassPathResource("version.txt", Thread.currentThread().getContextClassLoader()).loadAsString("UTF-8");
        LOG.info("Flyway (Command-line Tool) v." + version);
        LOG.info("");
    }
View Full Code Here

Examples of org.opensaml.util.resource.ClasspathResource

                if (this.idpMetadataPath.startsWith(CommonHelper.RESOURCE_PREFIX)) {
                    String path = this.idpMetadataPath.substring(CommonHelper.RESOURCE_PREFIX.length());
                    if (!path.startsWith("/")) {
                        path = "/" + path;
                    }
                    resource = new ClasspathResource(path);
                } else {
                    resource = new FilesystemResource(this.idpMetadataPath);
                }
                idpMetadataProvider = new ResourceBackedMetadataProvider(new Timer(true), resource);
            } else {
View Full Code Here

Examples of org.springframework.core.io.ClassPathResource

    }

    private HttpServletRequest getRequest()
            throws IOException
    {
        Resource resource = new ClassPathResource("/org/codehaus/xfire/spring/echoRequest.xml");
        byte[] bytes = FileCopyUtils.copyToByteArray(resource.getInputStream());
        MockHttpServletRequest request = new MockHttpServletRequest("POST", "/Echo");
        request.setContentType("text/xml");
        request.setContent(bytes);
        return request;
    }
View Full Code Here

Examples of org.springframework.core.io.ClassPathResource

  }

  @Test
  public void exceptionWithoutAnnotatedServiceInterface() throws Exception {
    JsonRpcServer jsonRpcServer = new JsonRpcServer(mapper, new Service(), ServiceInterfaceWithoutAnnotation.class);
    jsonRpcServer.handle(new ClassPathResource(JSON_FILE).getInputStream(), baos);

    String response = baos.toString(JSON_ENCODING);       
    JsonNode json = mapper.readTree(response);
    JsonNode error = json.get("error");
View Full Code Here

Examples of org.springframework.core.io.ClassPathResource

  }

  @Test
  public void exceptionWithAnnotatedServiceInterface() throws Exception {
    JsonRpcServer jsonRpcServer = new JsonRpcServer(mapper, new Service(), ServiceInterfaceWithAnnotation.class);
    jsonRpcServer.handle(new ClassPathResource(JSON_FILE).getInputStream(), baos);

    String response = baos.toString(JSON_ENCODING);       
    JsonNode json = mapper.readTree(response);
    JsonNode error = json.get("error");
View Full Code Here

Examples of org.springframework.core.io.ClassPathResource

  }

  @Test
  public void exceptionWithAnnotatedServiceInterfaceMessageAndData() throws Exception {
    JsonRpcServer jsonRpcServer = new JsonRpcServer(mapper, new Service(), ServiceInterfaceWithAnnotationMessageAndData.class);
    jsonRpcServer.handle(new ClassPathResource(JSON_FILE).getInputStream(), baos);

    String response = baos.toString(JSON_ENCODING);
    JsonNode json = mapper.readTree(response);
    JsonNode error = json.get("error");
View Full Code Here

Examples of org.springframework.core.io.ClassPathResource

  }
 
  @Test
  public void exceptionWithMsgInException() throws Exception {
    JsonRpcServer jsonRpcServer = new JsonRpcServer(mapper, new ServiceWithExceptionMsg(), ServiceInterfaceWithAnnotation.class);
    jsonRpcServer.handle(new ClassPathResource(JSON_FILE).getInputStream(), baos);

    String response = baos.toString(JSON_ENCODING);
    JsonNode json = mapper.readTree(response);
    JsonNode error = json.get("error");
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.