Package org.apache.jackrabbit.core.config

Examples of org.apache.jackrabbit.core.config.RepositoryConfig


     * @return repository instance
     * @throws RepositoryException if the repository could not be created
     */
    protected JackrabbitRepository getRepository(Reference reference)
            throws RepositoryException {
        RepositoryConfig config = RepositoryConfig.create(
                reference.get(CONFIGFILEPATH_ADDRTYPE).getContent().toString(),
                reference.get(REPHOMEDIR_ADDRTYPE).getContent().toString());
        return RepositoryImpl.create(config);
    }
View Full Code Here


            NodeBuilder root, Map<Integer, String> idxToPrefix)
            throws RepositoryException, IOException {
        logger.info("Copying default workspace");

        // Copy all the default workspace content
        RepositoryConfig config = source.getRepositoryConfig();
        String name = config.getDefaultWorkspaceName();

        PersistenceManager pm =
                source.getWorkspaceInfo(name).getPersistenceManager();
        NamespaceRegistryImpl nr = source.getNamespaceRegistry();
View Full Code Here

        super(reference);
    }

    @Override
    protected JackrabbitRepository createRepository() throws RepositoryException {
        RepositoryConfig config = RepositoryConfig.create(
                resolvePath(getReference().get(CONFIGFILEPATH_ADDRTYPE).getContent().toString()),
                resolvePath(getReference().get(REPHOMEDIR_ADDRTYPE).getContent().toString()));
        return JahiaRepositoryImpl.create(config);
    }
View Full Code Here

     * @return repository instance
     * @throws RepositoryException if the repository could not be created
     */
    protected JackrabbitRepository createRepository()
            throws RepositoryException, IOException {
        RepositoryConfig config = RepositoryConfig.create(configFile.getFile().toString(), homeDir.getFile().toString());
        return JahiaRepositoryImpl.create(new JahiaRepositoryConfig(config));
    }
View Full Code Here

                    + RepositoryImpl.class + " got: " + rep.getClass());
            return;
        }

        RepositoryImpl r = (RepositoryImpl) rep;
        RepositoryConfig conf = r.getConfig();
        Collection<WorkspaceConfig> coll = conf.getWorkspaceConfigs();
        String[] names = new String[coll.size()];
        Iterator<WorkspaceConfig> wspIt = coll.iterator();
        for (int i = 0; wspIt.hasNext(); i++) {
            WorkspaceConfig wsc = (WorkspaceConfig) wspIt.next();
            names[i] = wsc.getName();
View Full Code Here

            } finally {
                input.close();
            }
        }

        RepositoryConfig config = RepositoryConfig.create(xml, dir);
        return RepositoryImpl.create(config);
    }
View Full Code Here

            }
        }
    }

    private void backup(File sourceDir) throws Exception {
        RepositoryConfig source;
        if (command.hasOption("conf")) {
            source = RepositoryConfig.create(
                    new File(command.getOptionValue("conf")), sourceDir);
        } else {
            source = RepositoryConfig.create(sourceDir);
        }

        File targetDir;
        if (command.hasOption("backup-repo")) {
            targetDir = new File(command.getOptionValue("backup-repo"));
        } else {
            int i = 1;
            do {
                targetDir = new File("jackrabbit-backup" + i++);
            } while (targetDir.exists());
        }

        RepositoryConfig target;
        if (command.hasOption("backup-conf")) {
            target = RepositoryConfig.install(
                    new File(command.getOptionValue("backup-conf")), targetDir);
        } else {
            target = RepositoryConfig.install(targetDir);
View Full Code Here

                } catch (Exception e) {
                    // Not running within the main test suite
                    InputStream xml =
                        TestRepository.class.getResourceAsStream(CONF_RESOURCE);
                    String home = System.getProperty(HOME_PROPERTY, HOME_DEFAULT);
                    RepositoryConfig config = RepositoryConfig.create(xml, home);
                    instance = new TransientRepository(config);
                }
            }
            return instance;
        } catch (ConfigurationException e) {
View Full Code Here

     * @return repository instance
     * @throws RepositoryException if the repository could not be created
     */
    protected JackrabbitRepository createRepository()
            throws RepositoryException {
        RepositoryConfig config = RepositoryConfig.create(
                reference.get(CONFIGFILEPATH_ADDRTYPE).getContent().toString(),
                reference.get(REPHOMEDIR_ADDRTYPE).getContent().toString());
        return RepositoryImpl.create(config);
    }
View Full Code Here

    private static String pass = "pass";
    private static String workspace = null;
    @BeforeClass
    public static void before() throws RepositoryException {
      
        RepositoryConfig  config = RepositoryConfig.create(new InputSource(JCRMailboxManagerTest.class.getClassLoader().getResourceAsStream("test-repository.xml")), JACKRABBIT_HOME);
        repository = RepositoryImpl.create(config);
      

        // Register imap cnd file
        JCRUtils.registerCnd(repository, workspace, user, pass);
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.config.RepositoryConfig

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.