Package com.logicaldoc.util
Class TagUtil
java.lang.Object
com.logicaldoc.util.TagUtil
Utility class for tags handling
- Since:
- 4.5
- Author:
- Marco Meschieri - LogicalDOC
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionextractTags
(String tenantName, String words) Detects words in the passed string and creates a list of tags.static String
normalizeTags
(String tenantName, String words) Normalizes the passed string extracting all tags and producing anither string containing all tags separated by a comma.
-
Field Details
-
MAX_FIELD_LENGTH
public static final int MAX_FIELD_LENGTH- See Also:
-
-
Method Details
-
extractTags
Detects words in the passed string and creates a list of tags.
Atention: Recognized tags are words of min. MIN_CHARS chars and max MAX_CHARS characters.- Parameters:
tenantName
- name of the tenantwords
- a string of words (tags are separated by ,);- Returns:
- the collection of tags
-
normalizeTags
Normalizes the passed string extracting all tags and producing anither string containing all tags separated by a comma.Atention: The returned string is not more long than MAX_FIELD_LENGTH characters.
- Parameters:
tenantName
- Name of the tenantwords
- The string to be normalized- Returns:
- a string in the form "tag1,tag2,tag3"
-