Hi all,
The Platform API was marked as deprecated and the API was moved in
nucxeo runtime.
The current API and extension points are still working but should no
more used - they will be removed in future.
NXRuntime was marked as deprecated too. Instead you should use
"org.nuxeo.runtime.api.Framework"
The login infrastructure was refactored and moved in nuxeo runtime.
Defining security domains and login modules is now independent on JBoss
(it is done using the extension point mechanism)
This way the login is more portable (there yet some dependence on JBoss
which will be removed in future)
Also, the nuxeo-platform-login is now packaged as a jar and not as a sar.
Difference between old and new API:
1. services lookup:
- old method:
TypeManager typeMgr = ECM.getPlatform().getService(TypeManager.class);
- new method:
TypeManager typeMgr = Framework.getService(TypeManager.class);
2. repository lookup:
- old method: (opening the first repository)
RepositoryDescriptor[] rd = ECM.getPlatform().getRepositories();
CoreSession session = ECM.getPlatform().openRepository(rd[0]);
- new method:
RepositoryManager mgr = Framework.getService(RepositoryManager.class);
CoreSession session = mgr.getDefaultRepository().open();
3. system login and user login:
- old method:
new SystemSession().login();
new UserSession().login("Administrator", "Administrator");
- new method:
Framework.login();
Framework.login("Administrator", "Administrator");
4. runtime service lookup:
- old method:
NXRuntime.getRuntime()
- new method:
Framework.getRuntime()
5. binding services (new method):
<extension target="org.nuxeo.runtime.api.ServiceManagement"
point="services">
<service class="org.nuxeo.ecm.core.api.CoreSession" name="demo"
group="core">
<adapter>org.nuxeo.ecm.core.api.CoreSessionAdapter</adapter>
<locator>%DocumentManagerBean</locator>
</service>
</extension>
6. declaring repositories (new method):
<extension target="org.nuxeo.ecm.core.api.repository.RepositoryManager"
point="repositories">
<repository name="demo" label="Default Repository"/>
</extension>
7. defining a security domain (the new method):
<extension target="org.nuxeo.runtime.LoginComponent" point="domains">
<domain name="nuxeo-system-login">
<login-module
code="org.nuxeo.runtime.api.login.SystemLoginModule" flag="required"/>
<login-module code="org.jboss.security.ClientLoginModule"
flag="required">
<option name="password-stacking">true</option>
<option name="restore-login-identity">true</option>
<option name="multi-threaded">true</option>
</login-module>
</domain>
</extension>
Bogdan
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm