03-30-2011 01:16 PM
…snip…
<alf:aspects>
<alf:appliedAspects>P:app:uifacets</alf:appliedAspects>
<alf:appliedAspects>P:cm:titled</alf:appliedAspects>
<alf:properties>
<cmis:propertyString propertyDefinitionId="app:icon" displayName="Icon" queryName="app:icon"><cmis:value>space-icon-default</cmis:value></cmis:propertyString>
<cmis:propertyString propertyDefinitionId="cm:description" displayName="Description" queryName="cm:description"><cmis:value>Contact: Pippo Baudo (pippo.baudo@rai.it)</cmis:value></cmis:propertyString>
<cmis:propertyString propertyDefinitionId="cm:title" displayName="Title" queryName="cm:title"><cmis:value>Virtual District Home</cmis:value></cmis:propertyString>
</alf:properties>
</alf:aspects>
…snip…
AlfrescoFolder alfrescoFolder = (AlfrescoFolder) session.getObjectByPath(alfrescoFolderPath);
log.debug("createUserHomeFolder(): alfrescoFolder.aspects={}", alfrescoFolder.getAspects());
createUserHomeFolder(): alfrescoFolder.aspects=[Type Definition [base id=CMIS_POLICY, id=P:cm:ownable, display Name=Ownable, description=Ownable, local name=ownable, local namespace=http://www.alfresco.org/model/content/1.0, query name=cm:ownable, parent id=cmis:policy, is controllable ACL=false, is controllable policy=false, is creatable=false, is fileable=false, is fulltext indexed=true, is included in supertype query=true, is queryable=true, property definitions={cm:owner=Property Definition [id=cm:owner, display name=Owner, description=Owner, local name=owner, local namespace=http://www.alfresco.org/model/content/1.0, query name=cm:owner, property type=STRING, cardinality=SINGLE, choice list=[], default value=null, is inherited=false, is open choice=false, is queryable=true, is required=false, updatability=READWRITE][extensions=null]}][extensions=null]]
if (alfrescoFolder.hasAspect("P:cm:titled")) {
log.debug("createUserHomeFolder(): alfrescoFolder.hasAspect(\"P:cm:titled\")=true");
Map<String, Object> properties = new HashMap<String, Object>();
properties.put("cm:description", "Contact: ".concat(alfrescoUser.getFirstName()).concat(" ").concat(alfrescoUser.getLastName()).concat(" (").concat(alfrescoUser.getEmail().concat(")")));
alfrescoFolder.updateProperties(properties);
}
03-31-2011 05:30 AM
AlfrescoFolder alfrescoFolder = (AlfrescoFolder) session.getObjectByPath(alfrescoFolderPath);
if (!alfrescoFolder.hasAspect("P:cm:titled")) {
log.debug("createUserHomeFolder(): alfrescoFolder.addAspect(\"P:cm:titled\")");
alfrescoFolder.addAspect("P:cm:titled");
}
Map<String, Object> properties = new HashMap<String, Object>();
properties.put("cm:description", "Contact: ".concat(alfrescoUser.getFirstName()).concat(" ").concat(alfrescoUser.getLastName()).concat(" (").concat(alfrescoUser.getEmail().concat(")")));
alfrescoFolder.updateProperties(properties);
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.