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 SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionextractTags(String tenantName, String words) Detects words in the passed string and creates a list of tags.static StringnormalizeTags(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_LENGTHpublic static final int MAX_FIELD_LENGTH- See Also:
 
 
- 
- 
Method Details- 
extractTagsDetects 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 tenant
- words- a string of words (tags are separated by ,);
- Returns:
- the collection of tags
 
- 
normalizeTagsNormalizes 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 tenant
- words- The string to be normalized
- Returns:
- a string in the form "tag1,tag2,tag3"
 
 
-