Class DocumentationURLMethod

All Implemented Interfaces:
freemarker.template.TemplateMethodModel, freemarker.template.TemplateMethodModelEx, freemarker.template.TemplateModel, org.alfresco.processor.ProcessorExtension, TemplateProcessorExtension

public class DocumentationURLMethod extends BaseTemplateProcessorExtension implements freemarker.template.TemplateMethodModelEx
  • Constructor Details

    • DocumentationURLMethod

      public DocumentationURLMethod()
  • Method Details

    • setDefaultDocumentationUrl

      public void setDefaultDocumentationUrl(String defaultDocumentationUrl)
    • setAcsVersion

      public void setAcsVersion(String acsVersion)
    • setAlfrescoSearchVersion

      public void setAlfrescoSearchVersion(String alfrescoSearchVersion)
    • setAlfrescoSearchEnterpriseVersion

      public void setAlfrescoSearchEnterpriseVersion(String alfrescoSearchEnterpriseVersion)
    • setDocumentationBaseUrl

      public void setDocumentationBaseUrl(String documentationBaseUrl)
    • exec

      public Object exec(List args) throws freemarker.template.TemplateModelException
      Returns documentation URL. You can specify property key which should hold value of topic uid and url component(if required). * a) If no arguments are provided, the default documentation URL is returned.
            ${documentationUrl() -> https://support.hyland.com/p/alfresco
       
      b) First argument is interpreted as Topic UID of the URL. The value is retrieved and treated as Topic UID appended after baseURL and before version.
            ${documentationURL("eet567890373737")} -> https://support.hyland.com/access?dita:id=eet567890373737&vrm_version=25.1
       
      c) Second argument(if required) is interpreted as an additional URL component, which will be appended to the URL to denote a specific component of Alfresco.
           ${documentationUrl("eeu1720075126296", "&component=Alfresco%20Content%20Services%20Community%20Edition"} -> https://support.hyland.com/access?dita:id=eeu1720075126296&vrm_version=25.1&component=Alfresco%20Content%20Services%20Community%20Edition
       
      d) Third argument (if required) is interpreted as the Alfresco component (e.g., "solr", "elasticsearch", or empty) to determine which version to use in the URL.
           ${documentationUrl("eeu1720075126296", "", "solr")} -> https://support.hyland.com/access?dita:id=eeu1720075126296&vrm_version=2.0
       
      Specified by:
      exec in interface freemarker.template.TemplateMethodModel
      Specified by:
      exec in interface freemarker.template.TemplateMethodModelEx
      Parameters:
      args - arguments passed to Freemarker template method invocation first argument is interpreted as Topic UID of the URL, second argument is interpreted as an additional URL component, third argument is interpreted as the Alfresco component ("solr", "elasticsearch", or empty) to select the version.
      Returns:
      the documentation URL
      Throws:
      freemarker.template.TemplateModelException - if an error occurs
    • getDocumentationUrl

      public String getDocumentationUrl()
      Returns default landing documentation URL.
      Returns:
      default documentation URL
    • getDocumentationUrl

      public String getDocumentationUrl(String topicUid, String urlComponent, String alfrescoComponent)
      Constructs the documentation URL using the base URL, topic UID, version, and additional component.
      Parameters:
      topicUid - path segment
      urlComponent - additional URL component (may be empty)
      alfrescoComponent - additional Alfresco component (may be empty), to determine the version
      Returns:
      full documentation URL