org.jdesktop.wonderland.common.modules
Class ModuleUploader

java.lang.Object
  extended by org.jdesktop.wonderland.common.modules.ModuleUploader

public class ModuleUploader
extends java.lang.Object

Upload a module to the server

Author:
jkaplan

Constructor Summary
ModuleUploader(java.net.URL baseURL)
          Create a new module uploader with the given base URL
 
Method Summary
 java.lang.String getAuthURL()
          Get the authentication URL
protected  java.net.URL getBaseURL()
          Get the base URL
protected  java.net.URL getUploadURL()
          Get the URL to upload to
 void setAuthURL(java.lang.String authURL)
          Set the authentication URL, if any
 void upload(java.io.File module)
          Upload a module
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleUploader

public ModuleUploader(java.net.URL baseURL)
               throws java.net.MalformedURLException
Create a new module uploader with the given base URL

Parameters:
baseURL - the base URL to upload to
Throws:
java.net.MalformedURLException
Method Detail

getBaseURL

protected java.net.URL getBaseURL()
Get the base URL

Returns:
the base URL

getUploadURL

protected java.net.URL getUploadURL()
Get the URL to upload to

Returns:
the upload URL

setAuthURL

public void setAuthURL(java.lang.String authURL)
Set the authentication URL, if any

Parameters:
authURL - the authentication URL

getAuthURL

public java.lang.String getAuthURL()
Get the authentication URL

Returns:
the authentication URL, or null if not set

upload

public void upload(java.io.File module)
            throws java.io.IOException
Upload a module

Parameters:
module - the module to upload
Throws:
java.io.IOException


Open Wonderland - http://openwonderland.org