public class TagsDAO extends AbstractLogEnabled implements Serviceable, Component
Modifier and Type | Field and Description |
---|---|
protected I18nUtils |
_i18nUtils
The I18n utils
|
protected TagProviderExtensionPoint |
_tagProviderExtPt
The tag provider extension point
|
protected TagTargetTypeExtensionPoint |
_targetTypeEP
Target types
|
static String |
ROLE
The Avalon role
|
Constructor and Description |
---|
TagsDAO() |
Modifier and Type | Method and Description |
---|---|
private void |
_getMatchingTag(String value,
TagProvider tagProvider,
Tag tag,
List<String> matchingPaths)
Get paths of tag which match filter regexp
|
List<String> |
checkTags(List<String> tagNames,
String targetType,
boolean onlyCustomTags,
Map<String,Object> contextualParameters)
Test if tags exists
|
List<String> |
filterTagsByRegExp(String value,
Map<String,Object> contextualParameters)
Get the path of node which match filter regexp
|
List<String> |
filterTagsFromListByRegExp(String filter,
List<String> tagNames,
Map<String,Object> contextualParameters)
Get the path of node which match filter regexp
|
protected String |
getFullPath(String tagName,
Map<String,Object> contextualParameters)
Get the full path of a tag, with its provider
|
protected String |
getPath(Tag tag)
Get the path of a tag inside its provider.
|
Tag |
getTag(String tagName,
Map<String,Object> contextualParameters)
Get a tag by its name
|
List<String> |
getTagPaths(List<String> tagNames,
Map<String,Object> contextualParameters)
Get the paths of given tags
|
Map<String,Object> |
getTagsTitle(List<String> tagNames,
Map<String,Object> contextualParameters)
Get the title of given tags
|
List<Map<String,Object>> |
getTargetTypes()
Get the existing target types
|
void |
service(ServiceManager manager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected TagProviderExtensionPoint _tagProviderExtPt
protected I18nUtils _i18nUtils
protected TagTargetTypeExtensionPoint _targetTypeEP
public TagsDAO()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public List<Map<String,Object>> getTargetTypes()
public List<String> getTagPaths(List<String> tagNames, Map<String,Object> contextualParameters)
tagNames
- The name of tagscontextualParameters
- Contextual parametersprotected String getFullPath(String tagName, Map<String,Object> contextualParameters)
tagName
- The tag namecontextualParameters
- Contextual parameterspublic Tag getTag(String tagName, Map<String,Object> contextualParameters)
tagName
- The tag namecontextualParameters
- Contextual parametersprotected String getPath(Tag tag)
tag
- The tagpublic Map<String,Object> getTagsTitle(List<String> tagNames, Map<String,Object> contextualParameters)
tagNames
- The name of tagscontextualParameters
- Contextual parameterspublic List<String> filterTagsByRegExp(String value, Map<String,Object> contextualParameters)
value
- the value to matchcontextualParameters
- Contextual parameterspublic List<String> filterTagsFromListByRegExp(String filter, List<String> tagNames, Map<String,Object> contextualParameters)
filter
- the value to matchtagNames
- the list of tag's name to search insidecontextualParameters
- Contextual parametersprivate void _getMatchingTag(String value, TagProvider tagProvider, Tag tag, List<String> matchingPaths)
value
- the value to matchtagProvider
- the tag providertag
- the current tagmatchingPaths
- the matching pathspublic List<String> checkTags(List<String> tagNames, String targetType, boolean onlyCustomTags, Map<String,Object> contextualParameters)
tagNames
- The tag names to testtargetType
- If not null returns only tags matching this target typeonlyCustomTags
- If true, return only custom tagscontextualParameters
- Contextual parameters