All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.drools.repository.RepositorySessionUtil Maven / Gradle / Ivy

There is a newer version: 5.1.1
Show newest version
package org.drools.repository;

import java.io.File;

import javax.jcr.Repository;
import javax.jcr.Session;
import javax.jcr.SimpleCredentials;

import org.apache.log4j.Logger;
import org.drools.repository.security.DroolsRepositoryAccessManager;

//import junit.framework.Assert;

/**
 * This is a utility to simulate session behavior for the test suite.
 * @author Michael Neale
 *
 */
public class RepositorySessionUtil {

    private static ThreadLocal repo = new ThreadLocal();

    private static final Logger log = Logger.getLogger( RepositorySessionUtil.class );

    public static boolean deleteDir(File dir) {

        if (dir.isDirectory()) {
            String[] children = dir.list();
            for (int i=0; i




© 2015 - 2025 Weber Informatics LLC | Privacy Policy