Package com.adito.vfs

Examples of com.adito.vfs.VFSProvider


     * @throws Exception
     */
    public ActionForward changeScheme(ActionMapping mapping, ActionForm form, HttpServletRequest request,
                                      HttpServletResponse response) throws Exception {
        NetworkPlaceDetailsForm networkPlaceDetailsForm = (NetworkPlaceDetailsForm) form;
        VFSProvider provider = VFSProviderManager.getInstance().getProvider(networkPlaceDetailsForm.getScheme());
        if (provider == null) {
            provider = NetworkPlaceDetailsForm.DEFAULT_PROVIDER;
        }
        networkPlaceDetailsForm.changeProvider(provider);
        networkPlaceDetailsForm.setAllowRecursive(true);
View Full Code Here


    catch(Exception e) {
      log.error(e);
      throw new IllegalArgumentException("Could not convert path to network place.");
    }

    VFSProvider provider = VFSProviderManager.getInstance().getProvider(np.getScheme());
    if(provider == null) {
      throw new IllegalArgumentException("No provider " + np.getScheme());
    }
   
    return np;
View Full Code Here

        List<NetworkPlaceItem> networkPlaceItems = new ArrayList<NetworkPlaceItem>();
        List granted =   ResourceUtil.getGrantedResource(session, NetworkPlacePlugin.NETWORK_PLACE_RESOURCE_TYPE);
        for (Iterator i = granted.iterator(); i.hasNext();) {
            NetworkPlace np = (NetworkPlace) i.next();
            try {
                VFSProvider provider = VFSProviderManager.getInstance().getProvider(np.getScheme());
                if (provider == null) {
                  if(np.getScheme().equals("")) {
                  URI uri = createURIForPath(np.getPath());
                  provider = VFSProviderManager.getInstance().getProvider(uri.getScheme());
                  }
                  if(provider == null)
                    throw new Exception("No provider for network place URI " + np.getPath());
                }
                if (np.getType() != NetworkPlace.TYPE_HIDDEN) {
                  // Create a store so we can get the mount path
                  VFSStore store = repository.getStore(provider.getScheme());
                    NetworkPlaceItem npi = new NetworkPlaceItem(np, store.getMountPath(np.getResourceName()), PolicyDatabaseFactory.getInstance()
                                    .getPoliciesAttachedToResource(np, session.getUser().getRealm()), np
                                    .sessionPasswordRequired(session));
                    networkPlaceItems.add(npi);
                }
View Full Code Here

            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));
View Full Code Here

TOP

Related Classes of com.adito.vfs.VFSProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.