Klasse MockUserManager
java.lang.Object
org.apache.sling.testing.mock.jcr.MockUserManager
- Alle implementierten Schnittstellen:
org.apache.jackrabbit.api.security.user.UserManager
public class MockUserManager
extends Object
implements org.apache.jackrabbit.api.security.user.UserManager
Mock
UserManager implementation.-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected javax.jcr.SessionVon Schnittstelle geerbte Felder org.apache.jackrabbit.api.security.user.UserManager
SEARCH_TYPE_AUTHORIZABLE, SEARCH_TYPE_GROUP, SEARCH_TYPE_USER -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidautoSave(boolean autoSave) @NotNull org.apache.jackrabbit.api.security.user.GroupcreateGroup(@NotNull String groupID) @NotNull org.apache.jackrabbit.api.security.user.GroupcreateGroup(@NotNull String groupID, @NotNull Principal principal, @Nullable String intermediatePath) @NotNull org.apache.jackrabbit.api.security.user.GroupcreateGroup(@NotNull Principal principal) @NotNull org.apache.jackrabbit.api.security.user.GroupcreateGroup(@NotNull Principal principal, @Nullable String intermediatePath) @NotNull org.apache.jackrabbit.api.security.user.UsercreateSystemUser(@NotNull String userID, @Nullable String intermediatePath) @NotNull org.apache.jackrabbit.api.security.user.UsercreateUser(@NotNull String userID, @Nullable String password) @NotNull org.apache.jackrabbit.api.security.user.UsercreateUser(@NotNull String userID, @Nullable String password, @NotNull Principal principal, @Nullable String intermediatePath) protected javax.jcr.NodeensureAuthorizablePathExists(@NotNull String intermediatePath, @NotNull String principalName, @NotNull String authorizableNodeType) Creates the user/group home folder if they don't exist yetprotected javax.jcr.NodeensureAuthorizablePathExists(@Nullable String intermediatePath, @NotNull String principalName, boolean isGroup) Veraltet, zur Entfernung: Dieses API-Element wird in einer zukünftigen Version entfernt.@NotNull Iterator<org.apache.jackrabbit.api.security.user.Authorizable> findAuthorizables(@NotNull String relPath, @Nullable String value) @NotNull Iterator<org.apache.jackrabbit.api.security.user.Authorizable> findAuthorizables(@NotNull String relPath, @Nullable String value, int searchType) @NotNull Iterator<org.apache.jackrabbit.api.security.user.Authorizable> findAuthorizables(@NotNull org.apache.jackrabbit.api.security.user.Query query) @Nullable org.apache.jackrabbit.api.security.user.AuthorizablegetAuthorizable(@NotNull String id) <T extends org.apache.jackrabbit.api.security.user.Authorizable>
TgetAuthorizable(@NotNull String id, @NotNull Class<T> authorizableClass) @Nullable org.apache.jackrabbit.api.security.user.AuthorizablegetAuthorizable(@NotNull Principal principal) @Nullable org.apache.jackrabbit.api.security.user.AuthorizablegetAuthorizableByPath(@NotNull String path) booleanprotected @Nullable StringtoPrincipalName(@Nullable String id, @Nullable Principal principal) Calculates the principal name, preferring the supplied id or fallback to thePrincipal.getName()value
-
Felddetails
-
session
protected javax.jcr.Session session -
authorizables
-
-
Konstruktordetails
-
MockUserManager
Veraltet.useMockUserManager(Session)instead -
MockUserManager
public MockUserManager(javax.jcr.Session session) - Parameter:
session- the jcr session where the people state is stored
-
-
Methodendetails
-
isAutoSave
public boolean isAutoSave()- Angegeben von:
isAutoSavein Schnittstelleorg.apache.jackrabbit.api.security.user.UserManager
-
autoSave
public void autoSave(boolean autoSave) throws javax.jcr.RepositoryException - Angegeben von:
autoSavein Schnittstelleorg.apache.jackrabbit.api.security.user.UserManager- Löst aus:
javax.jcr.RepositoryException
-
createGroup
@NotNull public @NotNull org.apache.jackrabbit.api.security.user.Group createGroup(@NotNull @NotNull String groupID) throws javax.jcr.RepositoryException - Angegeben von:
createGroupin Schnittstelleorg.apache.jackrabbit.api.security.user.UserManager- Löst aus:
javax.jcr.RepositoryException
-
createGroup
@NotNull public @NotNull org.apache.jackrabbit.api.security.user.Group createGroup(@NotNull @NotNull Principal principal) throws javax.jcr.RepositoryException - Angegeben von:
createGroupin Schnittstelleorg.apache.jackrabbit.api.security.user.UserManager- Löst aus:
javax.jcr.RepositoryException
-
createGroup
@NotNull public @NotNull org.apache.jackrabbit.api.security.user.Group createGroup(@NotNull @NotNull Principal principal, @Nullable @Nullable String intermediatePath) throws javax.jcr.RepositoryException - Angegeben von:
createGroupin Schnittstelleorg.apache.jackrabbit.api.security.user.UserManager- Löst aus:
javax.jcr.RepositoryException
-
createGroup
@NotNull public @NotNull org.apache.jackrabbit.api.security.user.Group createGroup(@NotNull @NotNull String groupID, @NotNull @NotNull Principal principal, @Nullable @Nullable String intermediatePath) throws javax.jcr.RepositoryException - Angegeben von:
createGroupin Schnittstelleorg.apache.jackrabbit.api.security.user.UserManager- Löst aus:
javax.jcr.RepositoryException
-
toPrincipalName
@Nullable protected @Nullable String toPrincipalName(@Nullable @Nullable String id, @Nullable @Nullable Principal principal) Calculates the principal name, preferring the supplied id or fallback to thePrincipal.getName()value- Parameter:
id- the user or group idprincipal- the principal- Gibt zurück:
- the principal name
-
ensureAuthorizablePathExists
@Deprecated(forRemoval=true, since="1.4.0") protected javax.jcr.Node ensureAuthorizablePathExists(@Nullable @Nullable String intermediatePath, @NotNull @NotNull String principalName, boolean isGroup) throws javax.jcr.RepositoryException Veraltet, zur Entfernung: Dieses API-Element wird in einer zukünftigen Version entfernt.Creates the user/group home folder if they don't exist yet- Parameter:
intermediatePath- the parent pathprincipalName- Principal nameisGroup- Is group- Gibt zurück:
- Existing or created node
- Löst aus:
javax.jcr.RepositoryException- Repository exception
-
ensureAuthorizablePathExists
protected javax.jcr.Node ensureAuthorizablePathExists(@NotNull @NotNull String intermediatePath, @NotNull @NotNull String principalName, @NotNull @NotNull String authorizableNodeType) throws javax.jcr.RepositoryException Creates the user/group home folder if they don't exist yet- Parameter:
intermediatePath- the parent pathprincipalName- Principal nameauthorizableNodeType- the node type for the user or group node- Gibt zurück:
- Existing or created node
- Löst aus:
javax.jcr.RepositoryException- Repository exception
-
createSystemUser
@NotNull public @NotNull org.apache.jackrabbit.api.security.user.User createSystemUser(@NotNull @NotNull String userID, @Nullable @Nullable String intermediatePath) throws javax.jcr.RepositoryException - Angegeben von:
createSystemUserin Schnittstelleorg.apache.jackrabbit.api.security.user.UserManager- Löst aus:
javax.jcr.RepositoryException
-
createUser
@NotNull public @NotNull org.apache.jackrabbit.api.security.user.User createUser(@NotNull @NotNull String userID, @Nullable @Nullable String password) throws javax.jcr.RepositoryException - Angegeben von:
createUserin Schnittstelleorg.apache.jackrabbit.api.security.user.UserManager- Löst aus:
javax.jcr.RepositoryException
-
createUser
@NotNull public @NotNull org.apache.jackrabbit.api.security.user.User createUser(@NotNull @NotNull String userID, @Nullable @Nullable String password, @NotNull @NotNull Principal principal, @Nullable @Nullable String intermediatePath) throws javax.jcr.RepositoryException - Angegeben von:
createUserin Schnittstelleorg.apache.jackrabbit.api.security.user.UserManager- Löst aus:
javax.jcr.RepositoryException
-
findAuthorizables
@NotNull public @NotNull Iterator<org.apache.jackrabbit.api.security.user.Authorizable> findAuthorizables(@NotNull @NotNull org.apache.jackrabbit.api.security.user.Query query) throws javax.jcr.RepositoryException - Angegeben von:
findAuthorizablesin Schnittstelleorg.apache.jackrabbit.api.security.user.UserManager- Löst aus:
javax.jcr.RepositoryException
-
findAuthorizables
@NotNull public @NotNull Iterator<org.apache.jackrabbit.api.security.user.Authorizable> findAuthorizables(@NotNull @NotNull String relPath, @Nullable @Nullable String value) throws javax.jcr.RepositoryException - Angegeben von:
findAuthorizablesin Schnittstelleorg.apache.jackrabbit.api.security.user.UserManager- Löst aus:
javax.jcr.RepositoryException
-
findAuthorizables
@NotNull public @NotNull Iterator<org.apache.jackrabbit.api.security.user.Authorizable> findAuthorizables(@NotNull @NotNull String relPath, @Nullable @Nullable String value, int searchType) throws javax.jcr.RepositoryException - Angegeben von:
findAuthorizablesin Schnittstelleorg.apache.jackrabbit.api.security.user.UserManager- Löst aus:
javax.jcr.RepositoryException
-
getAuthorizable
@Nullable public @Nullable org.apache.jackrabbit.api.security.user.Authorizable getAuthorizable(@NotNull @NotNull String id) throws javax.jcr.RepositoryException - Angegeben von:
getAuthorizablein Schnittstelleorg.apache.jackrabbit.api.security.user.UserManager- Löst aus:
javax.jcr.RepositoryException
-
getAuthorizable
@Nullable public @Nullable org.apache.jackrabbit.api.security.user.Authorizable getAuthorizable(@NotNull @NotNull Principal principal) throws javax.jcr.RepositoryException - Angegeben von:
getAuthorizablein Schnittstelleorg.apache.jackrabbit.api.security.user.UserManager- Löst aus:
javax.jcr.RepositoryException
-
getAuthorizable
@Nullable public <T extends org.apache.jackrabbit.api.security.user.Authorizable> T getAuthorizable(@NotNull @NotNull String id, @NotNull @NotNull Class<T> authorizableClass) throws javax.jcr.RepositoryException - Angegeben von:
getAuthorizablein Schnittstelleorg.apache.jackrabbit.api.security.user.UserManager- Löst aus:
javax.jcr.RepositoryException
-
getAuthorizableByPath
@Nullable public @Nullable org.apache.jackrabbit.api.security.user.Authorizable getAuthorizableByPath(@NotNull @NotNull String path) throws javax.jcr.RepositoryException - Angegeben von:
getAuthorizableByPathin Schnittstelleorg.apache.jackrabbit.api.security.user.UserManager- Löst aus:
javax.jcr.RepositoryException
-
MockUserManager(Session)instead