TechCookies

Collection of coding and technical know-hows

Menu

Skip to content
  • Home
  • About Me

Daily Archives: August 25, 2016

Standard

Posted by

Geetika Chhabra

Posted on

August 25, 2016

Posted under

AEM / CQ5

Comments

Leave a comment

Creating Custom Social Component | AEM Communities

AEM Communities provides the ability to quickly create an on-premise community site that has improved performance, improved site management, and encourages the conversion of site visitors to valuable community members. It simplifies the creation and customization of community features such as forums, user groups, blogs, Q&A, calendars, comments, reviews, voting, ratings, and assignments.

Though OOTB components can fulfill our needs up to an extent but more often than not, we need to create our custom social components.

The foundation of a community site is SCF (Social Component Framework). It simplifies the process of configuring, customizing, and extending Communities components on both server-side and client-side. If we need only the UI changes ( Look and feel, skinning related changes), that can easily be done by overlaying the component and modifying the CSS/JS. But if we need to add some custom functionality which is not available in the OOTB component, then we need to add the custom java classes based on our requirement.

Documentation has clearly mentioned the importance of certain java classes and interfaces. Few of the important ones are listed below:

  1. SocialComponent Interface : SocialComponents are POJOs that represent a resource for an AEM Communities feature.All business logic and view logic is encapsulated in the SocialComponent, including the site visitor’s session information, if necessary.
  2. SocialComponentFactory Interface: A SocialComponentFactory (factory) registers a SocialComponent with the framework.  The factory provides a means of letting the framework know what SocialComponents are available for a given resourceType and their priority ranking when multiple SocialComponents are identified.
  3. PostOperation Class: The PostOperation endpoint implementation sets sling.post.operation to a value to which the operation will respond. All POST requests with an :operation parameter set to that value will be delegated to this implementation class.The PostOperation invokes the SocialOperation which performs the actions necessary for the operation.
  4. SocialOperation Class: The class performs all the actions expected from this operation class.
  5. OperationExtension Class: OperationExtension classes are custom pieces of code that can be injected into an operation allowing for customization of operations to meet business needs.

I have created an Ideation component based on the Adobe recommendation. You can find it in the Github repository here.

Feel free to comment if you face any issues. 🙂

References :

https://github.com/Adobe-Marketing-Cloud/aem-scf-sample-components-extension

https://docs.adobe.com/docs/en/aem/6-1/develop/communities/scf/server-customize.html

https://docs.adobe.com/docs/en/aem/6-1/develop/communities/scf.html

Hope it helps !! 🙂

Advertisement

Geetika Chhabra

Geetika Chhabra

Geetika Chhabra

Geetika is a certified AEM Developer who has deep expertise in AEM technology stack. Her inquisitiveness has led her to explore the areas apart from AEM as well.

View Full Profile →

All Posts

  • March 2017 (5)
  • January 2017 (1)
  • August 2016 (2)
  • July 2016 (5)
  • September 2015 (1)
  • July 2015 (2)
  • July 2014 (2)

Recent Posts

  • Extending the communities component – Part 2
  • Basic URL Rewrite Rules | Hiding the Content Root from URL
  • Mod Proxy | Trailing Slash Issue
  • Communities Component Guide
  • Extending a Communities Component

Categories

  • AEM (5)
    • AEM Communities (3)
    • Dispatcher (1)
  • AEM / CQ5 (15)
  • Apache (2)
  • Content Migration (2)
    • Talend (2)

Blog Stats

  • 22,072 Views

Tags

Adobe CQ5 AEM AEM/CQ5 AEM 6.2 AEM Communities Apache Apache2 Clientlibs Clientlibs for Communities CMS CND Comments Comments component Community Users component Component Guide Content Migration CQ5 Custom Node Custom Social Component Debugging Dependency Issue Dispatcher Extending communities component FP4 HTL IntelliJIDea Jackrabbit JCR mod proxy mod_proxy Multifield OSGI passing values between jobs port number resource resolver factory Rewrite Rules SCF Server Customize Sightly Sightly Template Sling Sling Models Talend Touch UI trailing slash issue Tunneling Tunnel Service URL shortening

Enter your email address to follow this blog and receive notifications of new posts by email.

Follow TechCookies on WordPress.com
Create a website or blog at WordPress.com
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Follow Following
    • TechCookies
    • Already have a WordPress.com account? Log in now.
    • TechCookies
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar