public interface Authorizable
Modifier and Type | Field and Description |
---|---|
static int |
ACTION_CREATE_GROUP |
static int |
ACTION_CREATE_USER |
static String |
AUTHORIZABLE_ID
JSON properties
|
static String |
HOME |
static String |
IMPERSONATORS |
static String |
IS_IMPERSONATED |
static String |
MEMBER_OF |
static String |
MEMBERS |
static String |
PARAM_ADD_IMPERSONATORS |
static String |
PARAM_ADD_MEMBERS |
static String |
PARAM_AUTHORIZABLE_ID |
static String |
PARAM_CREATE_GROUP
Parameter marking the request being used for creating a new group.
|
static String |
PARAM_CREATE_USER
Parameter marking the request being used for creating a new user.
|
static String |
PARAM_DELETE
Parameter indicating that the corresponding authorizable should be removed.
|
static String |
PARAM_INTERMEDIATE_PATH |
static String |
PARAM_PASSWORD |
static String |
PARAM_REMOVE_IMPERSONATORS |
static String |
PARAM_REMOVE_MEMBERS |
static String |
PROFILE |
static String |
SCHEMA_AUTHORIZABLE
JSON Schema from authorizable (minimum)
|
static String |
SELECTOR
Selector for AuthorizableServlet
|
static String |
SELECTOR_USERPROPERTIES
Selector for UserProperties
|
static String |
TYPE |
static String |
TYPE_GROUP |
static String |
TYPE_USER |
static String |
WILDCARD |
Modifier and Type | Method and Description |
---|---|
<T extends SecurityClient> |
create(T client,
Class<? extends AbstractAuthorizable> authorizableClass,
String authorizableId,
org.apache.sling.testing.clients.util.FormEntityBuilder formParameters,
int... expectedStatus)
Creates a new
Authorizable . |
org.apache.sling.testing.clients.SlingHttpResponse |
delete(int... expectedStatus)
Deletes an authorizable.
|
boolean |
exists()
Check if the authorizable exists
|
SecurityClient |
getClient()
Get any client implementing the
SecurityClient |
String |
getHomePath()
Get home path to authorizable
|
String |
getHomeUrl()
Get home URL to authorizable
|
String |
getId()
Get id of authorizable
|
Map<String,Authorizable> |
getImpersonators()
Get impersonators of the authorizable.
|
String |
getJsonAsString(String propsFilter,
int... expectedStatus)
String representation of authorizable
http://localhost:4502/home/groups/default/administrators.rw.json?props=replication,modification,memberOf,
membersTotal,members,profile/*&ml=2000
|
Map<String,Authorizable> |
getMemberOf()
Get members authorizable is assigned to.
|
Map<String,Authorizable> |
getMembers()
Get members assigned to the authorizable.
|
org.codehaus.jackson.JsonNode |
getProfile()
Get profile attributes for authorizable.
|
String |
getRootPath()
Get root path of the authorizable (user/group) in repository
|
String |
getUserPropertiesJsonAsString(int... expectedStatus)
Get user properties JSON representation as string
|
boolean |
isImpersonated()
Check if authorizable is impersonated.
|
static final String SCHEMA_AUTHORIZABLE
static final String SELECTOR
static final String SELECTOR_USERPROPERTIES
static final String PARAM_DELETE
static final String PARAM_CREATE_USER
static final String PARAM_CREATE_GROUP
static final int ACTION_CREATE_USER
static final int ACTION_CREATE_GROUP
static final String PARAM_AUTHORIZABLE_ID
static final String PARAM_PASSWORD
static final String PARAM_INTERMEDIATE_PATH
static final String PARAM_ADD_IMPERSONATORS
static final String PARAM_REMOVE_IMPERSONATORS
static final String PARAM_ADD_MEMBERS
static final String PARAM_REMOVE_MEMBERS
static final String AUTHORIZABLE_ID
static final String HOME
static final String IS_IMPERSONATED
static final String MEMBERS
static final String MEMBER_OF
static final String PROFILE
static final String IMPERSONATORS
static final String TYPE
static final String TYPE_GROUP
static final String TYPE_USER
static final String WILDCARD
SecurityClient getClient()
SecurityClient
SecurityClient
String getId()
String getHomePath()
String getHomeUrl()
String getRootPath()
boolean exists() throws org.apache.sling.testing.clients.ClientException
org.apache.sling.testing.clients.ClientException
- if the request failedString getJsonAsString(String propsFilter, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
propsFilter
- properties filterexpectedStatus
- list of allowed HTTP Status to be returned.org.apache.sling.testing.clients.ClientException
- If something fails during request/response cycleString getUserPropertiesJsonAsString(int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
expectedStatus
- status to beorg.apache.sling.testing.clients.ClientException
- If something fails during request/response cycleorg.apache.sling.testing.clients.SlingHttpResponse delete(int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
expectedStatus
- list of allowed HTTP Status to be returned.org.apache.sling.testing.clients.ClientException
- If something fails during request/response cycle<T extends SecurityClient> Authorizable create(T client, Class<? extends AbstractAuthorizable> authorizableClass, String authorizableId, org.apache.sling.testing.clients.util.FormEntityBuilder formParameters, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
Authorizable
.T
- client typeclient
- any class implementing the SecurityClient
.authorizableClass
- Authorizable class to be created.authorizableId
- the ID for the new authorizable.formParameters
- form parameters.expectedStatus
- list of allowed HTTP Status to be returned. If not set,
http status 201 (CREATED) is assumed.Authorizable
org.apache.sling.testing.clients.ClientException
- If something fails during request/response cycleMap<String,Authorizable> getMemberOf() throws org.apache.sling.testing.clients.ClientException, InterruptedException
Authorizable
org.apache.sling.testing.clients.ClientException
- If something fails during request/response cycleInterruptedException
- to mark this method as "waiting"Map<String,Authorizable> getMembers() throws org.apache.sling.testing.clients.ClientException, InterruptedException
Authorizable
org.apache.sling.testing.clients.ClientException
- If something fails during request/response cycleInterruptedException
- to mark this method as "waiting"boolean isImpersonated() throws org.apache.sling.testing.clients.ClientException
org.apache.sling.testing.clients.ClientException
- If something fails during request/response cycleMap<String,Authorizable> getImpersonators() throws org.apache.sling.testing.clients.ClientException, InterruptedException
Authorizable
org.apache.sling.testing.clients.ClientException
- If something fails during request/response cycleInterruptedException
- to mark this method as "waiting"org.codehaus.jackson.JsonNode getProfile() throws org.apache.sling.testing.clients.ClientException
org.apache.sling.testing.clients.ClientException
- If something fails during request/response cycleCopyright © 2018. All rights reserved.