in remote-content-api/unused-for-now/sample-http-api/src/main/java/org/apache/sling/remotecontentapi/typesystem/HardcodedTypeSystem.java [56:110]
static {
// Although these definitions are in Java code for this early prototype, the
// plan is to move to a mini-language (DSL) to avoid having to use Java
// code for what is actually just declarative statements.
DEFAULT_TYPE = Builder
.forResourceType(SLING_DEFAULT_RESOURCE_TYPE)
.withAnnotation(VISIT_CONTENT, TRUE)
.build();
addType(
Builder.forResourceType("cq:Page")
.withAnnotation(DOCUMENT_ROOT, TRUE)
.withAnnotation(NAVIGABLE, TRUE)
.withAnnotation(VISIT_CONTENT, TRUE)
.withAnnotation(VISIT_CONTENT_RESOURCE_NAME_PATTERN, "jcr:content")
.withAnnotation(CONTENT_INCLUDE_PROPERTY_REGEXP, "sling:ResourceType|cq:tags")
.withAnnotation(CONTENT_EXCLUDE_PROPERTY_REGEXP, "jcr:.*|cq:.*")
);
addType(
Builder.forResourceType("sling:Folder")
.withAnnotation(NAVIGABLE, TRUE)
);
addType(
Builder.forResourceType("sling:OrderedFolder")
.withAnnotation(NAVIGABLE, TRUE)
);
addType(
Builder.forResourceType("sling:OrderedFolder")
.withAnnotation(NAVIGABLE, TRUE)
);
addType(
Builder.forResourceType("wknd/components/page")
.withAnnotation(VISIT_CONTENT, TRUE)
);
addType(
Builder.forResourceType("wknd/components/image")
.withAnnotation(VISIT_CONTENT, TRUE)
.withAnnotation(DEREFERENCE_BY_PATH, "fileReference")
);
addType(
Builder.forResourceType("wknd/components/carousel")
.withAnnotation(VISIT_CONTENT, TRUE)
);
// for /content/articles examples
addType(
Builder.forResourceType("samples/section")
.withAnnotation(NAVIGABLE, TRUE)
.withAnnotation(NAVIGATION_PROPERTIES_LIST, "name")
);
addType(
Builder.forResourceType("samples/article")
.withAnnotation(NAVIGABLE, TRUE)
);
}