Community
Participate
Working Groups
The default implementations of IUserManager currently shipped do not know about their context. In other words, they're like singletons in their IManagedContainer. An IElementProcessor can be used to inject an IRepository into the user manager...
You'll need to create your custom RepositoryUserManager and a respective custom RepositoryUserManagerFactory, e.g.: public class TestRepositoryUserManager extends RepositoryUserManager { @Override protected char[] getPassword(IRepository repository, String userID) { System.out.println(userID + " --> " + repository.getName()); return "12345".toCharArray(); // TODO Retrieve the password from the repository } public static class Factory extends RepositoryUserManagerFactory { public Factory() { super("TestRepository"); // Must match the type attribute in plugin.xml } @Override protected RepositoryUserManager doCreate(String description) throws ProductCreationException { return new TestRepositoryUserManager(); } } } Then you register this factory in your plugin.xml: <extension point="org.eclipse.net4j.util.factories"> <factory productGroup="org.eclipse.net4j.userManagers" type="TestRepository" class="com.foo.bar.TestRepositoryUserManager$Factory"/> </extension> Then you can use this markup in your cdo-server.xml: <repository name="repo1"> <userManager type="TestRepository" description="repo1"/> ...
Committed revision 7722
Available in R20110608-1407