Package com.adobe.acs.commons.wcm
Interface AuthorUIHelper
-
@ProviderType public interface AuthorUIHelperA Service that provides centralized logic for generating links to edit Pages and Assets on the author environment. Driven based on an OSGi configuration that allows each implementation to toggle whether to generate links to the Touch UI or Classic UI. Uses thecom.day.cq.commons.Externalizerto create absolute URLs.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgenerateEditAssetLink(String assetPath, boolean absoluteUrl, org.apache.sling.api.resource.ResourceResolver resolver)Generates a URL to edit a DAM asset in AEM author environment.StringgenerateEditPageLink(String pagePath, boolean absoluteUrl, org.apache.sling.api.resource.ResourceResolver resolver)Generates a URL to edit a page in AEM author environment.booleanisTouchUI()Indicates whether the author experience is using the Touch UI or Classic UI
-
-
-
Method Detail
-
isTouchUI
boolean isTouchUI()
Indicates whether the author experience is using the Touch UI or Classic UI- Returns:
- true if configured to use Touch UI
-
generateEditPageLink
String generateEditPageLink(String pagePath, boolean absoluteUrl, org.apache.sling.api.resource.ResourceResolver resolver)
Generates a URL to edit a page in AEM author environment. Will return a url using either the classic or touch UI url based on configuration properties. Defaults to Touch UI ('/editor.html') appends the '.html' extension to the returned URL String- Parameters:
pagePath- the path to the pageabsoluteUrl- if set to true will use the Externalizer to generate an absolute Url with author hostnameresolver- used by theExternalizerfor resource mapping, can be passed as null to avoid extra processing.- Returns:
- - returns a relative or absolute URL to edit the passed in page path
-
generateEditAssetLink
String generateEditAssetLink(String assetPath, boolean absoluteUrl, org.apache.sling.api.resource.ResourceResolver resolver)
Generates a URL to edit a DAM asset in AEM author environment. Will return a url using either the classic or touch UI url based on configuration properties. Defaults to Touch UI ('/assetdetails.html')- Parameters:
assetPath- the path to the asset in the DAMabsoluteUrl- if set to true will use the Externalizer to generate an absolute Url with author hostnameresolver- used by theExternalizerfor resource mapping, can be passed as null to avoid extra processing.- Returns:
- - returns a relative or absolute URL to edit the passed in asset path
-
-