Package com.day.cq.dam.api.s7dam.utils
Interface PublishUtils
-
@ProviderType public interface PublishUtils
Utility to help viewers create urls pointing to production publish dc's Created by agangam on 7/21/14.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description String[]
externalizeImageDeliveryAsset(Resource resource)
Externalize an asset reference to a image delivery URL.String
externalizeImageDeliveryAsset(Resource resource, String assetPath)
Deprecated.String
externalizeImageDeliveryUrl(Resource resource, String url)
Externalize an image delivery URL The input url can be a relative path (e.g [/ctx]/is/image/[url]) or an absolute url (e.g.String
getISProperty(String tenantId, String property)
Get Image Server settingsString
getPublishNodeURL(Resource resource)
Retrieve the publish node URL from the replication agent.
-
-
-
Method Detail
-
getPublishNodeURL
String getPublishNodeURL(Resource resource) throws RepositoryException
Retrieve the publish node URL from the replication agent. NOTE: This URL does not include the context path of the publish node!- Parameters:
resource
- Resource for an asset- Returns:
- Publish root path
- Throws:
RepositoryException
- when an error occurs interacting with the repository
-
externalizeImageDeliveryAsset
@Deprecated String externalizeImageDeliveryAsset(Resource resource, String assetPath) throws RepositoryException
Deprecated.Externalize an asset reference to a image delivery URL. Will resolve to the Image Delivery cloud service if configured, otherwise it will resolve to the publish node.- Parameters:
resource
- Resource for an assetassetPath
- Path to the asset in the JCR- Returns:
- Image Serving Delivery URL
- Throws:
RepositoryException
- when an error occurs interacting with the repository
-
externalizeImageDeliveryAsset
String[] externalizeImageDeliveryAsset(Resource resource) throws RepositoryException
Externalize an asset reference to a image delivery URL. Will resolve to the Image Delivery cloud service if configured, otherwise it will resolve to the publish node.- Parameters:
resource
- Resource for an asset- Returns:
- The image server url and the image path
- Throws:
RepositoryException
- when an error occurs interacting with the repository
-
externalizeImageDeliveryUrl
String externalizeImageDeliveryUrl(Resource resource, String url) throws RepositoryException
Externalize an image delivery URL The input url can be a relative path (e.g [/ctx]/is/image/[url]) or an absolute url (e.g. http://[host]:[port]/[ctx]/is/image/[url]). The method will direct the url to the Image Delivery cloud service if configured, if no Image Delivery cloud service is configured the passed url will be returned back.- Parameters:
resource
- Resource for an asseturl
- Image Delivery URL- Returns:
- Externalized Image Serving Delivery URL or url if Image Delivery cloud service is not configured.
- Throws:
RepositoryException
- when an error occurs interacting with the repository
-
-