|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.util.TestWithUserUtils
public abstract class TestWithUserUtils
Utility class containing some useful methods to help when writing tests that require authenticated users
Constructor Summary | |
---|---|
TestWithUserUtils()
|
Method Summary | |
---|---|
static void |
authenticateUser(java.lang.String userName,
java.lang.String password,
MutableAuthenticationService authenticationService,
AuthenticationComponent authenticationComponent)
Authenticate as the given user. |
static void |
authenticateUser(java.lang.String userName,
java.lang.String password,
org.alfresco.service.cmr.repository.NodeRef rootNodeRef,
AuthenticationService authenticationService)
Authenticate the user with the specified password |
static void |
createUser(java.lang.String userName,
java.lang.String password,
org.alfresco.service.cmr.repository.NodeRef rootNodeRef,
org.alfresco.service.cmr.repository.NodeService nodeService,
MutableAuthenticationService authenticationService)
Create a new user, including the corresponding person node. |
static void |
createUser(java.lang.String userName,
java.lang.String password,
java.lang.String email,
org.alfresco.service.cmr.repository.NodeRef rootNodeRef,
org.alfresco.service.cmr.repository.NodeService nodeService,
MutableAuthenticationService authenticationService)
|
static void |
deleteUser(java.lang.String user_name,
java.lang.String pwd,
org.alfresco.service.cmr.repository.NodeRef ref,
org.alfresco.service.cmr.repository.NodeService service,
MutableAuthenticationService service2)
|
static java.lang.String |
getCurrentUser(AuthenticationService authenticationService)
Get the current user node reference |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TestWithUserUtils()
Method Detail |
---|
public static void createUser(java.lang.String userName, java.lang.String password, org.alfresco.service.cmr.repository.NodeRef rootNodeRef, org.alfresco.service.cmr.repository.NodeService nodeService, MutableAuthenticationService authenticationService)
userName
- the user namepassword
- the passwordrootNodeRef
- the root node referencenodeService
- the node serviceauthenticationService
- the authentication servicepublic static void createUser(java.lang.String userName, java.lang.String password, java.lang.String email, org.alfresco.service.cmr.repository.NodeRef rootNodeRef, org.alfresco.service.cmr.repository.NodeService nodeService, MutableAuthenticationService authenticationService)
public static void authenticateUser(java.lang.String userName, java.lang.String password, org.alfresco.service.cmr.repository.NodeRef rootNodeRef, AuthenticationService authenticationService)
userName
- the user namepassword
- the passwordrootNodeRef
- the root node referenceauthenticationService
- the authentication servicepublic static void authenticateUser(java.lang.String userName, java.lang.String password, MutableAuthenticationService authenticationService, AuthenticationComponent authenticationComponent)
public static java.lang.String getCurrentUser(AuthenticationService authenticationService)
authenticationService
- the authentication service
public static void deleteUser(java.lang.String user_name, java.lang.String pwd, org.alfresco.service.cmr.repository.NodeRef ref, org.alfresco.service.cmr.repository.NodeService service, MutableAuthenticationService service2)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |