This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hapi-samplecontent.git
commit 6f1f341df580c742861e026c86f766c1913f3405 Author: Bertrand Delacretaz <[email protected]> AuthorDate: Mon Aug 24 14:53:16 2015 +0000 SLING-4513 - import donated HApi tools git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1697419 13f79535-47bb-0310-9956-ffa450edef68 --- .gitignore | 15 ++ pom.xml | 68 +++++++ .../components/details/DetailsView.java | 56 ++++++ .../hapi_sample/components/details/details.html | 71 +++++++ .../hapi_sample/components/sample1/Sample1.java | 56 ++++++ .../hapi_sample/components/sample1/sample1.html | 213 +++++++++++++++++++++ .../site/assets/preview-small-album.png | Bin 0 -> 18150 bytes .../hapi_sample/site/assets/preview-small.png | Bin 0 -> 2731 bytes .../sling/hapi_sample/site/assets/preview1.png | Bin 0 -> 21512 bytes .../apps/sling/hapi_sample/site/details.json | 4 + .../apps/sling/hapi_sample/site/site.json | 4 + .../SLING-INF/apps/sling/hapi_sample/types.json | 176 +++++++++++++++++ 12 files changed, 663 insertions(+) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..518c151 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +target/ +.project +.classpath +.settings/ +/sling/ +derby.log +*.iml +*.ipr +*.iws +coverage.em +coverage.ec +coverage/ +.DS_Store +.idea/ +bundles/extensions/models/integration-tests/sling diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..f6e4216 --- /dev/null +++ b/pom.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +~ Licensed to the Apache Software Foundation (ASF) under one +~ or more contributor license agreements. See the NOTICE file +~ distributed with this work for additional information +~ regarding copyright ownership. The ASF licenses this file +~ to you under the Apache License, Version 2.0 (the +~ "License"); you may not use this file except in compliance +~ with the License. You may obtain a copy of the License at +~ +~ http://www.apache.org/licenses/LICENSE-2.0 +~ +~ Unless required by applicable law or agreed to in writing, +~ software distributed under the License is distributed on an +~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +~ KIND, either express or implied. See the License for the +~ specific language governing permissions and limitations +~ under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.sling</groupId> + <artifactId>sling</artifactId> + <version>20</version> + <relativePath/> + </parent> + + <artifactId>org.apache.sling.hapi.samplecontent</artifactId> + <version>1.0.0-SNAPSHOT</version> + <packaging>bundle</packaging> + + <name>HApi Sample Content</name> + <description>Sling Hypermedia Api demo content</description> + + <properties> + <sling.java.version>6</sling.java.version> + </properties> + + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-scr-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.sling</groupId> + <artifactId>maven-sling-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Bundle-Category>sling</Bundle-Category> + <Sling-Initial-Content>SLING-INF;overwrite=true</Sling-Initial-Content> + </instructions> + </configuration> + </plugin> + </plugins> + </build> + + <dependencies> + </dependencies> + +</project> diff --git a/src/main/resources/SLING-INF/apps/sling/hapi_sample/components/details/DetailsView.java b/src/main/resources/SLING-INF/apps/sling/hapi_sample/components/details/DetailsView.java new file mode 100644 index 0000000..c192178 --- /dev/null +++ b/src/main/resources/SLING-INF/apps/sling/hapi_sample/components/details/DetailsView.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + ******************************************************************************/ +package apps.sling.hapi_sample.components.details; + +import org.apache.sling.scripting.sightly.pojo.Use; +import org.apache.sling.api.SlingHttpServletRequest; +import org.apache.sling.api.resource.Resource; +import org.apache.sling.api.resource.ResourceResolver; +import org.apache.sling.api.scripting.SlingBindings; +import org.apache.sling.api.scripting.SlingScriptHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.script.Bindings; +import java.util.*; + +public class DetailsView implements Use { + private static final Logger LOG = LoggerFactory.getLogger(DetailsView.class); + private SlingHttpServletRequest request; + private SlingScriptHelper sling; + private Resource resource; + private ResourceResolver resourceResolver; + + public void init(Bindings bindings) { + request = (SlingHttpServletRequest) bindings.get(SlingBindings.REQUEST); + sling = (SlingScriptHelper) bindings.get(SlingBindings.SLING); + resource = (Resource)bindings.get(SlingBindings.RESOURCE); + resourceResolver = request.getResourceResolver(); + + try { + activate(); + } catch (Exception e) { + LOG.error("Failed to activate Use class", e); + } + } + + public void activate() throws Exception { + } + +} diff --git a/src/main/resources/SLING-INF/apps/sling/hapi_sample/components/details/details.html b/src/main/resources/SLING-INF/apps/sling/hapi_sample/components/details/details.html new file mode 100644 index 0000000..040e898 --- /dev/null +++ b/src/main/resources/SLING-INF/apps/sling/hapi_sample/components/details/details.html @@ -0,0 +1,71 @@ +<!DOCTYPE html> + + +<html lang="en"> +<head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + + <!-- Bootstrap --> + <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"> + + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> + <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> + <title>HApi sample content</title> +</head> + +<body> + +<div class="container"> + <div class="header"> + <h3 class="text-muted">Hypermedia API sample content - PIC 001</h3> + </div> + <div class="row"></div> + + <div class="row" data-sly-use.card="${'org.apache.sling.hapi.HApiUse' @type='/apps/sling/hapi_sample/types/pic_card'}" + data-sly-attribute="${card.itemtype}"> + <div class="col-lg-6"> + <div class="card-asset"> + <img data-sly-attribute="${card.itemprop.thumbnail}" class="show-grid" src="assets/preview1.png" alt=""> + </div> + </div> + <div class="col-lg-6"> + <div> + <h4 data-sly-attribute="${card.itemprop['title']}">PIC 001</h4> + + <p>Type: <span class="type">PSD</span></p> + + <p data-sly-attribute="${card.itemprop.resolution}" + data-sly-use.resolution="${'org.apache.sling.hapi.HApiUse' @type=card.proptype.resolution}" class="resolution"> + <span>Resolution:</span> + <span data-sly-attribute="${resolution.itemprop.width}">1620</span> x <span + data-sly-attribute="${resolution.itemprop.height}">670</span> + </p> + + <p>Size: </p><span data-sly-attribute="${card.itemprop.size}" class="size">249KB</span></p> + <meta data-sly-attribute="${card.itemprop.disabled}" content="false"/> + <div class="myinfo"> + <p class="mymodified"> + <i>Modified</i> + <span data-sly-attribute="${card.itemprop.modified}" class="date">2 days ago</span> + <span>Admin</span> + </p> + </div> + </div> + </a> + </div> + </div> + + <!-- /container --> + <footer class="footer"> + <p>HApi sample</p> + </footer> +</div> + +</body> +</html> diff --git a/src/main/resources/SLING-INF/apps/sling/hapi_sample/components/sample1/Sample1.java b/src/main/resources/SLING-INF/apps/sling/hapi_sample/components/sample1/Sample1.java new file mode 100644 index 0000000..55cdc2c --- /dev/null +++ b/src/main/resources/SLING-INF/apps/sling/hapi_sample/components/sample1/Sample1.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + ******************************************************************************/ +package apps.sling.hapi_sample.components.sample1; + +import org.apache.sling.scripting.sightly.pojo.Use; +import org.apache.sling.api.SlingHttpServletRequest; +import org.apache.sling.api.resource.Resource; +import org.apache.sling.api.resource.ResourceResolver; +import org.apache.sling.api.scripting.SlingBindings; +import org.apache.sling.api.scripting.SlingScriptHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.script.Bindings; +import java.util.*; + +public class Sample1 implements Use { + private static final Logger LOG = LoggerFactory.getLogger(Sample1.class); + private SlingHttpServletRequest request; + private SlingScriptHelper sling; + private Resource resource; + private ResourceResolver resourceResolver; + + public void init(Bindings bindings) { + request = (SlingHttpServletRequest) bindings.get(SlingBindings.REQUEST); + sling = (SlingScriptHelper) bindings.get(SlingBindings.SLING); + resource = (Resource)bindings.get(SlingBindings.RESOURCE); + resourceResolver = request.getResourceResolver(); + + try { + activate(); + } catch (Exception e) { + LOG.error("Failed to activate Use class", e); + } + } + + public void activate() throws Exception { + } + +} diff --git a/src/main/resources/SLING-INF/apps/sling/hapi_sample/components/sample1/sample1.html b/src/main/resources/SLING-INF/apps/sling/hapi_sample/components/sample1/sample1.html new file mode 100644 index 0000000..c35a9de --- /dev/null +++ b/src/main/resources/SLING-INF/apps/sling/hapi_sample/components/sample1/sample1.html @@ -0,0 +1,213 @@ +<!DOCTYPE html> + + +<html lang="en"> +<head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + + <!-- Bootstrap --> + <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"> + + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> + <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> + <title>HApi sample content</title> +</head> + +<body> + +<div class="container"> + <div class="header"> + <h3 class="text-muted">Hypermedia API sample content</h3> + </div> + <div class="row"></div> + + <div class="row"> + <div class="col-md-4"> + <div data-sly-use.card="${'org.apache.sling.hapi.HApiUse' @type='/apps/sling/hapi_sample/types/album_card'}" + data-sly-attribute="${card.itemtype}" class="card-asset"> + <a rel="self" href="details.html"> + <img data-sly-attribute="${card.itemprop.thumbnail}" class="show-grid" src="assets/preview-small-album.png" alt=""> + + <div> + <h4 data-sly-attribute="${card.itemprop['title']}">Christmas Eve 2014</h4> + + <p class="type">album</p> + + <p>Pictures: <span data-sly-attribute="${card.itemprop.cards}" class="size">5</span></p> + <meta data-sly-attribute="${card.itemprop.disabled}" content="false"/> + <div class="myinfo"> + <p class="mymodified"> + <i>Modified</i> + <span data-sly-attribute="${card.itemprop.modified}" class="date">2 days ago</span> + <span>Admin</span> + </p> + </div> + </div> + </a> + </div> + + <div data-sly-use.card="${'org.apache.sling.hapi.HApiUse' @type='/apps/sling/hapi_sample/types/pic_card'}" + data-sly-attribute="${card.itemtype}" class="card-asset"> + <a rel="self" href="details.html"> + <img data-sly-attribute="${card.itemprop.thumbnail}" class="show-grid" src="assets/preview-small.png" alt=""> + + <div> + <h4 data-sly-attribute="${card.itemprop['title']}">PIC 002</h4> + + <p class="type">PSD</p> + + <p data-sly-attribute="${card.itemprop.resolution}" + data-sly-use.resolution="${'org.apache.sling.hapi.HApiUse' @type=card.proptype.resolution}" class="resolution"> + <span data-sly-attribute="${resolution.itemprop.width}">1220</span> x <span + data-sly-attribute="${resolution.itemprop.height}">400</span> + </p> + + <p data-sly-attribute="${card.itemprop.size}" class="size">149KB</p> + <meta data-sly-attribute="${card.itemprop.disabled}" content="false"/> + <div class="myinfo"> + <p class="mymodified"> + <i>Modified</i> + <span data-sly-attribute="${card.itemprop.modified}" class="date">10 minutes ago</span> + <span>John Doe</span> + </p> + </div> + </div> + </a> + </div> + </div> + + <div class="col-md-4"> + <div data-sly-use.card="${'org.apache.sling.hapi.HApiUse' @type='/apps/sling/hapi_sample/types/pic_card'}" + data-sly-attribute="${card.itemtype}" class="card-asset"> + <a rel="self" href="details.html"> + <img data-sly-attribute="${card.itemprop.thumbnail}" class="show-grid" src="assets/preview-small.png" alt=""> + + <div> + <h4 data-sly-attribute="${card.itemprop['title']}">PIC 003</h4> + + <p class="type">JPG</p> + + <p data-sly-attribute="${card.itemprop.resolution}" + data-sly-use.resolution="${'org.apache.sling.hapi.HApiUse' @type=card.proptype.resolution}" class="resolution"> + <span data-sly-attribute="${resolution.itemprop.width}">1520</span> x <span + data-sly-attribute="${resolution.itemprop.height}">450</span> + </p> + + <p data-sly-attribute="${card.itemprop.size}" class="size">249KB</p> + <meta data-sly-attribute="${card.itemprop.disabled}" content="false"/> + <div class="myinfo"> + <p class="mymodified"> + <i>Modified</i> + <span data-sly-attribute="${card.itemprop.modified}" class="date">3 weeks ago</span> + <span>Jane Austen</span> + </p> + </div> + </div> + </a> + </div> + + <div data-sly-use.card="${'org.apache.sling.hapi.HApiUse' @type='/apps/sling/hapi_sample/types/pic_card'}" + data-sly-attribute="${card.itemtype}" class="card-asset"> + <a rel="self" href="details.html"> + <img data-sly-attribute="${card.itemprop.thumbnail}" src="assets/preview-small.png" alt=""> + + <div> + <h4 data-sly-attribute="${card.itemprop['title']}">PIC 004</h4> + + <p class="type">PSD</p> + + <p data-sly-attribute="${card.itemprop.resolution}" + data-sly-use.resolution="${'org.apache.sling.hapi.HApiUse' @type=card.proptype.resolution}" class="resolution"> + <span data-sly-attribute="${resolution.itemprop.width}">1520</span> x <span + data-sly-attribute="${resolution.itemprop.height}">600</span> + </p> + + <p data-sly-attribute="${card.itemprop.size}" class="size">349KB</p> + <meta data-sly-attribute="${card.itemprop.disabled}" content="false"/> + <div class="myinfo"> + <p class="mymodified"> + <i>Modified</i> + <span data-sly-attribute="${card.itemprop.modified}" class="date">2 days ago</span> + <span>John Doe</span> + </p> + </div> + </div> + </a> + </div> + </div> + + <div class="col-md-4"> + <div data-sly-use.card="${'org.apache.sling.hapi.HApiUse' @type='/apps/sling/hapi_sample/types/pic_card'}" + data-sly-attribute="${card.itemtype}" class="card-asset"> + <a rel="self" href="details.html"> + <img data-sly-attribute="${card.itemprop.thumbnail}" src="assets/preview-small.png" alt=""> + + <div> + <h4 data-sly-attribute="${card.itemprop['title']}">PIC 005</h4> + + <p class="type">PNG</p> + + <p data-sly-attribute="${card.itemprop.resolution}" + data-sly-use.resolution="${'org.apache.sling.hapi.HApiUse' @type=card.proptype.resolution}" class="resolution"> + <span data-sly-attribute="${resolution.itemprop.width}">1220</span> x <span + data-sly-attribute="${resolution.itemprop.height}">400</span> + </p> + + <p data-sly-attribute="${card.itemprop.size}" class="size">179KB</p> + <meta data-sly-attribute="${card.itemprop.disabled}" content="false"/> + <div class="myinfo"> + <p class="mymodified"> + <i>Modified</i> + <span data-sly-attribute="${card.itemprop.modified}" class="date">1 day ago</span> + <span>Admin</span> + </p> + </div> + </div> + </a> + </div> + + <div data-sly-use.card="${'org.apache.sling.hapi.HApiUse' @type='/apps/sling/hapi_sample/types/pic_card'}" + data-sly-attribute="${card.itemtype}" class="card-asset"> + <a rel="self" href="details.html"> + <img data-sly-attribute="${card.itemprop.thumbnail}" src="assets/preview-small.png" alt=""> + + <div> + <h4 data-sly-attribute="${card.itemprop['title']}">PIC 006</h4> + + <p class="type">PSD</p> + + <p data-sly-attribute="${card.itemprop.resolution}" + data-sly-use.resolution="${'org.apache.sling.hapi.HApiUse' @type=card.proptype.resolution}" class="resolution"> + <span data-sly-attribute="${resolution.itemprop.width}">1220</span> x <span + data-sly-attribute="${resolution.itemprop.height}">400</span> + </p> + + <p data-sly-attribute="${card.itemprop.size}" class="size">329KB</p> + <meta data-sly-attribute="${card.itemprop.disabled}" content="false"/> + <div class="myinfo"> + <p class="mymodified"> + <i>Modified</i> + <span data-sly-attribute="${card.itemprop.modified}" class="date">5 minutes ago</span> + <span>Jane Austen</span> + </p> + </div> + </div> + </a> + </div> + </div> + </div> + + <!-- /container --> + <footer class="footer"> + <p>HApi sample</p> + </footer> +</div> + +</body> +</html> diff --git a/src/main/resources/SLING-INF/apps/sling/hapi_sample/site/assets/preview-small-album.png b/src/main/resources/SLING-INF/apps/sling/hapi_sample/site/assets/preview-small-album.png new file mode 100644 index 0000000..2b25153 Binary files /dev/null and b/src/main/resources/SLING-INF/apps/sling/hapi_sample/site/assets/preview-small-album.png differ diff --git a/src/main/resources/SLING-INF/apps/sling/hapi_sample/site/assets/preview-small.png b/src/main/resources/SLING-INF/apps/sling/hapi_sample/site/assets/preview-small.png new file mode 100644 index 0000000..0b369b4 Binary files /dev/null and b/src/main/resources/SLING-INF/apps/sling/hapi_sample/site/assets/preview-small.png differ diff --git a/src/main/resources/SLING-INF/apps/sling/hapi_sample/site/assets/preview1.png b/src/main/resources/SLING-INF/apps/sling/hapi_sample/site/assets/preview1.png new file mode 100644 index 0000000..90a7f1c Binary files /dev/null and b/src/main/resources/SLING-INF/apps/sling/hapi_sample/site/assets/preview1.png differ diff --git a/src/main/resources/SLING-INF/apps/sling/hapi_sample/site/details.json b/src/main/resources/SLING-INF/apps/sling/hapi_sample/site/details.json new file mode 100644 index 0000000..1293537 --- /dev/null +++ b/src/main/resources/SLING-INF/apps/sling/hapi_sample/site/details.json @@ -0,0 +1,4 @@ +{ + "jcr:primaryType": "nt:unstructured", + "sling:resourceType": "sling/hapi_sample/components/details" +} diff --git a/src/main/resources/SLING-INF/apps/sling/hapi_sample/site/site.json b/src/main/resources/SLING-INF/apps/sling/hapi_sample/site/site.json new file mode 100644 index 0000000..9482946 --- /dev/null +++ b/src/main/resources/SLING-INF/apps/sling/hapi_sample/site/site.json @@ -0,0 +1,4 @@ +{ + "jcr:primaryType": "nt:unstructured", + "sling:resourceType": "sling/hapi_sample/components/sample1" +} diff --git a/src/main/resources/SLING-INF/apps/sling/hapi_sample/types.json b/src/main/resources/SLING-INF/apps/sling/hapi_sample/types.json new file mode 100644 index 0000000..2834233 --- /dev/null +++ b/src/main/resources/SLING-INF/apps/sling/hapi_sample/types.json @@ -0,0 +1,176 @@ +{ + + "jcr:primaryType": "sling:Folder", + "album_card": + + { + + "jcr:primaryType": "nt:unstructured", + "description": "A demo card type for HApi", + "extends": "/apps/sling/hapi_sample/types/demo_card", + "fqdn": "org.apache.sling.hapi_sample.album_card", + "name": "album_card", + "parameters": [ ], + "sling:resourceType": "sling/hapi/components/type", + "thumbnail": + + { + + "jcr:primaryType": "nt:unstructured", + "description": "The thumbnail of the demo pic card", + "type": "org.apache.sling.hapi.common.Image", + "multiple": true + + }, + "disabled": + { + + "jcr:primaryType": "nt:unstructured", + "description": "Whether this album is disabled or not", + "type": "org.apache.sling.hapi.common.Boolean", + "multiple": false + + }, + "modified": + { + + "jcr:primaryType": "nt:unstructured", + "description": "When was the pic last modified", + "type": "org.apache.sling.hapi.common.Text", + "multiple": false + + }, + "cards": + { + + "jcr:primaryType": "nt:unstructured", + "description": "The number of pictures in this album", + "type": "org.apache.sling.hapi.common.Number", + "multiple": false + + }, + "users": + + { + "jcr:primaryType": "nt:unstructured", + "description": "The numbers of users for this album", + "type": "org.apache.sling.hapi.common.Number", + "multiple": false + } + + }, + "pic_card": + { + + "jcr:primaryType": "nt:unstructured", + "description": "A demo card type for HApi", + "extends": "/apps/sling/hapi_sample/types/demo_card", + "fqdn": "org.apache.sling.hapi_sample.pic_card", + "name": "pic_card", + "parameters": [ ], + "sling:resourceType": "sling/hapi/components/type", + "thumbnail": + + { + + "jcr:primaryType": "nt:unstructured", + "description": "The thumbnail of the demo pic card", + "type": "org.apache.sling.hapi.common.Image", + "multiple": false + + }, + "resolution": + { + + "jcr:primaryType": "nt:unstructured", + "description": "The width and height of the demo pic card", + "type": "/apps/sling/hapi_sample/types/resolution", + "multiple": false + + }, + "size": + { + + "jcr:primaryType": "nt:unstructured", + "description": "The binary size of the demo pic", + "type": "org.apache.sling.hapi.common.Text", + "multiple": false + + }, + "disabled": + { + + "jcr:primaryType": "nt:unstructured", + "description": "Whether this pic is disabled or not", + "type": "org.apache.sling.hapi.common.Boolean", + "multiple": false + + }, + "modified": + + { + "jcr:primaryType": "nt:unstructured", + "description": "When was the pic last modified", + "type": "org.apache.sling.hapi.common.Text", + "multiple": false + } + + }, + "resolution": + { + + "jcr:primaryType": "nt:unstructured", + "description": "A resolution of an image", + "fqdn": "org.apache.sling.hapi_sample.resolution", + "name": "resolution", + "sling:resourceType": "sling/hapi/components/type", + "width": + + { + + "jcr:primaryType": "nt:unstructured", + "description": "The width", + "type": "org.apache.sling.hapi.common.Number", + "multiple": false + + }, + "height": + + { + "jcr:primaryType": "nt:unstructured", + "description": "The height", + "type": "org.apache.sling.hapi.common.Number", + "multiple": false + } + + }, + "demo_card": + { + + "jcr:primaryType": "nt:unstructured", + "description": "A demo card type for HApi", + "fqdn": "org.apache.sling.hapi_sample.demo_card", + "name": "demo_card", + "parameters": [ ], + "sling:resourceType": "sling/hapi/components/type", + "title": + + { + + "jcr:primaryType": "nt:unstructured", + "description": "The title of the demo card", + "type": "org.apache.sling.hapi.common.Text", + "multiple": false + + }, + "card_description": + + { + "jcr:primaryType": "nt:unstructured", + "description": "The description of the demo card", + "type": "org.apache.sling.hapi.common.Text", + "multiple": false + } + } + +} -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
