Class CommerceExperienceFragmentImpl
- java.lang.Object
-
- com.adobe.cq.commerce.core.components.internal.models.v1.experiencefragment.CommerceExperienceFragmentImpl
-
- All Implemented Interfaces:
CommerceExperienceFragment
,com.adobe.cq.export.json.ComponentExporter
,com.adobe.cq.wcm.core.components.models.Component
@Model(adaptables=org.apache.sling.api.SlingHttpServletRequest.class, adapters=CommerceExperienceFragment.class, resourceType="core/cif/components/commerce/experiencefragment/v1/experiencefragment") public class CommerceExperienceFragmentImpl extends Object implements CommerceExperienceFragment
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.sling.api.resource.Resource
resource
protected static String
RESOURCE_TYPE
-
Fields inherited from interface com.adobe.cq.commerce.core.components.models.experiencefragment.CommerceExperienceFragment
PN_CQ_CATEGORIES, PN_CQ_PRODUCTS, PN_FRAGMENT_LOCATION
-
-
Constructor Summary
Constructors Constructor Description CommerceExperienceFragmentImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.sling.api.resource.Resource
getExperienceFragmentResource()
This method returns the first experience fragment that matches the location and product or category identifier of the current page.String
getExportedType()
String
getName()
Returns the technical name of the experience fragment.
-
-
-
Field Detail
-
RESOURCE_TYPE
protected static final String RESOURCE_TYPE
- See Also:
- Constant Field Values
-
resource
@Inject protected org.apache.sling.api.resource.Resource resource
-
-
Method Detail
-
getExperienceFragmentResource
public org.apache.sling.api.resource.Resource getExperienceFragmentResource()
Description copied from interface:CommerceExperienceFragment
This method returns the first experience fragment that matches the location and product or category identifier of the current page. If multiple experience fragments match, the first one is returned, without any guarantee about ordering.- Specified by:
getExperienceFragmentResource
in interfaceCommerceExperienceFragment
- Returns:
- The first experience fragment that matches this container or null.
-
getName
public String getName()
Description copied from interface:CommerceExperienceFragment
Returns the technical name of the experience fragment.- Specified by:
getName
in interfaceCommerceExperienceFragment
- Returns:
- the technical name of the experience fragment
-
getExportedType
public String getExportedType()
- Specified by:
getExportedType
in interfacecom.adobe.cq.wcm.core.components.models.Component
- Specified by:
getExportedType
in interfacecom.adobe.cq.export.json.ComponentExporter
-
-