Package org.apache.jackrabbit.core.config

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


            }
        }
    }

    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


     * @return
     * @throws RepositoryException
     */
    protected Repository createRepository(InputSource is, File homedir)
            throws RepositoryException {
        RepositoryConfig config = RepositoryConfig.create(is, homedir.getAbsolutePath());
        return RepositoryImpl.create(config);
    }
View Full Code Here

        }

        InputStream ins = null;
        try {

            RepositoryConfig crc;
            if (configURLObj != null && configURLObj.length() > 0) {
                // check whether the URL is a file path
                File configFile = new File(configURLObj);
                if (configFile.canRead()) {
View Full Code Here

            File source = new File(directory, "source");
            source.mkdirs();

            InputStream repoConfig = getRepositoryConfig();
            RepositoryConfig config;
            if (repoConfig == null) {
                config = RepositoryConfig.install(source);
            } else {
                OutputStream out = FileUtils.openOutputStream(new File(source, "repository.xml"));
                IOUtils.copy(repoConfig, out);
View Full Code Here

     * @return
     * @throws RepositoryException
     */
    protected Repository createRepository(InputSource is, File homedir)
            throws RepositoryException {
        RepositoryConfig config = RepositoryConfig.create(is, homedir.getAbsolutePath());
        return RepositoryImpl.create(config);
    }
View Full Code Here

            } else {
                URL configURL = new URL(configURLObj);
                ins = configURL.openStream();
            }

            RepositoryConfig crc = RepositoryConfig.create(ins, home);
            return RepositoryImpl.create(crc);
           
        } catch (IOException ioe) {
           
            log(LogService.LOG_ERROR,
View Full Code Here

     * @return
     * @throws RepositoryException
     */
    protected Repository createRepository(InputSource is, File homedir)
            throws RepositoryException {
        RepositoryConfig config = RepositoryConfig.create(is, homedir.getAbsolutePath());
        return RepositoryImpl.create(config);
    }
View Full Code Here

            } finally {
                input.close();
            }
        }

        RepositoryConfig config = RepositoryConfig.create(xml, dir);
        return RepositoryImpl.create(config);
    }
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

            } finally {
                input.close();
            }
        }

        RepositoryConfig config = RepositoryConfig.create(xml, dir);
        return RepositoryImpl.create(config);
    }
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.