Class HomeRecorder
Defined in: HomeRecorder.js.
Constructor Attributes | Constructor Name and Description |
---|---|
HomeRecorder(configuration)
Creates a home recorder able to read homes from URLs.
|
Method Attributes | Method Name and Description |
---|---|
Returns a XML exporter able to generate a XML content.
|
|
Returns a SAX XML handler able to interpret the information contained in the
Home.xml entry. |
|
readHome(url, observer)
Reads a home instance from its
url . |
|
writeHome(home, homeName, observer)
Writes asynchronously the given
home to a new blob
(or the data matching the array type set in writeDataType configuration attribute,
i.e base64, array, uint8array or arraybuffer). |
Class Detail
HomeRecorder(configuration)
Creates a home recorder able to read homes from URLs.
Author: Emmanuel Puybaret.
Author: Emmanuel Puybaret.
- Parameters:
- {{writeCacheResourceURL: string|readCacheResourceURL: string|listCacheResourcesURL: string|compressionLevel: number|includeAllContent: boolean|writeDataType: string|writeHomeWithWorker: boolean }} configuration Optional
- the recorder configuration
Method Detail
{HomeXMLExporter}
getHomeXMLExporter()
Returns a XML exporter able to generate a XML content.
- Returns:
- {HomeXMLExporter}
{HomeXMLHandler}
getHomeXMLHandler()
Returns a SAX XML handler able to interpret the information contained in the
Home.xml
entry.
- Returns:
- {HomeXMLHandler}
readHome(url, observer)
Reads a home instance from its
url
.
- Parameters:
- {string} url
- URL of the read home
- {{homeLoaded: function|homeError: function|progression: function}} observer
- The callbacks used to follow the reading of the home
(only
homeLoaded
is mandatory)
{abort: function}
writeHome(home, homeName, observer)
Writes asynchronously the given
home
to a new blob
(or the data matching the array type set in writeDataType
configuration attribute,
i.e base64, array, uint8array or arraybuffer).
If writeHomeWithWorker
configuration attribute is set to true
, the data
will be generated in a separated worker kept alive between calls to this method.
- Parameters:
- {Home} home
- saved home
- {string} homeName
- the home name on the server
- {{homeSaved: function|homeError: function}} observer
- The callbacks used to follow the export operation of the home. homeSaved will receive in its second parameter the data containing the saved home with the resources it needs.
- Returns:
- {abort: function} a function that will abort writing operation if needed