networkPlaceItems = new ArrayList();
// Now create the items
List resources = NetworkPlaceDatabaseFactory.getInstance().getNetworkPlaces(session.getUser().getRealm().getRealmID());
for (Iterator i = resources.iterator(); i.hasNext();) {
NetworkPlace np = (NetworkPlace) i.next();
VFSProvider provider = VFSProviderManager.getInstance().getProvider(np.getScheme());
if (provider == null) {
try {
if(np.getScheme().equals("")) {
URI uri = NetworkPlaceUtil.createURIForPath(np.getPath());
provider = VFSProviderManager.getInstance().getProvider(uri.getScheme());
}
if(provider == null) {
log.warn("Provider that handles '" + np.getScheme() + "' cannot be found.");
}
} catch(Exception ex) {
log.error("Could not get provider for network place " + np.getPath(), ex);
continue;
}
}
if(provider != null) {
// Create a store so we can get the mount path
VFSStore store = processor.getRepository().getStore(provider.getScheme());
if(store == null) {
log.warn("No store for " + provider.getScheme());
}
else {
NetworkPlaceItem npi = new NetworkPlaceItem(np, store.getMountPath(np.getResourceName()), PolicyDatabaseFactory.getInstance()
.getPoliciesAttachedToResource(np, session.getUser().getRealm()), np
.sessionPasswordRequired(session));