Package com.day.cq.dam.api.s7dam.utils
Interface PublishUtils
Utility to help viewers create urls pointing to production publish dc's
Created by agangam on 7/21/14.
-
Method Summary
Modifier and TypeMethodDescriptionString[]externalizeImageDeliveryAsset(Resource resource) Externalize an asset reference to a image delivery URL.externalizeImageDeliveryAsset(Resource resource, String assetPath) Deprecated.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.getISProperty(String tenantId, String property) Get Image Server settingsgetPublishNodeURL(Resource resource) Retrieve the publish node URL from the replication agent.
-
Method Details
-
getPublishNodeURL
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
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
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
-
getISProperty
Get Image Server settings- Parameters:
tenantId- blank or the tenantIdproperty- to be fetched from values- Returns:
- property requested or an empty string
-
externalizeImageDeliveryAsset(Resource)