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 AuthorizableauthorizableGroup / Userprotected SecurityClientclientstatic StringLANGUAGE_DEstatic StringLANGUAGE_ENstatic StringLANGUAGE_FRstatic StringLANGUAGE_PROPERTYprotected Stringpathpath toAuthorizables' referencesstatic StringPREFERENCES_NODEstatic StringSELECTOR
-
Constructor Summary
Constructors Constructor Description CQPreferences(Authorizable authorizable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthorizablegetAuthorizable()SecurityClientgetClient()com.fasterxml.jackson.databind.JsonNodegetJson(int... expectedStatus)Get json representation of the preferencesStringgetLanguage()Get language settings ofAuthorizableStringgetPath()Get path toAuthorizables' referencesorg.apache.sling.testing.clients.SlingHttpResponsesetLanguage(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 toAuthorizables' 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 toAuthorizables' 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.ClientExceptionGet 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
-
-