Class CQPreferences


  • public class CQPreferences
    extends Object
    http://qabase.day.com/cf#/content/qabase/testcases/cq/setting_user_andgrouppreferencesdocumentation.html
    • Constructor Detail

      • CQPreferences

        public CQPreferences​(Authorizable authorizable)
                      throws org.apache.sling.testing.clients.ClientException
        Throws:
        org.apache.sling.testing.clients.ClientException
    • Method Detail

      • getPath

        public String getPath()
                       throws org.apache.sling.testing.clients.ClientException
        Get path to Authorizables' references
        Returns:
        path
        Throws:
        org.apache.sling.testing.clients.ClientException - if the request fails
      • getJson

        public com.fasterxml.jackson.databind.JsonNode getJson​(int... expectedStatus)
                                                        throws org.apache.sling.testing.clients.ClientException
        Get json representation of the preferences
        Parameters:
        expectedStatus - list of expected http status codes
        Returns:
        preferences as JsonNode
        Throws:
        org.apache.sling.testing.clients.ClientException - if the request fails
      • getLanguage

        public String getLanguage()
                           throws org.apache.sling.testing.clients.ClientException
        Get language settings of Authorizable
        Returns:
        language
        Throws:
        org.apache.sling.testing.clients.ClientException - if the request fails
      • setLanguage

        public org.apache.sling.testing.clients.SlingHttpResponse setLanguage​(String language)
                                                                       throws org.apache.sling.testing.clients.ClientException
        Set language - if language is not given, default is set to "en"
        Parameters:
        language - language to set
        Returns:
        Sling response
        Throws:
        org.apache.sling.testing.clients.ClientException - if the request fails