Package org.apache.chemistry.opencmis.client.api

Examples of org.apache.chemistry.opencmis.client.api.SessionFactory.createSession()


        System.out.println("Connecting to a repository ...");

        // Create a SessionFactory and set up the SessionParameter map
        SessionFactory sessionFactory = SessionFactoryImpl.newInstance();

        session = sessionFactory.createSession(parameters);

        LOG.debug("Got a connection to repository.");
    }
       
    public void copyRecursive(String folderName, String folderId) {
View Full Code Here


    public void createDefaultSession() {
        SessionFactory factory = this.fixture.getSessionFactory();

        Hashtable<String, String> parameter = new Hashtable<String, String>(this.fixture.getParamter());

        Session s = factory.createSession(parameter);
        Assert.assertNotNull(s);
    }
}
View Full Code Here

        }

        // create session with the first (and only) repository
        Repository repository = repositories.get(0);
        parameter.put(SessionParameter.REPOSITORY_ID, repository.getId());
        Session session = sessionFactory.createSession(parameter);

        System.out.println("Got a connection to repository: " + repository.getName() + ", with id: "
                + repository.getId());

        // Get everything in the root folder and print the names of the objects
View Full Code Here

    }

    @Before
    public void setUp() {
        SessionFactory factory = this.fixture.getSessionFactory();
        this.session = factory.createSession(this.fixture.getParamter());
        this.fixture.setUpTestData(this.session);

        this.session2 = factory.createSession(this.fixture.getParamter());
    }
View Full Code Here

    public void setUp() {
        SessionFactory factory = this.fixture.getSessionFactory();
        this.session = factory.createSession(this.fixture.getParamter());
        this.fixture.setUpTestData(this.session);

        this.session2 = factory.createSession(this.fixture.getParamter());
    }

    @After
    public void tearDown() {
        this.fixture.teardownTestData(this.session);
View Full Code Here

        SessionFactory factory = this.fixture.getSessionFactory();

        Hashtable<String, String> parameter = new Hashtable<String, String>(this.fixture.getParamter());
        parameter.remove(SessionParameter.SESSION_TYPE);

        Session s = factory.createSession(parameter);
        Assert.assertNotNull(s);
    }

    @Test
    public void createPersistentSession() {
View Full Code Here

        SessionFactory factory = this.fixture.getSessionFactory();

        Hashtable<String, String> parameter = new Hashtable<String, String>(this.fixture.getParamter());
        parameter.put(SessionParameter.SESSION_TYPE, SessionType.PERSISTENT.value());

        Session s = factory.createSession(parameter);
        Assert.assertNotNull(s);
    }

    @Test
    public void createTransientSession() {
View Full Code Here

        Hashtable<String, String> parameter = new Hashtable<String, String>(this.fixture.getParamter());
        parameter.put(SessionParameter.SESSION_TYPE, SessionType.TRANSIENT.value());

        try {
            @SuppressWarnings("unused")
            Session s = factory.createSession(parameter);
            Assert.fail("CmisNotSupportedException expected, because Transient Session is not supported yet.");
        } catch (CmisNotSupportedException e) {

        }
    }
View Full Code Here

    public void createDefaultSession() {
        SessionFactory factory = this.fixture.getSessionFactory();

        Hashtable<String, String> parameter = new Hashtable<String, String>(this.fixture.getParamter());

        Session s = factory.createSession(parameter);
        Assert.assertNotNull(s);
    }
}
View Full Code Here

    }

    @Before
    public void setUp() throws Exception {
        SessionFactory factory = this.fixture.getSessionFactory();
        this.session = factory.createSession(this.fixture.getParamter());
        this.fixture.setUpTestData(this.session);

        this.session2 = factory.createSession(this.fixture.getParamter());
    }
View Full Code Here

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.