Class AbstractExprNameExtractor

java.lang.Object
fr.becpg.repo.helper.impl.AbstractExprNameExtractor
All Implemented Interfaces:
AttributeExtractorService.AttributeExtractorPlugin
Direct Known Subclasses:
CharactAttributeExtractorPlugin, VariantAttributeExtractorPlugin

public abstract class AbstractExprNameExtractor extends Object implements AttributeExtractorService.AttributeExtractorPlugin

Abstract AbstractExprNameExtractor class.

Version:
$Id: $Id
Author:
matthieu
  • Field Details

    • CSS_CLASS_SEPARATOR

      private static final String CSS_CLASS_SEPARATOR
      See Also:
    • CSS_ID_SEPARATOR

      private static final String CSS_ID_SEPARATOR
      See Also:
    • nodeService

      @Autowired protected org.alfresco.service.cmr.repository.NodeService nodeService
    • namespaceService

      @Autowired protected org.alfresco.service.namespace.NamespaceService namespaceService
    • expressionService

      @Autowired protected ExpressionService expressionService
  • Constructor Details

    • AbstractExprNameExtractor

      public AbstractExprNameExtractor()
  • Method Details

    • extractExpr

      public String extractExpr(org.alfresco.service.cmr.repository.NodeRef nodeRef, String exprFormat)

      extractExpr.

      Parameters:
      nodeRef - a NodeRef object
      exprFormat - a String object
      Returns:
      a String object
    • extractEntityName

      protected String extractEntityName(org.alfresco.service.cmr.repository.NodeRef nodeRef, String exprFormat)
      Extracts the display name of an entity. An entity template is shown under its title when it has one: the title is multilingual, so each user reads the template in their own language, whereas the name format only knows the single technical name.
      Parameters:
      nodeRef - the entity
      exprFormat - the name format applied to an entity that is not a titled template
      Returns:
      the display name, possibly null
    • toLocalizedText

      private String toLocalizedText(Serializable value)
    • clean

      private String clean(String expr)

      clean.

      Parameters:
      expr - a String object
      Returns:
      a String object
    • templateCssClasses

      protected String templateCssClasses(String typeCss, org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.cmr.repository.NodeRef entityTplRef)
      Builds the CSS classes carrying the custom icon of an entity: the class of the template the entity was created from and, when the entity is itself a template, the class of its own icon.
      Parameters:
      typeCss - the CSS class of the entity type
      nodeRef - the entity
      entityTplRef - the template the entity refers to, possibly null
      Returns:
      the CSS classes, each one preceded by a space, or an empty string
    • templateCssClass

      private String templateCssClass(String typeCss, org.alfresco.service.cmr.repository.NodeRef templateNodeRef)
    • getPriority

      public Integer getPriority()
      Specified by:
      getPriority in interface AttributeExtractorService.AttributeExtractorPlugin