Package io.wcm.wcm.commons.component
Interface ComponentPropertyResolverFactory
@ProviderType
public interface ComponentPropertyResolverFactory
OSGi service for creating
ComponentPropertyResolver instances.
Please make sure to close the instance obtained by this factory after usage.-
Method Summary
Modifier and TypeMethodDescription@NotNull ComponentPropertyResolverget(@NotNull com.day.cq.wcm.api.Page page) Lookup for content resource associated with the page component (resource type).@NotNull ComponentPropertyResolverget(@NotNull com.day.cq.wcm.api.components.ComponentContext wcmComponentContext) Lookup with content resource associated with a component (resource type).@NotNull ComponentPropertyResolverget(@NotNull org.apache.sling.api.resource.Resource resource) Lookup for content resource associated with a component (resource type).@NotNull ComponentPropertyResolverget(@NotNull org.apache.sling.api.resource.Resource resource, boolean ensureResourceType) Lookup for content resource associated with a component (resource type).
-
Method Details
-
get
Lookup for content resource associated with the page component (resource type).- Parameters:
page- Content page- Returns:
- Component property resolver
-
get
@NotNull @NotNull ComponentPropertyResolver get(@NotNull @NotNull org.apache.sling.api.resource.Resource resource) Lookup for content resource associated with a component (resource type).- Parameters:
resource- Content resource- Returns:
- Component property resolver
-
get
@NotNull @NotNull ComponentPropertyResolver get(@NotNull @NotNull org.apache.sling.api.resource.Resource resource, boolean ensureResourceType) Lookup for content resource associated with a component (resource type).- Parameters:
resource- Content resourceensureResourceType- Ensure the given resource has a resource type. If this is not the case, try to find the closest parent resource which has a resource type.- Returns:
- Component property resolver
-
get
@NotNull @NotNull ComponentPropertyResolver get(@NotNull @NotNull com.day.cq.wcm.api.components.ComponentContext wcmComponentContext) Lookup with content resource associated with a component (resource type).- Parameters:
wcmComponentContext- WCM component context- Returns:
- Component property resolver
-