Class ShortQNameMethod

java.lang.Object
org.alfresco.repo.processor.BaseProcessorExtension
org.alfresco.repo.template.ShortQNameMethod
All Implemented Interfaces:
freemarker.template.TemplateMethodModel, freemarker.template.TemplateMethodModelEx, freemarker.template.TemplateModel, org.alfresco.processor.ProcessorExtension

public final class ShortQNameMethod extends BaseProcessorExtension implements freemarker.template.TemplateMethodModelEx
Author:
Mike Hatfield FreeMarker custom method to return the short (prefix) version of a QName.

Usage: String shortQName(String longQName)

  • Constructor Details

    • ShortQNameMethod

      public ShortQNameMethod()
  • Method Details

    • setServiceRegistry

      public void setServiceRegistry(ServiceRegistry serviceRegistry)
      Set the service registry
      Parameters:
      serviceRegistry - the service registry
    • exec

      public Object exec(List args) throws freemarker.template.TemplateModelException
      Specified by:
      exec in interface freemarker.template.TemplateMethodModel
      Specified by:
      exec in interface freemarker.template.TemplateMethodModelEx
      Throws:
      freemarker.template.TemplateModelException
      See Also:
      • TemplateMethodModel.exec(java.util.List)