Examples of MemoryFileSystem


Examples of org.apache.jackrabbit.core.fs.mem.MemoryFileSystem

    private void assertPersistenceManager(PersistenceManager manager)
            throws Exception {
        manager.init(new PMContext(
                directory,
                new MemoryFileSystem(),
                RepositoryImpl.ROOT_NODE_ID,
                new NamespaceRegistryImpl(new MemoryFileSystem()),
                null,
                null,
                new RepositoryStatisticsImpl()));
        try {
            assertCreateNewNode(manager);
View Full Code Here

Examples of org.apache.jackrabbit.core.fs.mem.MemoryFileSystem

        }
        super.tearDown();
    }

    private FileSystem createFileSystem() {
        FileSystem fs = new MemoryFileSystem();
        BufferedWriter writer = null;       
        try {
            fs.createFolder("/");
            FileSystemResource file = new FileSystemResource(fs, "/retention");

            writer = new BufferedWriter(new OutputStreamWriter(file.getOutputStream()));
            writer.write(((NodeImpl) childN).getNodeId().toString());
        } catch (FileSystemException e) {
View Full Code Here

Examples of org.apache.jackrabbit.core.fs.mem.MemoryFileSystem

        // Choose a FileSystem for the BlobStore based on whether data is persistent or not
        if (persistent) {
            blobFS = new LocalFileSystem();
            ((LocalFileSystem) blobFS).setRoot(new File(context.getHomeDir(), "blobs"));
        } else {
            blobFS = new MemoryFileSystem();
        }
        blobFS.init();
        blobStore = new FileSystemBLOBStore(blobFS);

        if (persistent) {
View Full Code Here

Examples of org.drools.compiler.compiler.io.memory.MemoryFileSystem

    public KieBuilder buildAll() {
        init();

        // kModuleModel will be null if a provided pom.xml or kmodule.xml is invalid
        if ( !isBuilt() && kModuleModel != null ) {
            trgMfs = new MemoryFileSystem();
            writePomAndKModule();
            addKBasesFilesToTrg();
            markSource();

            kModule = new MemoryKieModule( releaseId,
View Full Code Here

Examples of org.drools.compiler.compiler.io.memory.MemoryFileSystem

    }

    public KieBuilder buildAll() {
        // kModuleModel will be null if a provided pom.xml or kmodule.xml is invalid
        if ( !isBuilt() && kModuleModel != null ) {
            trgMfs = new MemoryFileSystem();
            writePomAndKModule();

            compileJavaClasses();
            addKBasesFilesToTrg();
View Full Code Here

Examples of org.drools.compiler.compiler.io.memory.MemoryFileSystem

                }
                kModule = ClasspathKieProject.fetchKModule( new URL( urlPath )  );
                log.debug( "fetched KieModule from resource :" + resource  );
            } else {
                // might be a byte[] resource
                MemoryFileSystem mfs = MemoryFileSystem.readFromJar( res.getInputStream() );
                byte[] bytes = mfs.getBytes( KieModuleModelImpl.KMODULE_JAR_PATH );
                KieModuleModel kieProject = KieModuleModelImpl.fromXML( new ByteArrayInputStream( bytes ) );
                setDefaultsforEmptyKieModule(kieProject);

                String pomProperties = mfs.findPomProperties();
                ReleaseId releaseId = ReleaseIdImpl.fromPropertiesString(pomProperties);
                kModule = new MemoryKieModule( releaseId, kieProject, mfs );
            }
            return kModule;
        } catch ( Exception e ) {
View Full Code Here

Examples of org.drools.compiler.compiler.io.memory.MemoryFileSystem

    public KieBuilder buildAll() {
        init();

        // kModuleModel will be null if a provided pom.xml or kmodule.xml is invalid
        if ( !isBuilt() && kModuleModel != null ) {
            trgMfs = new MemoryFileSystem();
            writePomAndKModule();
            addKBasesFilesToTrg();
            markSource();

            kModule = new MemoryKieModule( releaseId,
View Full Code Here

Examples of org.drools.compiler.compiler.io.memory.MemoryFileSystem

        KieFileSystem {
   
    private final MemoryFileSystem mfs;

    public KieFileSystemImpl() {
        this(new MemoryFileSystem());
    }
View Full Code Here

Examples of org.drools.compiler.compiler.io.memory.MemoryFileSystem

        String className = "Message";

        ClassDefinition def = new ClassDefinition(pojoNS + "." + className);
        def.addField(new FieldDefinition("text", String.class.getName()));
        byte[] messageClazz = ClassBuilderFactory.getDefaultBeanClassBuilder().buildClass(def,null);
        MemoryFileSystem mfs = new MemoryFileSystem();
        mfs.write(pojoNS.replace('.', '/') + "/" + className+".class", messageClazz);
        byte[] pomContent = generatePomXml(pojoID).getBytes();
        mfs.write("META-INF/maven/" + pojoID.getGroupId() + "/" + pojoID.getArtifactId() + "/pom.xml", pomContent);
        mfs.write("META-INF/maven/" + pojoID.getGroupId() + "/" + pojoID.getArtifactId() + "/pom.properties", generatePomProperties(pojoID).getBytes());
        byte[] pojojar = mfs.writeAsBytes();
        MavenRepository.getMavenRepository().deployArtifact(pojoID, pojojar, pomContent);

        // Create and deploy a kjar that depends on the previous pojo jar
        String kjarNS = "org.kie.test1";
        ReleaseId kjarID = KieServices.Factory.get().newReleaseId(kjarNS, "rkjar", "1.0.0");
View Full Code Here

Examples of org.drools.compiler.compiler.io.memory.MemoryFileSystem

    }

    public KieBuilder buildAll() {
        // kModuleModel will be null if a provided pom.xml or kmodule.xml is invalid
        if ( !isBuilt() && kModuleModel != null ) {
            trgMfs = new MemoryFileSystem();
            writePomAndKModule();

            compileJavaClasses();
            addKBasesFilesToTrg();
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.