use of org.alfresco.util.PropertyMap in project alfresco-remote-api by Alfresco.
the class RemoteAlfrescoTicketServiceTest method createUser.
private void createUser(String userName) {
// if user with given user name doesn't already exist then create user
if (this.authenticationService.authenticationExists(userName) == false) {
// create user
this.authenticationService.createAuthentication(userName, PASSWORD.toCharArray());
// create person properties
PropertyMap personProps = new PropertyMap();
personProps.put(ContentModel.PROP_USERNAME, userName);
personProps.put(ContentModel.PROP_FIRSTNAME, "First");
personProps.put(ContentModel.PROP_LASTNAME, "Last");
personProps.put(ContentModel.PROP_EMAIL, "FirstName123.LastName123@email.com");
personProps.put(ContentModel.PROP_JOBTITLE, "JobTitle123");
personProps.put(ContentModel.PROP_JOBTITLE, "Organisation123");
// create person node for user
this.personService.createPerson(personProps);
}
}
use of org.alfresco.util.PropertyMap in project alfresco-remote-api by Alfresco.
the class SubscriptionServiceRestApiTest method createPerson.
protected NodeRef createPerson(String userId) {
deletePerson(userId);
PropertyMap properties = new PropertyMap(5);
properties.put(ContentModel.PROP_USERNAME, userId);
properties.put(ContentModel.PROP_FIRSTNAME, userId);
properties.put(ContentModel.PROP_LASTNAME, "Test");
properties.put(ContentModel.PROP_EMAIL, userId + "@test.demo.alfresco.com");
return personService.createPerson(properties);
}
use of org.alfresco.util.PropertyMap in project alfresco-remote-api by Alfresco.
the class TaggingServiceTest method createUser.
private void createUser(String userName) {
if (this.authenticationService.authenticationExists(userName) == false) {
this.authenticationService.createAuthentication(userName, "PWD".toCharArray());
PropertyMap ppOne = new PropertyMap(4);
ppOne.put(ContentModel.PROP_USERNAME, userName);
ppOne.put(ContentModel.PROP_FIRSTNAME, "firstName");
ppOne.put(ContentModel.PROP_LASTNAME, "lastName");
ppOne.put(ContentModel.PROP_EMAIL, "email@email.com");
ppOne.put(ContentModel.PROP_JOBTITLE, "jobTitle");
this.personService.createPerson(ppOne);
}
}
use of org.alfresco.util.PropertyMap in project alfresco-remote-api by Alfresco.
the class ThumbnailServiceTest method createUser.
private void createUser(String userName) {
// if user with given user name doesn't already exist then create user
if (this.authenticationService.authenticationExists(userName) == false) {
// create user
this.authenticationService.createAuthentication(userName, "password".toCharArray());
// create person properties
PropertyMap personProps = new PropertyMap();
personProps.put(ContentModel.PROP_USERNAME, userName);
personProps.put(ContentModel.PROP_FIRSTNAME, "First");
personProps.put(ContentModel.PROP_LASTNAME, "Last");
personProps.put(ContentModel.PROP_EMAIL, "FirstName123.LastName123@email.com");
personProps.put(ContentModel.PROP_JOBTITLE, "JobTitle123");
personProps.put(ContentModel.PROP_JOBTITLE, "Organisation123");
// create person node for user
this.personService.createPerson(personProps);
}
}
use of org.alfresco.util.PropertyMap in project alfresco-remote-api by Alfresco.
the class InvitationWebScriptTest method createUser.
private void createUser(String userName, String firstName, String lastName) {
this.authenticationService.createAuthentication(userName, "PWD".toCharArray());
PropertyMap ppOne = new PropertyMap(5);
ppOne.put(ContentModel.PROP_USERNAME, userName);
ppOne.put(ContentModel.PROP_FIRSTNAME, firstName);
ppOne.put(ContentModel.PROP_LASTNAME, lastName);
String email = firstName + "@email.com";
ppOne.put(ContentModel.PROP_EMAIL, email);
ppOne.put(ContentModel.PROP_JOBTITLE, "jobTitle");
NodeRef person = personService.createPerson(ppOne);
String avatarUrl = makeAvatar(nodeService, person);
// Create expected user properties
HashMap<String, String> properties = new HashMap<String, String>(4);
properties.put("firstName", firstName);
properties.put("lastName", lastName);
properties.put("email", email);
properties.put("avatar", avatarUrl);
userProperties.put(userName, properties);
}
Aggregations