use of org.alfresco.util.PropertyMap in project alfresco-repository by Alfresco.
the class CopyServiceImplTest method testALF11964_part1.
/**
* Tests copying a folder that contains both a node and a copy of that node.
*/
public void testALF11964_part1() {
IntegrityChecker integrityChecker = (IntegrityChecker) ctx.getBean("integrityChecker");
PropertyMap props = new PropertyMap();
// Need to create a potentially recursive node structure
props.put(ContentModel.PROP_NODE_UUID, "nodeOne");
NodeRef nodeOne = nodeService.createNode(rootNodeRef, ContentModel.ASSOC_CHILDREN, ContentModel.ASSOC_CHILDREN, ContentModel.TYPE_CONTAINER, props).getChildRef();
props.put(ContentModel.PROP_NODE_UUID, "nodeTwo");
NodeRef nodeTwo = nodeService.createNode(nodeOne, ContentModel.ASSOC_CHILDREN, ContentModel.ASSOC_CHILDREN, ContentModel.TYPE_CONTENT, props).getChildRef();
props.put(ContentModel.PROP_NODE_UUID, "nodeThree");
NodeRef nodeThree = nodeService.createNode(rootNodeRef, ContentModel.ASSOC_CHILDREN, ContentModel.ASSOC_CHILDREN, ContentModel.TYPE_CONTAINER, props).getChildRef();
copyService.copy(nodeTwo, nodeOne, ContentModel.ASSOC_CHILDREN, ContentModel.ASSOC_CHILDREN, true);
copyService.copy(nodeOne, nodeThree, ContentModel.ASSOC_CHILDREN, ContentModel.ASSOC_CHILDREN, true);
integrityChecker.checkIntegrity();
}
use of org.alfresco.util.PropertyMap in project alfresco-repository by Alfresco.
the class SubscriptionServiceImplTest 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-repository by Alfresco.
the class TestPersonManager method makePersonProperties.
public static PropertyMap makePersonProperties(String userName) {
PropertyMap personProps = new PropertyMap();
personProps.put(ContentModel.PROP_USERNAME, userName);
personProps.put(ContentModel.PROP_FIRSTNAME, userName + FIRST_NAME_SUFFIX);
personProps.put(ContentModel.PROP_LASTNAME, userName + LAST_NAME_SUFFIX);
personProps.put(ContentModel.PROP_EMAIL, userName + EMAIL_SUFFIX);
personProps.put(ContentModel.PROP_JOBTITLE, userName + JOB_SUFFIX);
personProps.put(ContentModel.PROP_JOBTITLE, userName + ORGANISATION_SUFFIX);
return personProps;
}
use of org.alfresco.util.PropertyMap in project alfresco-repository by Alfresco.
the class ChainingUserRegistrySynchronizerTest method newGroupWithDisplayName.
/**
* Constructs a description of a test group with a display name.
*
* @param name
* the name
* @param displayName
* the display name
* @param members
* the members
* @return the node description
*/
private NodeDescription newGroupWithDisplayName(String name, String displayName, String... members) {
String longName = longName(name);
NodeDescription group = new NodeDescription(longName);
PropertyMap properties = group.getProperties();
properties.put(ContentModel.PROP_AUTHORITY_NAME, longName);
properties.put(ContentModel.PROP_AUTHORITY_DISPLAY_NAME, displayName);
if (members.length > 0) {
Set<String> assocs = group.getChildAssociations();
for (String member : members) {
assocs.add(longName(member));
}
}
group.setLastModified(new Date());
return group;
}
use of org.alfresco.util.PropertyMap in project alfresco-repository by Alfresco.
the class SiteServiceImplMoreTest method createUser.
private void createUser(String userName, String nameSuffix) {
if (AUTHENTICATION_SERVICE.authenticationExists(userName)) {
return;
}
AUTHENTICATION_SERVICE.createAuthentication(userName, "PWD".toCharArray());
PropertyMap ppOne = new PropertyMap(4);
ppOne.put(ContentModel.PROP_USERNAME, userName);
ppOne.put(ContentModel.PROP_FIRSTNAME, "firstName" + nameSuffix);
ppOne.put(ContentModel.PROP_LASTNAME, "lastName" + nameSuffix);
ppOne.put(ContentModel.PROP_EMAIL, "email" + nameSuffix + "@email.com");
ppOne.put(ContentModel.PROP_JOBTITLE, "jobTitle");
PERSON_SERVICE.createPerson(ppOne);
}
Aggregations