Accessing UGC with SRP
All AEM Communities components and features are built on the social component framework (SCF) , which invokes the SocialResourceProvider API to access all user generated content (UGC).
Before a community site is created, the storage resource provider (SRP) must be configured to select an implementation consistent with the underlying topology . The SRP implementations are based on three storage options:
About UGC Storage
What is important to know about storage of UGC is, when a site is configured to use ASRP or MSRP, the actual UGC is not be stored in AEM's node store (JCR).
While there may be nodes in JCR which shadow the UGC to provide useful metadata, these nodes are not to be confused with the actual UGC.
When developing custom components, developers should be careful to code independently of the current chosen topology, thus retaining flexibility to move to a new topology in the future.
Assume JCR Not Available
Methods specific to JCR should avoided.
Methods to use:
- Sling API (Sling Resource)
- Do not assume there are JCR nodes
- OSGi Events
- Do not assume there are JCR events
Methods to avoid:
- Node API
- JCR events
- Workflow launchers (which use JCR events)
- Community Content Storage - discusses the available SRP choices for a UGC common store
- Storage Resource Provider Overview - introduction and repository usage overview
- SRP and UGC Essentials - SRP utility methods and examples
- Search Essentials - essential information for searching UGC
- SocialUtils Refactoring - mapping deprecated utility methods to current SRP utility methods