Search in sources :

Example 6 with ProtocolPanelProvider

use of com.mucommander.protocol.ui.ProtocolPanelProvider in project mucommander by mucommander.

the class ProtocolPanelProviderTracker method addingService.

@Override
public ProtocolPanelProvider addingService(ServiceReference<ProtocolPanelProvider> reference) {
    ProtocolPanelProvider service = super.addingService(reference);
    ServerConnectDialog.register(service);
    if (service.getPanelClass() != null)
        DrivePopupButton.register(service);
    LOGGER.info("ProtocolPanelProvider is registered: " + service);
    return service;
}
Also used : ProtocolPanelProvider(com.mucommander.protocol.ui.ProtocolPanelProvider)

Example 7 with ProtocolPanelProvider

use of com.mucommander.protocol.ui.ProtocolPanelProvider in project mucommander by mucommander.

the class Activator method start.

@Override
public void start(BundleContext context) throws Exception {
    FileProtocolService service = new FileProtocolService() {

        @Override
        public String getSchema() {
            return "dropbox";
        }

        @Override
        public ProtocolProvider getProtocolProvider() {
            return new DropboxProtocolProvider();
        }

        @Override
        public SchemeHandler getSchemeHandler() {
            return new DefaultSchemeHandler(new DefaultSchemeParser(), 21, "/", AuthenticationType.NO_AUTHENTICATION, new Credentials("anonymous", "anonymous_coward@mucommander.com"));
        }
    };
    ProtocolPanelProvider panelProvider = new ProtocolPanelProvider() {

        @Override
        public String getSchema() {
            return "dropbox";
        }

        @Override
        public ServerPanel get(ServerPanelListener listener, JFrame mainFrame) {
            return new DropboxPanel(listener, mainFrame);
        }

        @Override
        public int priority() {
            return 5000;
        }

        @Override
        public Class<? extends ServerPanel> getPanelClass() {
            return DropboxPanel.class;
        }
    };
    serviceRegistration = context.registerService(FileProtocolService.class, service, null);
    uiServiceRegistration = context.registerService(ProtocolPanelProvider.class, panelProvider, null);
}
Also used : ServerPanelListener(com.mucommander.protocol.ui.ServerPanelListener) DefaultSchemeParser(com.mucommander.commons.file.DefaultSchemeParser) JFrame(javax.swing.JFrame) ProtocolPanelProvider(com.mucommander.protocol.ui.ProtocolPanelProvider) Credentials(com.mucommander.commons.file.Credentials) FileProtocolService(com.mucommander.commons.file.osgi.FileProtocolService) DefaultSchemeHandler(com.mucommander.commons.file.DefaultSchemeHandler)

Example 8 with ProtocolPanelProvider

use of com.mucommander.protocol.ui.ProtocolPanelProvider in project mucommander by mucommander.

the class Activator method start.

@Override
public void start(BundleContext context) throws Exception {
    FileProtocolService service = new FileProtocolService() {

        @Override
        public String getSchema() {
            return "ftp";
        }

        @Override
        public ProtocolProvider getProtocolProvider() {
            return new FTPProtocolProvider();
        }

        @Override
        public SchemeHandler getSchemeHandler() {
            return new DefaultSchemeHandler(new DefaultSchemeParser(), 21, "/", AuthenticationType.AUTHENTICATION_REQUIRED, new Credentials("anonymous", "anonymous_coward@mucommander.com"));
        }
    };
    ProtocolPanelProvider panelProvider = new ProtocolPanelProvider() {

        @Override
        public String getSchema() {
            return "ftp";
        }

        @Override
        public ServerPanel get(ServerPanelListener listener, JFrame mainFrame) {
            return new FTPPanel(listener, mainFrame);
        }

        @Override
        public int priority() {
            return 5000;
        }

        @Override
        public Class<? extends ServerPanel> getPanelClass() {
            return FTPPanel.class;
        }
    };
    serviceRegistration = context.registerService(FileProtocolService.class, service, null);
    uiServiceRegistration = context.registerService(ProtocolPanelProvider.class, panelProvider, null);
}
Also used : ServerPanelListener(com.mucommander.protocol.ui.ServerPanelListener) DefaultSchemeParser(com.mucommander.commons.file.DefaultSchemeParser) JFrame(javax.swing.JFrame) ProtocolPanelProvider(com.mucommander.protocol.ui.ProtocolPanelProvider) Credentials(com.mucommander.commons.file.Credentials) FileProtocolService(com.mucommander.commons.file.osgi.FileProtocolService) DefaultSchemeHandler(com.mucommander.commons.file.DefaultSchemeHandler)

Example 9 with ProtocolPanelProvider

use of com.mucommander.protocol.ui.ProtocolPanelProvider in project mucommander by mucommander.

the class Activator method start.

