Menu

What is interface in java?

An interface is a complete abstraction, which helps us expose the methods that can be invoked by the outer world that derive the interface(subclasses). In general terms, the interface is for hiding the data.

Types of Interface


Functional interface: A interface that has only one abstract method. It may have other static and default methods. you can leave the name while implementing the name of the method because an interface contains only one abstract method.

Marker interface: A interface without any method. This is to add on some special functionality to the class so the compiler can treat that class in different ways.

Generic interface: A interface that is general like a class and has variables, methods, and constructors.

How to fetch and checkout a git branch?

Git is a version control system that is used to store and manage the codebase. A branch from Git can be checkout using Git command > git checkout <branch_name>.

A new branch can be fetch and checkout using below git command.

git fetch && git checkout feature/social_sign


Git version control for programmer

 

How to check registered sling models classes in AEM?

Sling Models are annotation driven Java "POJO's" (Plain Old Java Objects) that facilitate the mapping of data from the JCR to Java variables and provide a number of other refinements when developing in the context of AEM (Adobe Experience Manager).

Sling Models Bound to Resource Types and can be explored and view in Felix console using the below path. And can be accessed on Felix console > Status > Sling Models

/system/console/status-slingmodels

Sling Models Inject Annotation Processor Factories


  • com.day.cq.wcm.models.impl.injectors.StyleValueInjector
  • com.day.cq.wcm.models.impl.injectors.StyleOrValueMapValueInjector
  • com.adobe.acs.commons.models.injectors.annotation.impl.JsonValueMapValueAnnotationProcessorFactory
  • com.adobe.acs.commons.models.injectors.annotation.impl.I18NAnnotationProcessorFactory
  • com.adobe.acs.commons.models.injectors.annotation.impl.HierarchicalPagePropertyAnnotationProcessorFactory
  • com.adobe.acs.commons.models.injectors.annotation.impl.ChildResourceFromRequestAnnotationProcessorFactory
  • com.adobe.acs.commons.models.injectors.annotation.impl.SharedValueMapValueAnnotationProcessorFactory
  • com.adobe.acs.commons.models.injectors.annotation.impl.AemObjectAnnotationProcessorFactory
  • org.apache.sling.models.impl.injectors.BindingsInjector
  • org.apache.sling.models.impl.injectors.ResourcePathInjector
  • org.apache.sling.models.impl.injectors.RequestAttributeInjector
  • org.apache.sling.models.impl.injectors.OSGiServiceInjector
  • org.apache.sling.models.impl.injectors.SlingObjectInjector
  • org.apache.sling.models.impl.injectors.SelfInjector
  • org.apache.sling.models.impl.injectors.ChildResourceInjector
  • org.apache.sling.models.impl.injectors.ValueMapInjector 

Sling Models Implementation Pickers 


  • org.apache.sling.models.impl.ResourceTypeBasedResourcePicker
  • org.apache.sling.models.impl.FirstImplementationPicker


Sling Models Injectors

  • i18n - com.adobe.acs.commons.models.injectors.impl.I18nInjector 
  • style - com.day.cq.wcm.models.impl.injectors.StyleValueInjector 
  • stylevaluemap - com.day.cq.wcm.models.impl.injectors.StyleOrValueMapValueInjector 
  • json-valuemap-value - com.adobe.acs.commons.models.injectors.impl.JsonValueMapValueInjector 
  • hierarchical-page-property - com.adobe.acs.commons.models.injectors.impl.HierarchicalPagePropertyInjector 
  • child-resources-from-request - com.adobe.acs.commons.models.injectors.impl.ChildResourceFromRequestInjector 
  • script-bindings - org.apache.sling.models.impl.injectors.BindingsInjector 
  • valuemap - org.apache.sling.models.impl.injectors.ValueMapInjector 
  • resource-path - org.apache.sling.models.impl.injectors.ResourcePathInjector 
  • child-resources - org.apache.sling.models.impl.injectors.ChildResourceInjector 
  • request-attributes - org.apache.sling.models.impl.injectors.RequestAttributeInjector 
  • define-objects - com.adobe.acs.commons.models.injectors.impl.AemObjectInjector 
  • osgi-services - org.apache.sling.models.impl.injectors.OSGiServiceInjector 
  • sling-object - org.apache.sling.models.impl.injectors.SlingObjectInjector 
  • self - org.apache.sling.models.impl.injectors.SelfInjector