Package org.jdesktop.wonderland.common.modules

Examples of org.jdesktop.wonderland.common.modules.ModuleUploader


                        Logger.getLogger(ImportSessionFrame.class.getName()).log(Level.SEVERE, null, ex);
                    } catch (InvocationTargetException ex) {
                        Logger.getLogger(ImportSessionFrame.class.getName()).log(Level.SEVERE, null, ex);
                    }

                    ModuleUploader uploader = new ModuleUploader(new URL(targetServer.getServerURL()));

                    // if the authentication type is NONE, don't authenticate,
                    // since the upload will only accept modules from an
                    // administrator.
                    // XXX TODO: we should fix this so that upload writes to
                    // the content repository, so that non-admin users can
                    // upload art when authenication is turned on XXX
                    if (targetServer.getDetails().getAuthInfo().getType() !=
                            AuthenticationInfo.Type.NONE)
                    {
                        uploader.setAuthURL(targetServer.getCredentialManager().getAuthenticationURL());
                    }

                    uploader.upload(moduleJar);
                } catch (MalformedURLException ex) {
                    LOGGER.log(Level.SEVERE, "MalformedURL " + targetServer.getServerURL(), ex);
                    return;
                } catch (IOException e) {
                    LOGGER.log(Level.SEVERE, "IO Exception during upload", e);
View Full Code Here


        this.log("Deploying " + module.getName() + " to " + serverUrl);

        try {
            // create the uploader
            ModuleUploader mu = new ModuleUploader(serverUrl);

            // get the authentication service (if any)
            AuthenticationService as = getAuthentication();
            if (as != null) {
                mu.setAuthURL(as.getAuthenticationURL());
            }

            // upload the module
            mu.upload(module);
        } catch (IOException ioe) {
            throw new BuildException("Error uploading to " + serverUrl +
                                     ": " + ioe.getMessage(), ioe);
        } catch (AuthenticationException ae) {
            throw new BuildException("Error uploading to " + serverUrl +
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.common.modules.ModuleUploader

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.