// Add roots in the JTree for the System area and Users area in the
// default content repository.
ContentRepositoryRegistry registry =
ContentRepositoryRegistry.getInstance();
ContentRepository repo = registry.getRepository(session);
try {
ContentCollection sysCollection = repo.getSystemRoot();
ContentCollection userCollection =
(ContentCollection) repo.getRoot().getChild("users");
jtree.addTreeRoot(BUNDLE.getString("System"), sysCollection);
jtree.addTreeRoot(BUNDLE.getString("Users"), userCollection);
factoryMap.put(sysCollection, new ContentRepoNodeURIFactory());
factoryMap.put(userCollection, new ContentRepoNodeURIFactory());
} catch (ContentRepositoryException excp) {
logger.log(Level.WARNING, "Unable to create roots", excp);
}
// Formulate the "home" path as /Users/<login name>
try {
homePath = "/Users/" + repo.getUserRoot().getName();
} catch (ContentRepositoryException excp) {
logger.log(Level.WARNING, "Unable to find user's home", excp);
}
// Add the Module tree root, using a wrapper for the content repo to