public abstract class AbstractTagsDAO extends AbstractLogEnabled implements Serviceable, Component
Modifier and Type | Field and Description |
---|---|
protected I18nUtils |
_i18nUtils
The I18n utils
|
protected AbstractTagProviderExtensionPoint<? extends Tag> |
_tagProviderExtPt
The tag provider extension point
|
Constructor and Description |
---|
AbstractTagsDAO() |
Modifier and Type | Method and Description |
---|---|
protected String |
_getFilteredTagName(TagProvider<? extends Tag> tagProvider,
String tagName,
Map<String,Object> otherParameters,
Map<String,Object> contextualParameters)
Get filtered tag name
|
private void |
_getMatchingTag(String value,
TagProvider<? extends Tag> tagProvider,
Tag tag,
List<String> matchingPaths)
Get paths of tag which match filter regexp
|
List<String> |
checkTags(List<String> tagNames,
boolean onlyCustomTags,
Map<String,Object> otherParameters,
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 abstract List<TagProvider<? extends Tag>> |
getCustomTagProvider()
Get the list of custom tag provider
|
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
|
abstract String |
getTagProviderEPRole()
Get the tag provider extension point role
|
Map<String,Object> |
getTagsTitle(List<String> tagNames,
Map<String,Object> contextualParameters)
Get the title of given tags
|
void |
service(ServiceManager manager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected AbstractTagProviderExtensionPoint<? extends Tag> _tagProviderExtPt
protected I18nUtils _i18nUtils
public AbstractTagsDAO()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public abstract String getTagProviderEPRole()
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<? extends Tag> 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, boolean onlyCustomTags, Map<String,Object> otherParameters, Map<String,Object> contextualParameters)
tagNames
- The tag names to testonlyCustomTags
- If true, return only custom tagsotherParameters
- the other parameterscontextualParameters
- Contextual parametersprotected String _getFilteredTagName(TagProvider<? extends Tag> tagProvider, String tagName, Map<String,Object> otherParameters, Map<String,Object> contextualParameters)
tagProvider
- the tag providertagName
- the tag nameotherParameters
- the other parameterscontextualParameters
- the contextual parametersprotected abstract List<TagProvider<? extends Tag>> getCustomTagProvider()