Hi, On Mon, Aug 5, 2013 at 5:50 AM, Dishara Wijewardana <[email protected] in thread [Status Update] Apache Cassandra backend for Sling: > Hi Ian, > Can you please provide me an explanation on above fact I raised which is > related to this thread, thought you might have missed this.
The question was: > " > Can you explain in a bit more detail how I should map a cassandra > resources from sling browser http://localhost:8080/.explorer.html ? . I > can add different JCR node types. How my cassandra node type get registered > here. Does it load all resource providers from reflection when I > implemented the provider interface. > " ResourceProviders are provider implementations that OSGi registers with the ResourceResolver as each ResourceProvider starts. In the properties of the resource provider there is information telling the ResourceResolver what paths each ResourceProvider is responsible for. There is no concept of NodeType in a ResourceProvider, so no registration is necessary. NodeType is a JCR concept. In Sling there is a concept of Resource Type, which is mapped to the property sling:resourceType. There is no registration of resourceTypes required, they just are, what they are. So in the case of the CassandraResource provider, it will register at a path, say /content/photos and then every http request to http://localhost:8080/content/photos/** will be sent to the CassandraResourceProvider. It will produce a Resource suitably populated with properties. Remember, the CassandraResource Provider must be an OSGi Component with that implements the Service ResourceProvider, and declares itself (with a @Service annotation) as being a Service implementation. HTH, please ask more questions if it doesnt. Best Regards Ian
