com.day.cq.tagging

Interface JcrTagManagerFactory

    • Method Detail

      • getTagManager

        TagManager getTagManager(Session session)
        Returns a JCR-based 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"