public interface JcrTagManagerFactory
JcrTagManagerFactory
returns a JCR-based implementation of a
TagManager
. This is the reference implementation of the tagging API.
getTagManager(Session)
on it with a JCR Session
to retrieve a
TagManager
instance:
Modifier and Type | Method and Description |
---|---|
TagManager |
getTagManager(Session session)
Returns a JCR-based
TagManager implementation. |
TagManager getTagManager(Session session)
TagManager
implementation.
This one is bound to a JCR session, either from a request (eg.
resourceResolver.adaptTo(TagManager.class)
, in which case
you won't have to call this method directly) or by using a self-made
session, for example:
Session adminSession = slingRepository.loginAdministrative(null)
TagManager tagManager = JcrTagManagerFactory.getTagManager(adminSession);
Please note that the visibility of tags and the right to create a tag
depend on the user of the session (access rights are simply mapped to
node read and creation rights of the repository), so an administrative
session like above could do more than a "normal" user. In most cases it
is advised to use the current request's session (= the request's user),
eg. by using:
TagManager tagManager = resourceResolver.adaptTo(ResourceResolver.class);
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"