Constructor
new (require("store/String"))(entryURI, resourceURI, entryStore, data)
Parameters:
| Name | Type | Description | 
|---|---|---|
| entryURI | string | URI to an entry where this resource is contained. | 
| resourceURI | string | URI to the resource. | 
| entryStore | EntryStore | the API's repository instance. | 
| data | string | the actual string, may the empty string, but not null or undefined. | 
Methods
commit() → {Promise}
Pushes the string back to the repository.
Returns:
- Type
- Promise
getString() → {string}
Returns:
may be an empty string, never null or undefined.
- Type
- string
setString(string) → {StringResource}
Set a new string, does not save it to the repository, use commit for that. E.g.
stringresource.setString("New value").commit().then(function() {...});Parameters:
| Name | Type | Description | 
|---|---|---|
| string | string | the new string | 
Returns:
allows chaining with commit.
- Type
- StringResource