Hi,
On Wed, Dec 2, 2015 at 9:51 AM, Thierry Yge <[email protected]> wrote:
> For example one need following content for testing:
> ├── apps
> │ ├── myapp
> │ │ └── components
> │ │ └── resource
> │ │ ├── models.js
> │ │ └── text.html
> │ └── myapp.json
> └── content
> ├── myapp
> │ └── resource
> └── myapp.json
I have finished a first version of a new ResourceBuilder service that
uses the following code to create such a content structure:
builder
.resource("apps/myapp/components/resource")
.siblingsMode()
.file("models.js", getStream("/files/models.js"))
.file("text.html", getStream("/files/text.html"))
.resetParent()
.resource("apps")
.file("myapp.json", getStream("/files/myapp.json"))
.resetParent()
.resource("apps/content/myapp/resource")
.resetParent()
.resource("apps/content", "title", "foo")
.file("myapp.json", getStream("/files/myapp.json"))
.commit()
getStream(...) is actually getClass().getResourceAsStream(...).
The details are at https://issues.apache.org/jira/browse/SLING-5356,
what do people think?
-Bertrand