Package org.apache.jackrabbit.core.config

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


        new File(JACKRABBIT_HOME).delete();

        String user = "user";
        String pass = "pass";
        String workspace = null;
        RepositoryConfig config;
        try {
            config = RepositoryConfig.create(new InputSource(JCRMailboxManagerTest.class.getClassLoader().getResourceAsStream("test-repository.xml")), JACKRABBIT_HOME);
            repository = RepositoryImpl.create(config);
        } catch (ConfigurationException e) {
            e.printStackTrace();
View Full Code Here


        new File(JACKRABBIT_HOME).delete();

        String user = "user";
        String pass = "pass";
        String workspace = null;
        RepositoryConfig config = RepositoryConfig.create(new InputSource(this.getClass().getClassLoader().getResourceAsStream("test-repository.xml")), JACKRABBIT_HOME);
        repository = RepositoryImpl.create(config);

        // Register imap cnd file
        JCRUtils.registerCnd(repository, workspace, user, pass);
        MailboxSessionJCRRepository sessionRepos = new GlobalMailboxSessionJCRRepository(repository, workspace, user, pass);
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

    public void repositoryStart() throws Exception {
        InputStream config =
            RepositoryImpl.class.getResourceAsStream("repository.xml");
        String home = new File("target/cltest").getAbsolutePath();
        RepositoryConfig rc = RepositoryConfig.create(config, home);
        RepositoryImpl repository = RepositoryImpl.create(rc);

        try {
            Context ctx = getInitialContext();
            ctx.bind(REPOSITORY_NAME, repository);
View Full Code Here

   * @param homedir
   * @return
   * @throws RepositoryException
   */
  private 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

            AccessControlUtils.addAccessControlEntry(admin, "/", EveryonePrincipal.getInstance(), new String[]{"jcr:read"}, true);
            admin.save();
            admin.logout();
        } else {
            InputStream in = IntegrationTestBase.class.getResourceAsStream("repository.xml");
            RepositoryConfig cfg = RepositoryConfig.create(in, REPO_HOME);
            repository = RepositoryImpl.create(cfg);
        }
        log.info("repository created: {} {}",
                repository.getDescriptor(Repository.REP_NAME_DESC),
                repository.getDescriptor(Repository.REP_VERSION_DESC));
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

    private void assertRepository(File directory) throws Exception {
        File configuration = new File(directory, "repository.xml");

        try {
            RepositoryConfig config = RepositoryConfig.create(
                    configuration.getPath(), directory.getPath());
            RepositoryImpl repository = RepositoryImpl.create(config);
            try {
                Session session = repository.login(
                        new SimpleCredentials("admin", "admin".toCharArray()));
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

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.