Class MockTagManager

java.lang.Object
io.wcm.testing.mock.aem.MockTagManager
All Implemented Interfaces:
com.day.cq.tagging.TagManager

@ProviderType public final class MockTagManager extends Object implements com.day.cq.tagging.TagManager
Mock implementation of TagManager.
  • Method Details

    • getTagRootPath

      public static String getTagRootPath()
      Returns:
      Tag root path.
    • canCreateTag

      public boolean canCreateTag(String tagID) throws com.day.cq.tagging.InvalidTagFormatException
      Specified by:
      canCreateTag in interface com.day.cq.tagging.TagManager
      Throws:
      com.day.cq.tagging.InvalidTagFormatException
    • createTag

      public com.day.cq.tagging.Tag createTag(String tagID, String title, String description) throws com.day.cq.tagging.InvalidTagFormatException
      Specified by:
      createTag in interface com.day.cq.tagging.TagManager
      Throws:
      com.day.cq.tagging.InvalidTagFormatException
    • createTag

      public com.day.cq.tagging.Tag createTag(String tagID, String title, String description, boolean autoSave) throws com.day.cq.tagging.InvalidTagFormatException
      Specified by:
      createTag in interface com.day.cq.tagging.TagManager
      Throws:
      com.day.cq.tagging.InvalidTagFormatException
    • createTagByTitle

      public com.day.cq.tagging.Tag createTagByTitle(String titlePath) throws com.day.cq.tagging.InvalidTagFormatException
      Specified by:
      createTagByTitle in interface com.day.cq.tagging.TagManager
      Throws:
      com.day.cq.tagging.InvalidTagFormatException
    • deleteTag

      public void deleteTag(com.day.cq.tagging.Tag tag)
      Specified by:
      deleteTag in interface com.day.cq.tagging.TagManager
    • deleteTag

      public void deleteTag(com.day.cq.tagging.Tag tag, boolean autoSave)
      Specified by:
      deleteTag in interface com.day.cq.tagging.TagManager
    • find

      public com.day.cq.commons.RangeIterator<org.apache.sling.api.resource.Resource> find(String tagID)
      Specified by:
      find in interface com.day.cq.tagging.TagManager
    • find

      public com.day.cq.commons.RangeIterator<org.apache.sling.api.resource.Resource> find(String basePath, String[] tagIDs)
      Specified by:
      find in interface com.day.cq.tagging.TagManager
    • find

      public com.day.cq.commons.RangeIterator<org.apache.sling.api.resource.Resource> find(String basePath, String[] tagIDs, boolean oneMatchIsEnough)
      Specified by:
      find in interface com.day.cq.tagging.TagManager
    • getNamespaces

      public com.day.cq.tagging.Tag[] getNamespaces()
      Specified by:
      getNamespaces in interface com.day.cq.tagging.TagManager
    • getNamespacesIter

      public Iterator<com.day.cq.tagging.Tag> getNamespacesIter()
      Specified by:
      getNamespacesIter in interface com.day.cq.tagging.TagManager
    • getSession

      public javax.jcr.Session getSession()
      Specified by:
      getSession in interface com.day.cq.tagging.TagManager
    • getTags

      public com.day.cq.tagging.Tag[] getTags(org.apache.sling.api.resource.Resource resource)
      Specified by:
      getTags in interface com.day.cq.tagging.TagManager
    • getTagsForSubtree

      public com.day.cq.tagging.Tag[] getTagsForSubtree(org.apache.sling.api.resource.Resource resource, boolean shallow)
      Specified by:
      getTagsForSubtree in interface com.day.cq.tagging.TagManager
    • resolve

      public com.day.cq.tagging.Tag resolve(String tagID)
      Specified by:
      resolve in interface com.day.cq.tagging.TagManager
    • setTags

      public void setTags(org.apache.sling.api.resource.Resource resource, com.day.cq.tagging.Tag[] tags)
      Specified by:
      setTags in interface com.day.cq.tagging.TagManager
    • setTags

      public void setTags(org.apache.sling.api.resource.Resource resource, com.day.cq.tagging.Tag[] tags, boolean autoSave)
      Specified by:
      setTags in interface com.day.cq.tagging.TagManager
    • getResourceResolver

      public org.apache.sling.api.resource.ResourceResolver getResourceResolver()
      Specified by:
      getResourceResolver in interface com.day.cq.tagging.TagManager
    • canCreateTagByTitle

      public boolean canCreateTagByTitle(String tagTitlePath) throws com.day.cq.tagging.InvalidTagFormatException
      Specified by:
      canCreateTagByTitle in interface com.day.cq.tagging.TagManager
      Throws:
      com.day.cq.tagging.InvalidTagFormatException
    • canCreateTagByTitle

      public boolean canCreateTagByTitle(String tagTitlePath, Locale locale) throws com.day.cq.tagging.InvalidTagFormatException
      Specified by:
      canCreateTagByTitle in interface com.day.cq.tagging.TagManager
      Throws:
      com.day.cq.tagging.InvalidTagFormatException
    • createTagByTitle

      public com.day.cq.tagging.Tag createTagByTitle(String titlePath, boolean autoSave) throws com.day.cq.tagging.InvalidTagFormatException
      Specified by:
      createTagByTitle in interface com.day.cq.tagging.TagManager
      Throws:
      com.day.cq.tagging.InvalidTagFormatException
    • createTagByTitle

      public com.day.cq.tagging.Tag createTagByTitle(String titlePath, Locale locale) throws com.day.cq.tagging.InvalidTagFormatException
      Specified by:
      createTagByTitle in interface com.day.cq.tagging.TagManager
      Throws:
      com.day.cq.tagging.InvalidTagFormatException
    • find

      public com.day.cq.commons.RangeIterator<org.apache.sling.api.resource.Resource> find(String basePath, List<String[]> tagSetIDs)
      Specified by:
      find in interface com.day.cq.tagging.TagManager
    • findByTitle

      public com.day.cq.tagging.TagManager.FindResults findByTitle(String title)
      Specified by:
      findByTitle in interface com.day.cq.tagging.TagManager
    • mergeTag

      public void mergeTag(com.day.cq.tagging.Tag tag, com.day.cq.tagging.Tag destination) throws com.day.cq.tagging.TagException
      Specified by:
      mergeTag in interface com.day.cq.tagging.TagManager
      Throws:
      com.day.cq.tagging.TagException
    • moveTag

      public com.day.cq.tagging.Tag moveTag(com.day.cq.tagging.Tag tag, String destination) throws com.day.cq.tagging.InvalidTagFormatException, com.day.cq.tagging.TagException
      Specified by:
      moveTag in interface com.day.cq.tagging.TagManager
      Throws:
      com.day.cq.tagging.InvalidTagFormatException
      com.day.cq.tagging.TagException
    • resolveByTitle

      public com.day.cq.tagging.Tag resolveByTitle(String tagTitlePath)
      Specified by:
      resolveByTitle in interface com.day.cq.tagging.TagManager
    • resolveByTitle

      public com.day.cq.tagging.Tag resolveByTitle(String tagTitlePath, Locale locale)
      Specified by:
      resolveByTitle in interface com.day.cq.tagging.TagManager
    • findTagsByTitle

      public com.day.cq.tagging.Tag[] findTagsByTitle(String keyword, Locale locale)
      Specified by:
      findTagsByTitle in interface com.day.cq.tagging.TagManager
    • findTagsByKeyword

      public Iterable<com.day.cq.tagging.Tag> findTagsByKeyword(String arg0, Locale arg1, String arg2)
      Specified by:
      findTagsByKeyword in interface com.day.cq.tagging.TagManager
    • getSupportedLanguageCodes

      public List<String> getSupportedLanguageCodes()
      Specified by:
      getSupportedLanguageCodes in interface com.day.cq.tagging.TagManager