Examples of RepositoryFactory


Examples of javax.jcr.RepositoryFactory

        private static Repository getRepository(Map parameters)
                throws RepositoryException {
            Repository repo = null;
            Iterator factories = ServiceRegistry.lookupProviders(RepositoryFactory.class);
            while (factories.hasNext()) {
                RepositoryFactory factory = (RepositoryFactory) factories.next();
                repo = factory.getRepository(parameters);
                if (repo != null) {
                    break;
                }
            }
            return repo;

Examples of javax.jcr.RepositoryFactory

     */
    protected Repository acquireJcrRepository( Map<String, String> jcrConfig ) {
        try {
            Iterator<RepositoryFactory> factories = ServiceRegistry.lookupProviders(RepositoryFactory.class);
            while (factories.hasNext()) {
                RepositoryFactory factory = factories.next();
                log.debug("Trying to acquire JCR repository from factory " + factory);
                Repository repository = factory.getRepository(jcrConfig);
                if (repository != null) {
                    log.debug("Successfully acquired JCR repository from factory " + factory);
                    return repository;
                }
                log.debug("Could not acquire JCR repository from factory " + factory);

Examples of javax.jcr.RepositoryFactory

        log.append(newline);
        log.append("The following RepositoryFactory classes were consulted:");
        Iterator<RepositoryFactory> iterator =
                ServiceRegistry.lookupProviders(RepositoryFactory.class);
        while (iterator.hasNext()) {
            RepositoryFactory factory = iterator.next();
            log.append(newline);
            log.append("    ");
            log.append(factory.getClass().getName());
            try {
                Repository repository = factory.getRepository(parameters);
                if (repository != null) {
                    // We found the requested repository! Return it
                    // and just ignore the error message being built.
                    return repository;
                } else {

Examples of javax.jcr.RepositoryFactory

//                        return repo;
//                    }
//                }

            Class<?> jcrFactory = ClassUtil.forName(jcrImplementationClass, this.getClass());
            RepositoryFactory factory = (RepositoryFactory) jcrFactory.newInstance();
            repository = factory.getRepository(properties);
            this.factory = factory;
            return repository;

        } catch (Exception re) {
            throw new RepositoryException(re);

Examples of org.apache.jackrabbit.api.jsr283.RepositoryFactory

        private static Repository getRepository(Map parameters)
                throws RepositoryException {
            Repository repo = null;
            Iterator factories = ServiceRegistry.lookupProviders(RepositoryFactory.class);
            while (factories.hasNext()) {
                RepositoryFactory factory = (RepositoryFactory) factories.next();
                repo = factory.getRepository(parameters);
                if (repo != null) {
                    break;
                }
            }
            return repo;

Examples of org.apache.jackrabbit.commons.repository.RepositoryFactory

        Map helper = new BeanMap(test.getField("helper").get(null));
        final Repository repository =
            (Repository) helper.get("repository");
        final Credentials superuser =
            (Credentials) helper.get("superuserCredentials");
        return new ProxyRepository(new RepositoryFactory() {

            public Repository getRepository() throws RepositoryException {
                return repository;
            }

Examples of org.apache.jackrabbit.commons.repository.RepositoryFactory

     * or throws an exception if not.
     *
     * @return repository factory
     */
    public RepositoryFactory getRepositoryFactory() {
        return new RepositoryFactory() {
            public Repository getRepository() throws RepositoryException {
                Repository r = repository;
                if (r != null) {
                    return repository;
                } else {

Examples of org.apache.jackrabbit.commons.repository.RepositoryFactory

     * or throws an exception if not.
     *
     * @return repository factory
     */
    public RepositoryFactory getRepositoryFactory() {
        return new RepositoryFactory() {
            public Repository getRepository() throws RepositoryException {
                Repository r = repository;
                if (r != null) {
                    return repository;
                } else {

Examples of org.apache.jackrabbit.commons.repository.RepositoryFactory

     * or throws an exception if not.
     *
     * @return repository factory
     */
    public RepositoryFactory getRepositoryFactory() {
        return new RepositoryFactory() {
            public Repository getRepository() throws RepositoryException {
                Repository r = repository;
                if (r != null) {
                    return repository;
                } else {

Examples of org.apache.jackrabbit.commons.repository.RepositoryFactory

        Map helper = new BeanMap(test.getField("helper").get(null));
        final Repository repository =
            (Repository) helper.get("repository");
        final Credentials superuser =
            (Credentials) helper.get("superuserCredentials");
        return new ProxyRepository(new RepositoryFactory() {

            public Repository getRepository() throws RepositoryException {
                return repository;
            }
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.