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 interface
MCMPluginAdapter.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)
.Experience
makeExperience(Resource adaptable)
Should try it's best to make an experience out of the adaptable.Touchpoint
makeTouchpoint(Resource adaptable)
Should try it's best to make an experience out of the adaptable.java.lang.String
toString()
-
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:
getTouchpointRootComponents
in interfaceMCMPlugin
-
getExperienceRootComponents
public java.util.Collection<java.lang.String> getExperienceRootComponents()
Returns the comptypes that were registered withaddExperienceComponent(String, Factory)
.- Specified by:
getExperienceRootComponents
in interfaceMCMPlugin
-
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 interfaceMCMPlugin
- 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 interfaceMCMPlugin
- Returns:
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-