public class TagsDirector extends Object
Modifier and Type | Field and Description |
---|---|
protected static Guid |
ROOT_TAG_ID |
Modifier | Constructor and Description |
---|---|
protected |
TagsDirector() |
Modifier and Type | Method and Description |
---|---|
void |
AddTag(tags tag) |
ArrayList<tags> |
GetAllTags()
Gets a list of all the tags in the system.
|
static TagsDirector |
getInstance() |
tags |
GetRootTag()
Returns the root tag in the system.
|
tags |
GetTagById(Guid tagId)
Get tag from in memory data structure (by ID).
|
tags |
GetTagByName(String tagName)
Get tag from in memory data structure (by name).
|
protected TagDAO |
getTagDAO() |
String |
GetTagIdAndChildrenIds(Guid tagId)
This function will return the tag's ID and its children IDs.
|
String |
GetTagIdAndChildrenIds(String tagName)
This function will return the tag's ID and its children IDs.
|
HashSet<Guid> |
GetTagIdAndChildrenIdsAsSet(Guid tagId) |
String |
GetTagIdAndParentsIds(Guid tagId)
This function will return the tag's ID and its parents IDs.
|
String |
GetTagIdAndParentsIds(String tagName)
This function will return the tag's ID and its parents IDs.
|
String |
GetTagIdsAndChildrenIdsByRegExp(String tagNameRegExp)
This function will return the tags IDs of all tags that their names match the specified regular expression and
ALL their children (regardless if the children match the reg-exp or not).
|
String |
GetTagNameAndChildrenNames(Guid tagId) |
String |
GetTagNamesAndChildrenNamesByRegExp(String tagNameRegExp) |
protected void |
init()
In memory tree initialized during initialization
|
boolean |
IsTagDescestorOfTag(Guid sourceTagId,
Guid potentialDescestorId) |
void |
MoveTag(Guid tagId,
Guid newParent) |
void |
RemoveTag(Guid tagId)
Remove tag operation.
|
void |
UpdateTag(tags tag)
Update tag.
|
protected void |
updateTagInBackend(tags tag) |
protected static final Guid ROOT_TAG_ID
protected void init()
protected TagDAO getTagDAO()
public static TagsDirector getInstance()
public void AddTag(tags tag)
public void RemoveTag(Guid tagId)
tagId
- tag to removepublic void UpdateTag(tags tag)
tag
- protected void updateTagInBackend(tags tag)
public String GetTagIdAndParentsIds(Guid tagId)
tagId
- the tag ID.public String GetTagIdAndParentsIds(String tagName)
tagId
- the tag ID.public String GetTagIdAndChildrenIds(Guid tagId)
tagId
- the ID of the 'root' tag.public String GetTagIdAndChildrenIds(String tagName)
tagName
- the name of the 'root' tag.public String GetTagIdsAndChildrenIdsByRegExp(String tagNameRegExp)
tagName
- the name of the 'root' tag.public String GetTagNamesAndChildrenNamesByRegExp(String tagNameRegExp)
public tags GetTagById(Guid tagId)
tagId
- public tags GetTagByName(String tagName)
tagName
- public ArrayList<tags> GetAllTags()
public tags GetRootTag()
Copyright © 2012. All Rights Reserved.