|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.sling.adapter.SlingAdaptable
com.day.cq.tagging.impl.JcrTagImpl
public class JcrTagImpl
JcrTagImpl is the JCR based implementation of the Tag
interface.
| Field Summary | |
|---|---|
static String |
TAG_NODE_TYPE
|
| Constructor Summary | |
|---|---|
JcrTagImpl(org.apache.sling.api.resource.Resource resource,
JcrTagManagerImpl tagManager)
|
|
| Method Summary | ||
|---|---|---|
|
adaptTo(Class<AdapterType> type)
|
|
Iterator<org.apache.sling.api.resource.Resource> |
find()
Returns all nodes tagged with this tag. |
|
long |
getCount()
Returns the usage count of the tag, which can be used for tag cloud and other visualisations. |
|
String |
getDescription()
Returns an optional description for a tag. |
|
String |
getLocalTagID()
Returns the tag path below a namespace. |
|
String |
getName()
Returns the node name, ie. |
|
Tag |
getNamespace()
Returns the tag namespace inside which this tag resides as tag object. |
|
Tag |
getParent()
Gets the parent of this tag. |
|
String |
getPath()
Returns the full absolute path of a tag or a tag namespace. |
|
org.apache.sling.api.resource.ValueMap |
getProperties()
|
|
String |
getTagID()
Returns the short tag ID. |
|
String |
getTitle()
Returns a title that should be displayed instead of the tag name or tag id. |
|
String |
getTitlePath()
Returns the title variant of the tag ID: a path made up of the single titles of the namespace and all tags leading to this tag. |
|
boolean |
isNamespace()
Returns true if this tag object refers to a tag namespace. |
|
static boolean |
isTagNode(Node node)
|
|
Iterator<Tag> |
listAllSubTags()
Lists all sub-tags, ie. |
|
Iterator<Tag> |
listChildren()
Lists the direct child tags for both tag namespaces and tag containers. |
|
Iterator<Tag> |
listChildren(Filter<Tag> filter)
Lists the child tags for both tag namespaces and tag containers, but only those included by a filter. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String TAG_NODE_TYPE
| Constructor Detail |
|---|
public JcrTagImpl(org.apache.sling.api.resource.Resource resource,
JcrTagManagerImpl tagManager)
| Method Detail |
|---|
public static boolean isTagNode(Node node)
throws RepositoryException
RepositoryExceptionpublic <AdapterType> AdapterType adaptTo(Class<AdapterType> type)
adaptTo in interface org.apache.sling.api.adapter.AdaptableadaptTo in class org.apache.sling.adapter.SlingAdaptablepublic org.apache.sling.api.resource.ValueMap getProperties()
public String getName()
Tag
getName in interface Tagpublic String getTagID()
Tagdefault, it
will be left out. If this tag represents a namespace, null
is returned.
getTagID in interface Tagpublic String getLocalTagID()
Tagnull is returned.
getLocalTagID in interface Tagpublic String getTitlePath()
Tag
getTitlePath in interface Tagpublic String getPath()
Tag
getPath in interface Tagpublic String getDescription()
Tagnull is returned.
getDescription in interface Tagpublic String getTitle()
Tag
getTitle in interface Tagpublic long getCount()
Tag
getCount in interface Tagpublic boolean isNamespace()
Tagtrue if this tag object refers to a tag namespace.
isNamespace in interface Tagpublic Tag getNamespace()
Tag
getNamespace in interface Tagpublic Tag getParent()
Tagnull if this object is a tag namespace.
getParent in interface Tagpublic Iterator<Tag> listChildren()
Tag
listChildren in interface Tagpublic Iterator<Tag> listChildren(Filter<Tag> filter)
Tag
listChildren in interface Tagpublic Iterator<Tag> listAllSubTags()
Tag
listAllSubTags in interface Tagpublic Iterator<org.apache.sling.api.resource.Resource> find()
Tagcq:tags property that contains either the tagID or the
full absolute path to that tag. Returns null in case of
errors.
find in interface TagTagManager.find(String),
TagManager.find(String, String[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||