Package com.day.cq.dam.api.s7dam.utils
Interface PublishUtils
-
public interface PublishUtilsUtility 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 java.lang.String[]externalizeImageDeliveryAsset(Resource resource)Externalize an asset reference to a image delivery URL.java.lang.StringexternalizeImageDeliveryAsset(Resource resource, java.lang.String assetPath)Deprecated.java.lang.StringexternalizeImageDeliveryUrl(Resource resource, java.lang.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.java.lang.StringgetISProperty(java.lang.String tenantId, java.lang.String property)Get Image Server settingsjava.lang.StringgetPublishNodeURL(Resource resource)Retrieve the publish node URL from the replication agent.
-
-
-
Method Detail
-
getPublishNodeURL
java.lang.String getPublishNodeURL(Resource resource) throws javax.jcr.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:
javax.jcr.RepositoryException- when an error occurs interacting with the repository
-
externalizeImageDeliveryAsset
@Deprecated java.lang.String externalizeImageDeliveryAsset(Resource resource, java.lang.String assetPath) throws javax.jcr.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:
javax.jcr.RepositoryException- when an error occurs interacting with the repository
-
externalizeImageDeliveryAsset
java.lang.String[] externalizeImageDeliveryAsset(Resource resource) throws javax.jcr.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:
javax.jcr.RepositoryException- when an error occurs interacting with the repository
-
externalizeImageDeliveryUrl
java.lang.String externalizeImageDeliveryUrl(Resource resource, java.lang.String url) throws javax.jcr.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:
javax.jcr.RepositoryException- when an error occurs interacting with the repository
-
getISProperty
java.lang.String getISProperty(java.lang.String tenantId, java.lang.String property)Get Image Server settings- Parameters:
tenantId- blank or the tenantIdproperty- to be fetched from values- Returns:
- property requested or an empty string
-
-