#: Alexandru Popescu changed the world a bit at a time by saying on 10/17/2005
11:51 AM :#
Hi!
I was trying to figure out how the conversion from standard jcr Item-s is made to Magnolia Content
and NodeData entities. I was able to identify the points where these 2 entities are build, but I
cannot figure out how can I determine if an Item will become a NodeData or a Content.
Can anybody help me figuring out this? Thanks a lot,
./alex
--
.w( the_mindstorm )p.
I have continued to investigate this by my own and so far I can say that it is quite impossible to
do this conversion.
The reasons:
1/ to create a Content/NodeData you need an AccessManager
2/ in order to obtain/create an AccessManager you need to perform a login
3/ in order to perform the login you need to load the users repository
4/ you can create a RepositoryMapping for the "users" and try loading it with
ContentRepository.loadRepository(RepositoryMapping)
5/ finally the login reaches the code:
[quote]
private static String getMappedRepositoryName(String name) {
return (String) ContentRepository.repositoryNameMap.get(name);
}
[/quote]
[ContentRepository lines: 395-397]
and this results in a NPE cause the repositoryNameMap static field is initialized only in the
private method loadRepositoryNameMap() which is called upon a complete repository startup.
I would like to find out if this method is incorrect or as I have described above it is just
impossible to do it?
./alex
--
.w( the_mindstorm )p.
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------