Class CQPreferences
- java.lang.Object
-
- com.adobe.cq.testing.client.security.CQPreferences
-
public class CQPreferences extends Object
http://qabase.day.com/cf#/content/qabase/testcases/cq/setting_user_andgrouppreferencesdocumentation.html
-
-
Field Summary
Fields Modifier and Type Field Description protected Authorizable
authorizable
Group / Userprotected SecurityClient
client
static String
LANGUAGE_DE
static String
LANGUAGE_EN
static String
LANGUAGE_FR
static String
LANGUAGE_PROPERTY
protected String
path
path toAuthorizable
s' referencesstatic String
PREFERENCES_NODE
static String
SELECTOR
-
Constructor Summary
Constructors Constructor Description CQPreferences(Authorizable authorizable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Authorizable
getAuthorizable()
SecurityClient
getClient()
com.fasterxml.jackson.databind.JsonNode
getJson(int... expectedStatus)
Get json representation of the preferencesString
getLanguage()
Get language settings ofAuthorizable
String
getPath()
Get path toAuthorizable
s' referencesorg.apache.sling.testing.clients.SlingHttpResponse
setLanguage(String language)
Set language - if language is not given, default is set to "en"
-
-
-
Field Detail
-
PREFERENCES_NODE
public static final String PREFERENCES_NODE
- See Also:
- Constant Field Values
-
SELECTOR
public static final String SELECTOR
- See Also:
- Constant Field Values
-
LANGUAGE_PROPERTY
public static final String LANGUAGE_PROPERTY
- See Also:
- Constant Field Values
-
LANGUAGE_EN
public static final String LANGUAGE_EN
- See Also:
- Constant Field Values
-
LANGUAGE_DE
public static final String LANGUAGE_DE
- See Also:
- Constant Field Values
-
LANGUAGE_FR
public static final String LANGUAGE_FR
- See Also:
- Constant Field Values
-
client
protected SecurityClient client
-
authorizable
protected Authorizable authorizable
Group / User
-
path
protected String path
path toAuthorizable
s' references
-
-
Constructor Detail
-
CQPreferences
public CQPreferences(Authorizable authorizable) throws org.apache.sling.testing.clients.ClientException
- Throws:
org.apache.sling.testing.clients.ClientException
-
-
Method Detail
-
getClient
public SecurityClient getClient()
-
getAuthorizable
public Authorizable getAuthorizable()
-
getPath
public String getPath() throws org.apache.sling.testing.clients.ClientException
Get path toAuthorizable
s' 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 ofAuthorizable
- 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
-
-