Constructor
new ResourceStorage(xmlEditor)
Constructs a document resource storage object.
Parameters:
Name | Type | Description |
---|---|---|
xmlEditor |
XMLEditor | the XML editor using this storage object. |
- Source:
Classes
Members
xmlEditor
Returns the XML editor using this storage object.
- Source:
Methods
loadResource(uri) → {Promise}
Load resource having specified URI.
Default implementation returns a Promise
rejected
with a "not implemented" error.
Parameters:
Name | Type | Description |
---|---|---|
uri |
string | absolute URI of the resource to be loaded. |
- Source:
Returns:
A Promise containing a Resource
or
null
if specified URI is unknown to this storage object
or an Error
.
- Type
- Promise
openResource(options) → {Promise}
Prompt user to choose an existing resource.
Default implementation returns a Promise
rejected
with a "not implemented" error.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | options for use by the resource chooser dialog box. See description in XMLEditor#openResource. |
- Source:
Returns:
- Type
- Promise
storeResource(data, uri) → {Promise}
Create (or overwrite if it already exists) resource having specified URI.
Any parent directory of specified URI which does not already exist is automatically created.
Default implementation returns a Promise
rejected
with a "not implemented" error.
Parameters:
Name | Type | Description |
---|---|---|
data |
Blob | the data to be stored. |
uri |
string | absolute URI of the resource to be created (or overwritten if it already exists). |
- Source:
Returns:
A Promise containing a Resource
or
null
if specified URI is unknown to this storage object
or an Error
.
- Type
- Promise