Package org.apache.jackrabbit.core.config

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


    public void testUpgrade() throws Exception{
        File directory = new File("target", "upgrade");
        FileUtils.deleteQuietly(directory);

        File source = new File(directory, "source");
        RepositoryConfig config = RepositoryConfig.install(source);
        RepositoryImpl repository = RepositoryImpl.create(config);
        try {
            createSourceContent(repository);
        } finally {
            repository.shutdown();
View Full Code Here


     * @return a new jcr repository.
     * @throws RepositoryException if an error during creation occurs.
     */
    protected Repository createRepository(InputSource is, File homedir)
            throws RepositoryException {
        RepositoryConfig config = RepositoryConfig.create(is, homedir.getAbsolutePath());
        return RepositoryImpl.create(config);
    }
View Full Code Here

    this.userService = userService;
    if (session == null) {
      LOG.info("starting repo");
      String xml = "../../repository/configuration.xml";
      String dir = "../../repository/data";
      RepositoryConfig config = RepositoryConfig.create(xml, dir);
      repository = RepositoryImpl.create(config);
      LOG.info("repo started");
      LOG.info("logging in");
      login();
      LOG.info("logged in");
View Full Code Here

        }
        super.tearDown();
    }

    public void testMultipleInstantiation() throws Exception {
        RepositoryConfig config = RepositoryConfig.create(
                REPO_CONF.getAbsolutePath(), REPO_HOME.getAbsolutePath());
        repo = RepositoryImpl.create(config);

        for (int i = 0; i < 3; i++) {
            // try again
View Full Code Here

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

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

                    if (!homeDir.exists()) {
                        logger.info("Creating repository home directory " + home);
                        homeDir.mkdirs();
                    }
                    // Load the configuration and create the repository
                    RepositoryConfig rc = RepositoryConfig.create(config, home);
                    return RepositoryImpl.create(rc);
                } catch (IOException e) {
                    throw new RepositoryException(
                            "Automatic repository configuration failed", e);
                } catch (ConfigurationException e) {
View Full Code Here

     * when the JVM shuts down.
     *
     * @throws RepositoryException if the repository cannot be created
     */
    private void init() throws RepositoryException {
        RepositoryConfig config =
            RepositoryConfig.create(configFilePath, repHomeDir);
        delegatee = RepositoryImpl.create(config);
        hook = new Thread() {
            public void run() {
                shutdown();
View Full Code Here

                    if (!homeDir.exists()) {
                        logger.info("Creating repository home directory " + home);
                        homeDir.mkdirs();
                    }
                    // Load the configuration and create the repository
                    RepositoryConfig rc = RepositoryConfig.create(config, home);
                    return RepositoryImpl.create(rc);
                } catch (IOException e) {
                    throw new RepositoryException(
                            "Automatic repository configuration failed", e);
                } catch (ConfigurationException e) {
View Full Code Here

        try {
            if (instance == null) {
                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) {
            throw new RepositoryException(
View Full Code Here

         * Return the repository.
         */
        public RepositoryImpl create()
                throws RepositoryException {
            if (repository == null) {
                RepositoryConfig config = RepositoryConfig.create(configFile, homeDir);
                repository = RepositoryImpl.create(config);
            }

            count++;
            return repository;
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.