@ProviderType
public interface AssetKitHelper
Modifier and Type | Method and Description |
---|---|
AssetModel |
getAsset(org.apache.sling.api.resource.Resource resource)
Gets the asset represented by the resource.
|
Collection<? extends AssetModel> |
getAssets(org.apache.sling.api.resource.Resource[] resources)
Gets a collection of assets that at or exist under the paths provided.
|
Collection<? extends AssetModel> |
getAssets(org.apache.sling.api.resource.ResourceResolver resourceResolver,
String[] paths)
Gets a collection of assets that at or exist under the paths provided.
|
Collection<? extends AssetModel> |
getAssetsFromAssetCollection(org.apache.sling.api.resource.Resource resource)
Gets a collection of assets that exist at the collection represented by the resource.
|
Collection<? extends AssetModel> |
getAssetsFromAssetFolder(org.apache.sling.api.resource.Resource resource)
Gets a collection of assets that exist at the folder represented by the resource.
|
boolean |
isAsset(org.apache.sling.api.resource.Resource resource)
Checks if the resource is an asset.
|
boolean |
isAssetCollection(org.apache.sling.api.resource.Resource resource)
Checks if the resource is an assets collection.
|
boolean |
isAssetFolder(org.apache.sling.api.resource.Resource resource)
Checks if the resource is an assets folder.
|
void |
updateComponentOnPage(com.day.cq.wcm.api.Page page,
String resourceType,
String propertyName,
String propertyValue)
Updates a component on a page (or the page itself).
|
Collection<? extends AssetModel> getAssets(org.apache.sling.api.resource.ResourceResolver resourceResolver, String[] paths)
resourceResolver
- the resource resolver.paths
- the assets live at or under.Collection<? extends AssetModel> getAssets(org.apache.sling.api.resource.Resource[] resources)
resources
- an array of resources the assets live at or under.Collection<? extends AssetModel> getAssetsFromAssetCollection(org.apache.sling.api.resource.Resource resource)
resource
- represents the collection.Collection<? extends AssetModel> getAssetsFromAssetFolder(org.apache.sling.api.resource.Resource resource)
resource
- represents the assets folder.AssetModel getAsset(org.apache.sling.api.resource.Resource resource)
resource
- the resource that represents the asset.boolean isAssetFolder(org.apache.sling.api.resource.Resource resource)
resource
- the resource.boolean isAssetCollection(org.apache.sling.api.resource.Resource resource)
resource
- the resource.boolean isAsset(org.apache.sling.api.resource.Resource resource)
resource
- the resourcevoid updateComponentOnPage(com.day.cq.wcm.api.Page page, String resourceType, String propertyName, String propertyValue) throws org.apache.sling.api.resource.PersistenceException, javax.jcr.RepositoryException
page
- the page to update.resourceType
- the resource type of the component to update.propertyName
- the component property to update.propertyValue
- the component property value to set.org.apache.sling.api.resource.PersistenceException
javax.jcr.RepositoryException
Copyright © 2017–2023 Adobe. All rights reserved.