Class AbstractTagsDAO

    • Method Detail

      • getTagProviderEPRole

        public abstract String getTagProviderEPRole()
        Get the tag provider extension point role
        Returns:
        the tag provider extension point role
      • getTagPaths

        public List<StringgetTagPaths​(List<String> tagNames,
                                        Map<String,​Object> contextualParameters)
        Get the paths of given tags
        Parameters:
        tagNames - The name of tags
        contextualParameters - Contextual parameters
        Returns:
        {String} path
      • getFullPath

        protected String getFullPath​(String tagName,
                                     Map<String,​Object> contextualParameters)
        Get the full path of a tag, with its provider
        Parameters:
        tagName - The tag name
        contextualParameters - Contextual parameters
        Returns:
        the full path of tag or null if not found
      • getTag

        public Tag getTag​(String tagName,
                          Map<String,​Object> contextualParameters)
        Get a tag by its name
        Parameters:
        tagName - The tag name
        contextualParameters - Contextual parameters
        Returns:
        The tag or null if not found
      • getPath

        protected String getPath​(Tag tag)
        Get the path of a tag inside its provider. The path is composed of tags name and '/' as a separator
        Parameters:
        tag - The tag
        Returns:
        The path
      • getTagsTitle

        public Map<String,​ObjectgetTagsTitle​(List<String> tagNames,
                                                     Map<String,​Object> contextualParameters)
        Get the title of given tags
        Parameters:
        tagNames - The name of tags
        contextualParameters - Contextual parameters
        Returns:
        the labels
      • filterTagsByRegExp

        public List<StringfilterTagsByRegExp​(String value,
                                               Map<String,​Object> contextualParameters)
        Get the path of node which match filter regexp
        Parameters:
        value - the value to match
        contextualParameters - Contextual parameters
        Returns:
        the matching paths
      • filterTagsFromListByRegExp

        public List<StringfilterTagsFromListByRegExp​(String filter,
                                                       List<String> tagNames,
                                                       Map<String,​Object> contextualParameters)
        Get the path of node which match filter regexp
        Parameters:
        filter - the value to match
        tagNames - the list of tag's name to search inside
        contextualParameters - Contextual parameters
        Returns:
        the matching paths
      • _getMatchingTag

        private void _getMatchingTag​(String value,
                                     TagProvider<? extends Tag> tagProvider,
                                     Tag tag,
                                     List<String> matchingPaths)
        Get paths of tag which match filter regexp
        Parameters:
        value - the value to match
        tagProvider - the tag provider
        tag - the current tag
        matchingPaths - the matching paths
      • checkTags

        public List<StringcheckTags​(List<String> tagNames,
                                      boolean onlyCustomTags,
                                      Map<String,​Object> otherParameters,
                                      Map<String,​Object> contextualParameters)
        Test if tags exists
        Parameters:
        tagNames - The tag names to test
        onlyCustomTags - If true, return only custom tags
        otherParameters - the other parameters
        contextualParameters - Contextual parameters
        Returns:
        The list of tag names without the invalid values.
      • _getFilteredTagName

        protected String _getFilteredTagName​(TagProvider<? extends Tag> tagProvider,
                                             String tagName,
                                             Map<String,​Object> otherParameters,
                                             Map<String,​Object> contextualParameters)
        Get filtered tag name
        Parameters:
        tagProvider - the tag provider
        tagName - the tag name
        otherParameters - the other parameters
        contextualParameters - the contextual parameters
        Returns:
        the tag name if it match