Class MockLanguageManager

java.lang.Object
io.wcm.testing.mock.aem.MockLanguageManager
All Implemented Interfaces:
com.day.cq.wcm.api.LanguageManager

@ProviderType public final class MockLanguageManager extends Object implements com.day.cq.wcm.api.LanguageManager
Mock implementation of LanguageManager.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.day.cq.wcm.api.LanguageManager

    com.day.cq.wcm.api.LanguageManager.Info, com.day.cq.wcm.api.LanguageManager.Tree, com.day.cq.wcm.api.LanguageManager.TreeNode
  • Field Summary

    Fields inherited from interface com.day.cq.wcm.api.LanguageManager

    IS_LANGUAGE_ROOT_PROP_NAME, ISO_PROP_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.day.cq.wcm.api.LanguageManager.Tree
    compareLanguageTrees(org.apache.sling.api.resource.ResourceResolver resourceResolver, String path)
     
    Map<Locale,com.day.cq.wcm.api.LanguageManager.Info>
    getAdjacentInfo(org.apache.sling.api.resource.ResourceResolver resourceResolver, String path)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deprecated
    Map<com.day.cq.commons.Language,com.day.cq.wcm.api.LanguageManager.Info>
    getAdjacentLanguageInfo(org.apache.sling.api.resource.ResourceResolver resourceResolver, String path)
     
    com.day.cq.commons.Language
    getCqLanguage(org.apache.sling.api.resource.Resource resource)
     
    com.day.cq.commons.Language
    getCqLanguage(org.apache.sling.api.resource.Resource resource, boolean respectContent)
     
    Collection<com.day.cq.commons.Language>
    getCqLanguages(org.apache.sling.api.resource.ResourceResolver resourceResolver, String path)
     
     
    getLanguage(org.apache.sling.api.resource.Resource resource)
     
    getLanguage(org.apache.sling.api.resource.Resource resource, boolean respectContent)
     
    com.day.cq.wcm.api.Page
    getLanguageRoot(org.apache.sling.api.resource.Resource resource)
     
    @Nullable com.day.cq.wcm.api.Page
    getLanguageRoot(org.apache.sling.api.resource.Resource res, boolean respectContent)
     
    org.apache.sling.api.resource.Resource
    getLanguageRootResource(org.apache.sling.api.resource.Resource res)
     
    org.apache.sling.api.resource.Resource
    getLanguageRootResource(org.apache.sling.api.resource.Resource res, boolean respectContent)
     
    Collection<org.apache.sling.api.resource.Resource>
    getLanguageRootResources(org.apache.sling.api.resource.ResourceResolver resolver, String path)
     
    Collection<org.apache.sling.api.resource.Resource>
    getLanguageRootResources(org.apache.sling.api.resource.ResourceResolver resolver, String path, boolean respectContent)
     
    Collection<com.day.cq.wcm.api.Page>
    getLanguageRoots(org.apache.sling.api.resource.ResourceResolver resourceResolver, String path)
     
    getLanguages(org.apache.sling.api.resource.ResourceResolver resourceResolver, String path)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MockLanguageManager

      public MockLanguageManager()
  • Method Details

    • getAdjacentInfo

      @Deprecated(forRemoval=true) public Map<Locale,com.day.cq.wcm.api.LanguageManager.Info> getAdjacentInfo(org.apache.sling.api.resource.ResourceResolver resourceResolver, String path)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deprecated
      Specified by:
      getAdjacentInfo in interface com.day.cq.wcm.api.LanguageManager
    • getAdjacentLanguageInfo

      public Map<com.day.cq.commons.Language,com.day.cq.wcm.api.LanguageManager.Info> getAdjacentLanguageInfo(org.apache.sling.api.resource.ResourceResolver resourceResolver, String path)
      Specified by:
      getAdjacentLanguageInfo in interface com.day.cq.wcm.api.LanguageManager
    • getLanguage

      public Locale getLanguage(org.apache.sling.api.resource.Resource resource)
      Specified by:
      getLanguage in interface com.day.cq.wcm.api.LanguageManager
    • getCqLanguage

      public com.day.cq.commons.Language getCqLanguage(org.apache.sling.api.resource.Resource resource)
      Specified by:
      getCqLanguage in interface com.day.cq.wcm.api.LanguageManager
    • getLanguage

      public Locale getLanguage(org.apache.sling.api.resource.Resource resource, boolean respectContent)
      Specified by:
      getLanguage in interface com.day.cq.wcm.api.LanguageManager
    • getCqLanguage

      public com.day.cq.commons.Language getCqLanguage(org.apache.sling.api.resource.Resource resource, boolean respectContent)
      Specified by:
      getCqLanguage in interface com.day.cq.wcm.api.LanguageManager
    • getLanguages

      public Collection<Locale> getLanguages(org.apache.sling.api.resource.ResourceResolver resourceResolver, String path)
      Specified by:
      getLanguages in interface com.day.cq.wcm.api.LanguageManager
    • getCqLanguages

      public Collection<com.day.cq.commons.Language> getCqLanguages(org.apache.sling.api.resource.ResourceResolver resourceResolver, String path)
      Specified by:
      getCqLanguages in interface com.day.cq.wcm.api.LanguageManager
    • getLanguageRoots

      public Collection<com.day.cq.wcm.api.Page> getLanguageRoots(org.apache.sling.api.resource.ResourceResolver resourceResolver, String path)
      Specified by:
      getLanguageRoots in interface com.day.cq.wcm.api.LanguageManager
    • getLanguageRoot

      public com.day.cq.wcm.api.Page getLanguageRoot(org.apache.sling.api.resource.Resource resource)
      Specified by:
      getLanguageRoot in interface com.day.cq.wcm.api.LanguageManager
    • getLanguageRoot

      @Nullable public @Nullable com.day.cq.wcm.api.Page getLanguageRoot(org.apache.sling.api.resource.Resource res, boolean respectContent)
      Specified by:
      getLanguageRoot in interface com.day.cq.wcm.api.LanguageManager
    • getLanguageRootResource

      public org.apache.sling.api.resource.Resource getLanguageRootResource(org.apache.sling.api.resource.Resource res)
      Specified by:
      getLanguageRootResource in interface com.day.cq.wcm.api.LanguageManager
    • getLanguageRootResource

      public org.apache.sling.api.resource.Resource getLanguageRootResource(org.apache.sling.api.resource.Resource res, boolean respectContent)
      Specified by:
      getLanguageRootResource in interface com.day.cq.wcm.api.LanguageManager
    • getLanguageRootResources

      public Collection<org.apache.sling.api.resource.Resource> getLanguageRootResources(org.apache.sling.api.resource.ResourceResolver resolver, String path)
      Specified by:
      getLanguageRootResources in interface com.day.cq.wcm.api.LanguageManager
    • getLanguageRootResources

      public Collection<org.apache.sling.api.resource.Resource> getLanguageRootResources(org.apache.sling.api.resource.ResourceResolver resolver, String path, boolean respectContent)
      Specified by:
      getLanguageRootResources in interface com.day.cq.wcm.api.LanguageManager
    • getIsoCountry

      public String getIsoCountry(Locale locale)
      Specified by:
      getIsoCountry in interface com.day.cq.wcm.api.LanguageManager
    • compareLanguageTrees

      public com.day.cq.wcm.api.LanguageManager.Tree compareLanguageTrees(org.apache.sling.api.resource.ResourceResolver resourceResolver, String path)
      Specified by:
      compareLanguageTrees in interface com.day.cq.wcm.api.LanguageManager