Class BaseMapper

    • Field Detail

      • defaultProperty

        protected String defaultProperty
        The name of the default property to pull from the Template Engine Service if the default is requested
      • separator

        protected char separator
        The separator used to concatenate the result parts for this mapper.
    • Constructor Detail

      • BaseMapper

        public BaseMapper()
        Default C'tor. If you use this C'tor, you must use the bean setter to set the various properties needed for this mapper before first usage.
    • Method Detail

      • getCacheSize

        public int getCacheSize()
        Get the CacheSize value.
        Returns:
        the CacheSize value.
      • setCacheSize

        public void setCacheSize​(int cacheSize)
        Set the CacheSize value.
        Parameters:
        cacheSize - The new CacheSize value.
      • isUseCache

        public boolean isUseCache()
        Get the UseCache value.
        Returns:
        the UseCache value.
      • setUseCache

        public void setUseCache​(boolean useCache)
        Set the UseCache value.
        Parameters:
        useCache - The new UseCache value.
      • getDefaultProperty

        public String getDefaultProperty()
        Get the DefaultProperty value.
        Returns:
        the DefaultProperty value.
      • setDefaultProperty

        public void setDefaultProperty​(String defaultProperty)
        Set the DefaultProperty value.
        Parameters:
        defaultProperty - The new DefaultProperty value.
      • getSeparator

        public char getSeparator()
        Get the Separator value.
        Returns:
        the Separator value.
      • setSeparator

        public void setSeparator​(char separator)
        Set the Separator value.
        Parameters:
        separator - The new Separator value.
      • init

        public void init()
        Initializes the Mapper. Must be called before the mapper might be used.
      • getDefaultName

        public String getDefaultName​(String template)
        Returns the default name for the passed Template. If the passed template has no extension, the default extension is assumed. If the template is empty, the default template is returned.
        Parameters:
        template - The template name.
        Returns:
        the mapped default name for the template.
      • getMappedName

        public String getMappedName​(String template)
        Return the first match name for the given template name.
        Parameters:
        template - The template name.
        Returns:
        The first matching class or template name.
      • doMapping

        public abstract String doMapping​(String template)
        The actual mapping implementation class. It is guaranteed that never an empty or null template name is passed to it. This might return null.
        Parameters:
        template - The template name.
        Returns:
        The mapped class or template name.