Package org.drools.resource

Examples of org.drools.resource.ResourceHandler


            throw new RuntimeException( e );
        }
    }

    public void testGetSpreadsheetByVersion() {
        ResourceHandler rHandler = new SvnResourceHandler();
        rHandler.setRepositoryUrl( svnUrl );
        rHandler.setCredentials( "mrtrout",
                                 "drools" );

        RepositoryBean bean = new RepositoryBean();
        bean.setName( "test" );
        bean.setResourceType( ResourceType.XLS_FILE );

        //this value is unique to your subversion implementation
        bean.setVersion( "1" );

        try {
            File f = new File( testFilePath + "/spreadsheets/test.xls" );
            // System.out.println(rHandler.getResourceStream(bean));
            assertEquals( SvnUtil.getByteArrayOutputFromFile( f ).toString(),
                          rHandler.getResourceStream( bean ).toString() );
        } catch ( Exception e ) {
            throw new RuntimeException( e );
        }
    }
View Full Code Here

TOP

Related Classes of org.drools.resource.ResourceHandler

Copyright © 2018 www.massapicom. 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.