public final class CategoryInfoMapImpl extends java.lang.Object implements CategoryInfoMap
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.Integer,Category> |
map |
Constructor and Description |
---|
CategoryInfoMapImpl() |
CategoryInfoMapImpl(java.util.Collection<? extends Category> categories) |
Modifier and Type | Method and Description |
---|---|
private void |
addAll(java.util.Collection<? extends Category> categories) |
Category |
get(int categoryId) |
Category |
get(java.lang.String categoryId) |
java.util.Collection<Category> |
getCategories() |
int |
getDepth(int categoryId) |
java.lang.String |
getDisplayName(java.lang.String categoryId,
java.util.Locale lang) |
Category |
getFromGUID(GUID categoryGUID) |
GUID |
getGuid(java.lang.String path)
Returns the GUID to a given category path.
|
int |
getId(java.lang.String path)
Returns the id to a given category path.
|
private java.lang.String |
getObjectPath(Category category) |
Category |
getParent(Category category) |
java.lang.String |
getPath(GUID guid) |
java.util.List<Category> |
getPath(int categoryId) |
java.lang.String |
getPathAsBreadCrumb(int categoryId) |
Category |
getRoot() |
void |
initDisplayNames() |
private final java.util.Map<java.lang.Integer,Category> map
public CategoryInfoMapImpl()
public CategoryInfoMapImpl(java.util.Collection<? extends Category> categories)
private void addAll(java.util.Collection<? extends Category> categories)
public java.util.List<Category> getPath(int categoryId)
getPath
in interface CategoryInfoMap
public Category getParent(Category category)
getParent
in interface CategoryInfoMap
public Category get(java.lang.String categoryId)
get
in interface CategoryInfoMap
public Category get(int categoryId)
get
in interface CategoryInfoMap
public java.lang.String getDisplayName(java.lang.String categoryId, java.util.Locale lang)
getDisplayName
in interface CategoryInfoMap
public java.util.Collection<Category> getCategories()
getCategories
in interface CategoryInfoMap
public Category getRoot()
getRoot
in interface CategoryInfoMap
public java.lang.String getPathAsBreadCrumb(int categoryId)
getPathAsBreadCrumb
in interface CategoryInfoMap
public int getId(java.lang.String path)
CategoryInfoMap
getId
in interface CategoryInfoMap
path
- a category path like "root/sub1/sub2/...".private java.lang.String getObjectPath(Category category)
public GUID getGuid(java.lang.String path)
CategoryInfoMap
getGuid
in interface CategoryInfoMap
path
- a category path like "root/sub1/sub2/...".public java.lang.String getPath(GUID guid)
getPath
in interface CategoryInfoMap
guid
- unique identifier of a categorypublic int getDepth(int categoryId)
getDepth
in interface CategoryInfoMap
public Category getFromGUID(GUID categoryGUID)
getFromGUID
in interface CategoryInfoMap
public void initDisplayNames()
initDisplayNames
in interface CategoryInfoMap