Package com.day.cq.mcm.api
Class MCMPluginAdapter
- java.lang.Object
-
- com.day.cq.mcm.api.MCMPluginAdapter
-
- All Implemented Interfaces:
MCMPlugin
public abstract class MCMPluginAdapter extends java.lang.Object implements MCMPlugin
Helps when implementingMCMPlugin. Provides the root component functionality with a list of components manageable viaaddExperienceComponent(String, Factory)andaddTouchpointComponent(String, Factory). You can also add only one (Experience or touchpoint), or many.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceMCMPluginAdapter.Factory<T>
-
Constructor Summary
Constructors Constructor Description MCMPluginAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<java.lang.String>getExperienceRootComponents()Returns the comptypes that were registered withaddExperienceComponent(String, Factory).java.util.Collection<java.lang.String>getTouchpointRootComponents()Returns the comptypes that were registered withaddTouchpointComponent(String, Factory).ExperiencemakeExperience(Resource adaptable)Should try it's best to make an experience out of the adaptable.TouchpointmakeTouchpoint(Resource adaptable)Should try it's best to make an experience out of the adaptable.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.day.cq.mcm.api.MCMPlugin
findReferencedTouchpoints, getPluginId
-
-
-
-
Method Detail
-
getTouchpointRootComponents
public java.util.Collection<java.lang.String> getTouchpointRootComponents()
Returns the comptypes that were registered withaddTouchpointComponent(String, Factory).- Specified by:
getTouchpointRootComponentsin interfaceMCMPlugin
-
getExperienceRootComponents
public java.util.Collection<java.lang.String> getExperienceRootComponents()
Returns the comptypes that were registered withaddExperienceComponent(String, Factory).- Specified by:
getExperienceRootComponentsin interfaceMCMPlugin
-
makeExperience
public Experience makeExperience(Resource adaptable)
Description copied from interface:MCMPluginShould 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-exampleconfigwith a property setting of:- Specified by:
makeExperiencein interfaceMCMPlugin- Returns:
-
makeTouchpoint
public Touchpoint makeTouchpoint(Resource adaptable)
Description copied from interface:MCMPluginShould 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:
makeTouchpointin interfaceMCMPlugin- Returns:
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-