Professional Documents
Culture Documents
Background
Content Repository
Diverse data:
small & large, structured & unstructured, binary, metadata & relationships access control, locking, versioning, transactions, observation
Services:
Abstraction of data storage Generalized content services Separation of real storage from application interactions Standard API
4
JCR
The JCR specification defines an abstract model and a Java API for data storage and related services commonly used by content-oriented applications.
!
Target: any application that must handle both unstructured digital assets and structured or semi-structured information.
Workspaces Hierarchy of nodes Properties associated to a node Node types define constraints (properties and child nodes)
Repository
Workspace
[root]
Workspace
[root]
Workspace
[root]
http://localhost:7402/content/rststeps.innity.json
Level 1
Level 2
Write nodes & properties ! XML Import ! Assign a node types to nodes ! Change namespace registry
!
Login Read Nodes & properties XML export XPath queries Node types discovery Namespaces remapping
Optional
Locking ! Transactions ! Versioning
!
JCR: Observation
!
Observation enables an application to receive notification of persistence changes in the workspace. Base for BPM.
! ! ! ! ! !
2 use cases:
Unstructured content
Any properties and child nodes allowed nt:unstructured
11
nt:unstructured nt:file nt:folder nt:resource represents the actual content of a file. nt:version
mix:versionable: allows a node to support versioning mix:lockable: enables locking capabilities mix:referenceable: provides an auto-created jcr:uuid property
12
JCR Ecosystem
Open Standard
Java Community Process (http://jcp.org) Reference Implementation & TCK license, workspace, information open review, testing & collaboration
Sustainability
Apache infrastructure
Community
Open adoption
13
Sling
REST based web framework Content-driven, using a JCR content repository Powered by OSGi Scripting inside, multiple languages (JSP, server-side javascript, Scala, etc.) Apache Open Source project
14
It means:
Sling is built in a way that embraces the web. Sling design is based on the principles of the WWW. Sling processes HTTP requests in a RESTful way.
15
architectural style
" manages bundles as app components " provides system services to bundles
JCR api
" stores the content
16
sling
felix
JCR api
jackrabbit
2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
17
Create a node
!
18
/geometrixx/en/products/triangle.html
defines the resource defines the rendition
/geometrixx/en/products/triangle.teaser.html
2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
19
/geometrixx/en/products/triangle.teaser.html
sling:resourceType geometrixx/components/contentpage
20
JSR 283 spec: http://jcp.org/en/jsr/detail?id=283 ! Apache Jackrabbit: http://jackrabbit.apache.org/ ! Apache Sling: http://sling.apache.org/
! !
http://dev.day.com/docs/en/crx/current/getting_started/first_steps_with_crx.html
21