use of org.alfresco.util.PropertyMap in project alfresco-remote-api by Alfresco.
the class InviteServiceTest method createPerson.
private void createPerson(String firstName, String lastName, String userName, String emailAddress) {
// 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());
}
// person
if (this.personService.personExists(userName) == false) {
// create person properties
PropertyMap personProps = new PropertyMap();
personProps.put(ContentModel.PROP_USERNAME, userName);
personProps.put(ContentModel.PROP_FIRSTNAME, firstName);
personProps.put(ContentModel.PROP_LASTNAME, lastName);
personProps.put(ContentModel.PROP_EMAIL, emailAddress);
personProps.put(ContentModel.PROP_JOBTITLE, PERSON_JOBTITLE);
personProps.put(ContentModel.PROP_ORGANIZATION, PERSON_ORG);
// create person node for user
this.personService.createPerson(personProps);
}
}
use of org.alfresco.util.PropertyMap in project alfresco-remote-api by Alfresco.
the class LinksRestApiTest method createUser.
private void createUser(String userName, String role, String siteName) {
// 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, USERDETAILS_FIRSTNAME);
personProps.put(ContentModel.PROP_LASTNAME, USERDETAILS_LASTNAME);
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);
}
// add the user as a member with the given role
this.siteService.setMembership(siteName, userName, role);
}
use of org.alfresco.util.PropertyMap in project alfresco-remote-api by Alfresco.
the class PersonServiceTest method createUser.
private void createUser(String userName) {
if (this.authenticationService.authenticationExists(userName) == false) {
this.authenticationService.createAuthentication(userName, "password".toCharArray());
PropertyMap personProps = new PropertyMap();
personProps.put(ContentModel.PROP_USERNAME, userName);
personProps.put(ContentModel.PROP_FIRSTNAME, "myFirstName");
personProps.put(ContentModel.PROP_LASTNAME, "myLastName");
personProps.put(ContentModel.PROP_EMAIL, "myFirstName.myLastName@email.com");
personProps.put(ContentModel.PROP_JOBTITLE, "myJobTitle");
personProps.put(ContentModel.PROP_JOBTITLE, "myOrganisation");
this.personService.createPerson(personProps);
this.createdPeople.add(userName);
}
}
use of org.alfresco.util.PropertyMap in project alfresco-remote-api by Alfresco.
the class PreferenceServiceTest 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 BlogServiceTest method createUser.
private void createUser(String userName, String role, String siteMembership) {
// 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, "FirstName123");
personProps.put(ContentModel.PROP_LASTNAME, "LastName123");
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);
}
// add the user as a member with the given role
this.siteService.setMembership(siteMembership, userName, role);
}
Aggregations