mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
. Fixes/improvements for handling of author/creator in the repository and the web-client:
- added new aspect called "cm:author" with a single text property "cm:author" - fixed the content meta-data extractors to set the new cm:author property rather than the system cm:creator property (which was causing a couple of bugs spotted recently) - fixed the web-client to set the new cm:author property rather than the cm:creator property from user entered data into the UI - fixed web-client config of document properties screen to display cm:author - fixed client to not allow editing of the cm:creator value git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2034 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -19,6 +19,7 @@ package org.alfresco.web.bean;
|
||||
import java.io.Serializable;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -146,6 +147,20 @@ public class DocumentPropertiesBean
|
||||
}
|
||||
}
|
||||
|
||||
// extra and deal with the Author prop if the aspect has not been applied yet
|
||||
String author = (String)props.get(ContentModel.PROP_AUTHOR);
|
||||
if (author != null)
|
||||
{
|
||||
// add aspect if required
|
||||
if (this.nodeService.hasAspect(nodeRef, ContentModel.ASPECT_AUTHOR) == false)
|
||||
{
|
||||
Map<QName, Serializable> authorProps = new HashMap<QName, Serializable>(1, 1.0f);
|
||||
authorProps.put(ContentModel.PROP_AUTHOR, author);
|
||||
this.nodeService.addAspect(nodeRef, ContentModel.ASPECT_AUTHOR, authorProps);
|
||||
}
|
||||
// else it will get updated in the later setProperties() call
|
||||
}
|
||||
|
||||
// add the remaining properties
|
||||
Iterator<String> iterProps = props.keySet().iterator();
|
||||
while (iterProps.hasNext())
|
||||
|
Reference in New Issue
Block a user