Class MCMPluginAdapter

java.lang.Object
com.day.cq.mcm.api.MCMPluginAdapter
All Implemented Interfaces:
MCMPlugin

public abstract class MCMPluginAdapter extends Object implements MCMPlugin
Helps when implementing MCMPlugin. Provides the root component functionality with a list of components manageable via addExperienceComponent(String, Factory) and addTouchpointComponent(String, Factory). You can also add only one (Experience or touchpoint), or many.
  • Constructor Details

    • MCMPluginAdapter

      public MCMPluginAdapter()
  • Method Details

    • getTouchpointRootComponents

      public Collection<String> getTouchpointRootComponents()
      Returns the comptypes that were registered with addTouchpointComponent(String, Factory).
      Specified by:
      getTouchpointRootComponents in interface MCMPlugin
    • getExperienceRootComponents

      public Collection<String> getExperienceRootComponents()
      Returns the comptypes that were registered with addExperienceComponent(String, Factory).
      Specified by:
      getExperienceRootComponents in interface MCMPlugin
    • makeExperience

      public Experience makeExperience(Resource adaptable)
      Description copied from interface: MCMPlugin
      Should try it's best to make an experience out of the adaptable. Should not check for the component type, because component types might be subtyped and AdapterFactory can be configured to deal with that by setting up indirection via setting up a configuration: com.day.cq.mcm.impl.MCMConfiguration-exampleconfig with a property setting of:
       
       
      Specified by:
      makeExperience in interface MCMPlugin
      Parameters:
      adaptable -
      Returns:
    • makeTouchpoint

      public Touchpoint makeTouchpoint(Resource adaptable)
      Description copied from interface: MCMPlugin
      Should try it's best to make an experience out of the adaptable. Should not check for the component type, because component types might be subtyped and AdapterFactory can be configured to deal with that by setting up indirection via configuration of a
      Specified by:
      makeTouchpoint in interface MCMPlugin
      Parameters:
      adaptable -
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object