Class MockLanguageManager

  • All Implemented Interfaces:
    com.day.cq.wcm.api.LanguageManager

    @ProviderType
    public final class MockLanguageManager
    extends java.lang.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
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      com.day.cq.wcm.api.LanguageManager.Tree compareLanguageTrees​(org.apache.sling.api.resource.ResourceResolver resourceResolver, java.lang.String path)  
      java.util.Map<java.util.Locale,​com.day.cq.wcm.api.LanguageManager.Info> getAdjacentInfo​(org.apache.sling.api.resource.ResourceResolver resourceResolver, java.lang.String path)
      Deprecated.
      java.util.Map<com.day.cq.commons.Language,​com.day.cq.wcm.api.LanguageManager.Info> getAdjacentLanguageInfo​(org.apache.sling.api.resource.ResourceResolver resourceResolver, java.lang.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)  
      java.util.Collection<com.day.cq.commons.Language> getCqLanguages​(org.apache.sling.api.resource.ResourceResolver resourceResolver, java.lang.String path)  
      java.lang.String getIsoCountry​(java.util.Locale locale)  
      java.util.Locale getLanguage​(org.apache.sling.api.resource.Resource resource)  
      java.util.Locale 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)  
      @Nullable org.apache.sling.api.resource.Resource getLanguageRootResource​(org.apache.sling.api.resource.Resource res, boolean respectContent)  
      java.util.Collection<org.apache.sling.api.resource.Resource> getLanguageRootResources​(org.apache.sling.api.resource.ResourceResolver resolver, java.lang.String path)  
      java.util.Collection<org.apache.sling.api.resource.Resource> getLanguageRootResources​(org.apache.sling.api.resource.ResourceResolver resolver, java.lang.String path, boolean respectContent)  
      java.util.Collection<com.day.cq.wcm.api.Page> getLanguageRoots​(org.apache.sling.api.resource.ResourceResolver resourceResolver, java.lang.String path)  
      java.util.Collection<java.util.Locale> getLanguages​(org.apache.sling.api.resource.ResourceResolver resourceResolver, java.lang.String path)  
      • Methods inherited from class java.lang.Object

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

      • MockLanguageManager

        public MockLanguageManager()
    • Method Detail

      • getAdjacentInfo

        @Deprecated
        public java.util.Map<java.util.Locale,​com.day.cq.wcm.api.LanguageManager.Info> getAdjacentInfo​(org.apache.sling.api.resource.ResourceResolver resourceResolver,
                                                                                                             java.lang.String path)
        Deprecated.
        Specified by:
        getAdjacentInfo in interface com.day.cq.wcm.api.LanguageManager
      • getAdjacentLanguageInfo

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

        public java.util.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 java.util.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
      • 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
      • getLanguages

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

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

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

        public java.lang.String getIsoCountry​(java.util.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,
                                                                            java.lang.String path)
        Specified by:
        compareLanguageTrees 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

        @Nullable
        public @Nullable 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 java.util.Collection<org.apache.sling.api.resource.Resource> getLanguageRootResources​(org.apache.sling.api.resource.ResourceResolver resolver,
                                                                                                     java.lang.String path)
        Specified by:
        getLanguageRootResources in interface com.day.cq.wcm.api.LanguageManager
      • getLanguageRootResources

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