@Override
public void start(BundleContext context) throws Exception {
    FileProtocolService serviceDocker = new FileProtocolService() {

        @Override
        public String getSchema() {
            return "docker";
        }

        @Override
        public ProtocolProvider getProtocolProvider() {
            return new RegistryProtocolProvider();
        }

        @Override
        public SchemeHandler getSchemeHandler() {
            return new DefaultSchemeHandler(new DefaultSchemeParser(true), 80, "/", AuthenticationType.NO_AUTHENTICATION, null);
        }
    };
    FileProtocolService serviceOCI = new FileProtocolService() {

        @Override
        public String getSchema() {
            return "oci";
        }

        @Override
        public ProtocolProvider getProtocolProvider() {
            return new RegistryProtocolProvider();
        }

        @Override
        public SchemeHandler getSchemeHandler() {
            return new DefaultSchemeHandler(new DefaultSchemeParser(true), 80, "/", AuthenticationType.NO_AUTHENTICATION, null);
        }
    };
    FileProtocolService serviceDir = new FileProtocolService() {

        @Override
        public String getSchema() {
            return "dir";
        }

        @Override
        public ProtocolProvider getProtocolProvider() {
            return new RegistryProtocolProvider();
        }

        @Override
        public SchemeHandler getSchemeHandler() {
            return new DefaultSchemeHandler(new DefaultSchemeParser(true), 80, "/", AuthenticationType.NO_AUTHENTICATION, null);
        }
    };
    FileProtocolService serviceRegistry = new FileProtocolService() {

        @Override
        public String getSchema() {
            return "registry";
        }

        @Override
        public ProtocolProvider getProtocolProvider() {
            return new RegistryProtocolProvider();
        }

        @Override
        public SchemeHandler getSchemeHandler() {
            return new DefaultSchemeHandler(new DefaultSchemeParser(true), 80, "/", AuthenticationType.NO_AUTHENTICATION, null);
        }
    };
    ProtocolPanelProvider panelProvider = new ProtocolPanelProvider() {

        @Override
        public String getSchema() {
            // TODO: better naming to reflect this refers to container images registry
            return "registry";
        }

        @Override
        public ServerPanel get(ServerPanelListener listener, JFrame mainFrame) {
            boolean isSkopeoAvailable = SkopeoCommandExecutor.checkSkopeo();
            return new RegistryPanel(listener, mainFrame, isSkopeoAvailable);
        }

        @Override
        public int priority() {
            return 8000;
        }
    };
    serviceRegistrationDocker = context.registerService(FileProtocolService.class, serviceDocker, null);
    serviceRegistrationOCI = context.registerService(FileProtocolService.class, serviceOCI, null);
    serviceRegistrationDir = context.registerService(FileProtocolService.class, serviceDir, null);
    serviceRegistrationRegistry = context.registerService(FileProtocolService.class, serviceRegistry, null);
    uiServiceRegistration = context.registerService(ProtocolPanelProvider.class, panelProvider, null);
}
Also used : ServerPanelListener(com.mucommander.protocol.ui.ServerPanelListener) DefaultSchemeParser(com.mucommander.commons.file.DefaultSchemeParser) JFrame(javax.swing.JFrame) ProtocolPanelProvider(com.mucommander.protocol.ui.ProtocolPanelProvider) FileProtocolService(com.mucommander.commons.file.osgi.FileProtocolService) DefaultSchemeHandler(com.mucommander.commons.file.DefaultSchemeHandler)

Example 10 with ProtocolPanelProvider

use of com.mucommander.protocol.ui.ProtocolPanelProvider in project mucommander by mucommander.

the class Activator method start.

@Override
public void start(BundleContext context) throws Exception {
    FileProtocolService service = new FileProtocolService() {

        @Override
        public String getSchema() {
            return "s3";
        }

        @Override
        public ProtocolProvider getProtocolProvider() {
            return new S3ProtocolProvider();
        }

        @Override
        public SchemeHandler getSchemeHandler() {
            return new DefaultSchemeHandler(new DefaultSchemeParser(true), 443, "/", AuthenticationType.AUTHENTICATION_REQUIRED, null);
        }
    };
    ProtocolPanelProvider panelProvider = new ProtocolPanelProvider() {

        @Override
        public String getSchema() {
            return "s3";
        }

        @Override
        public ServerPanel get(ServerPanelListener listener, JFrame mainFrame) {
            return new S3Panel(listener, mainFrame);
        }

        @Override
        public int priority() {
            return 3000;
        }
    };
    serviceRegistration = context.registerService(FileProtocolService.class, service, null);
    uiServiceRegistration = context.registerService(ProtocolPanelProvider.class, panelProvider, null);
}
Also used : ServerPanelListener(com.mucommander.protocol.ui.ServerPanelListener) DefaultSchemeParser(com.mucommander.commons.file.DefaultSchemeParser) JFrame(javax.swing.JFrame) ProtocolPanelProvider(com.mucommander.protocol.ui.ProtocolPanelProvider) FileProtocolService(com.mucommander.commons.file.osgi.FileProtocolService) DefaultSchemeHandler(com.mucommander.commons.file.DefaultSchemeHandler)

Aggregations

ProtocolPanelProvider (com.mucommander.protocol.ui.ProtocolPanelProvider)14 DefaultSchemeHandler (com.mucommander.commons.file.DefaultSchemeHandler)12 DefaultSchemeParser (com.mucommander.commons.file.DefaultSchemeParser)12 FileProtocolService (com.mucommander.commons.file.osgi.FileProtocolService)12 ServerPanelListener (com.mucommander.protocol.ui.ServerPanelListener)12 JFrame (javax.swing.JFrame)12 Credentials (com.mucommander.commons.file.Credentials)4 BonjourMenu (com.mucommander.bonjour.BonjourMenu)1 BonjourService (com.mucommander.bonjour.BonjourService)1 Bookmark (com.mucommander.bookmark.Bookmark)1 FileURL (com.mucommander.commons.file.FileURL)1 MnemonicHelper (com.mucommander.commons.util.ui.helper.MnemonicHelper)1 MuAction (com.mucommander.ui.action.MuAction)1 ArrayList (java.util.ArrayList)1 Hashtable (java.util.Hashtable)1 Icon (javax.swing.Icon)1 JMenuItem (javax.swing.JMenuItem)1 JPopupMenu (javax.swing.JPopupMenu)1 JSeparator (javax.swing.JSeparator)1