com.day.cq.tagging

Interface JcrTagManagerFactory

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      TagManager getTagManager(Session session)
      Deprecated. 
      This is deprecated in favor of #getTagManager(ResourceResolver) Using this method, might cause session leak in the system. 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 serviceSession = repository.loginService(...);
       TagManager tagManager = JcrTagManagerFactory.getTagManager(serviceSession);
       
      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(TagManager.class);
       
    • Method Detail

      • getTagManager

        @Deprecated
        TagManager getTagManager(Session session)
        Deprecated. This is deprecated in favor of #getTagManager(ResourceResolver) Using this method, might cause session leak in the system. 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 serviceSession = repository.loginService(...);
         TagManager tagManager = JcrTagManagerFactory.getTagManager(serviceSession);
         
        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(TagManager.class);
         

"Copyright © 2010 - 2016 Adobe Systems Incorporated. All Rights Reserved"