chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damian Sima <damians...@gmail.com>
Subject CMIS session and session factory
Date Mon, 28 May 2012 18:54:23 GMT
Hi guys,


I've been playing with chemistry and I found something that I want to ask
you about.

I have this portion of code:


* List<Repository> repositories = new ArrayList<Repository>();*

* repositories = sessionFactory.getRepositories(parameter);*

* for (Repository r : repositories) {*

*  System.out.println("Found repository: " + r.getName());*

* }*

*
*

* // 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());*

*
*

* CmisObject object = session.getObject(
"workspace://SpacesStore/55817c09-d027-44ee-8b4e-37f6f64395e9");*

* System.out.println("Name: " + object.getName() + " id: " +
object.getId());*


Basically it connect (using the ATOM interface) to get the repository
information and then it tries to get another object.
Now I've been following the code and it looks like that from the first
request I'm doing which returns things like:

*<?xml version='1.0' encoding='UTF-8'?>*

*<app:service xmlns:app="http://www.w3.org/2007/app" xmlns:atom="
http://www.w3.org/2005/Atom" xmlns:cmis="
http://docs.oasis-open.org/ns/cmis/core/200908/" xmlns:cmisra="
http://docs.oasis-open.org/ns/cmis/restatom/200908/">*

*<app:workspace>*

* <atom:title>40b1fba9-6972-49d4-a4a8-8f1c212c14ca</atom:title>*

* <app:collection href="
https://myacmsserverintance.com/alfresco/cmisatom/40b1fba9-6972-49d4-a4a8-8f1c212c14ca/children?id=workspace%3A%2F%2FSpacesStore%2F3374dfec-8117-457b-8099-cba963f3f00d
">*

Thing is that looks like that Chemistry it's doing the following request
based on the value of the href in the app:collection tag. This is it's
ignoring the parameters defined at the beginning for the base host and
using the ones comming in this tag(or maybe another).

Is this correct?

I mean is chemistry ignoring the defined parameters and using new ones
based on the responses it gets???

Cheers, Damian.




-- 
Damián. > - )

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message