Sweet Home 3D 4.0

com.eteks.sweethome3d.applet
Class HomeAppletRecorder

java.lang.Object
  extended by com.eteks.sweethome3d.applet.HomeAppletRecorder
All Implemented Interfaces:
HomeRecorder

public class HomeAppletRecorder
extends Object
implements HomeRecorder

Recorder that stores homes on a HTTP server.

Author:
Emmanuel Puybaret

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.eteks.sweethome3d.model.HomeRecorder
HomeRecorder.Type
 
Constructor Summary
HomeAppletRecorder(String writeHomeURL, String readHomeURL, String listHomesURL)
          Creates a recorder that will use the URLs in parameter to write, read and list homes.
HomeAppletRecorder(String writeHomeURL, String readHomeURL, String listHomesURL, boolean includeTemporaryContent)
          Creates a recorder that will use the URLs in parameter to write, read and list homes.
HomeAppletRecorder(String writeHomeURL, String readHomeURL, String listHomesURL, ContentRecording contentRecording)
          Creates a recorder that will use the URLs in parameter to write, read and list homes.
 
Method Summary
 boolean exists(String name)
          Returns true if the home name exists.
 String[] getAvailableHomes()
          Returns the available homes on server.
 Home readHome(String name)
          Returns a home instance read from its file name.
 void writeHome(Home home, String name)
          Posts home data to the server URL returned by getHomeSaveURL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HomeAppletRecorder

public HomeAppletRecorder(String writeHomeURL,
                          String readHomeURL,
                          String listHomesURL)
Creates a recorder that will use the URLs in parameter to write, read and list homes.

See Also:
SweetHome3DApplet

HomeAppletRecorder

public HomeAppletRecorder(String writeHomeURL,
                          String readHomeURL,
                          String listHomesURL,
                          boolean includeTemporaryContent)
Creates a recorder that will use the URLs in parameter to write, read and list homes.

See Also:
SweetHome3DApplet

HomeAppletRecorder

public HomeAppletRecorder(String writeHomeURL,
                          String readHomeURL,
                          String listHomesURL,
                          ContentRecording contentRecording)
Creates a recorder that will use the URLs in parameter to write, read and list homes.

See Also:
SweetHome3DApplet
Method Detail

writeHome

public void writeHome(Home home,
                      String name)
               throws RecorderException
Posts home data to the server URL returned by getHomeSaveURL.

Specified by:
writeHome in interface HomeRecorder
Parameters:
home - the home to write.
name - the name of the resource in which the home will be written.
Throws:
RecorderException - if a problem occurred while writing home.

readHome

public Home readHome(String name)
              throws RecorderException
Returns a home instance read from its file name.

Specified by:
readHome in interface HomeRecorder
Parameters:
name - the name of the resource from which the home will be read.
Throws:
RecorderException - if a problem occurred while reading home, or if file name doesn't exist.

exists

public boolean exists(String name)
               throws RecorderException
Returns true if the home name exists.

Specified by:
exists in interface HomeRecorder
Parameters:
name - the name of the resource to check
Throws:
RecorderException

getAvailableHomes

public String[] getAvailableHomes()
                           throws RecorderException
Returns the available homes on server.

Throws:
RecorderException

Sweet Home 3D 4.0

© Copyrights 2006-2013 eTeks - All rights reserved
Distributed under GNU General Public License