. 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:
Kevin Roast
2005-12-13 15:25:56 +00:00
parent 145f72a6e7
commit aedd354dea
7 changed files with 46 additions and 10 deletions

View File

@@ -111,7 +111,21 @@ public abstract class BaseContentWizard extends AbstractWizardBean
Map<QName, Serializable> contentProps = this.nodeService.getProperties(nodeRef);
contentProps.put(ContentModel.PROP_TITLE, this.title);
contentProps.put(ContentModel.PROP_DESCRIPTION, this.description);
contentProps.put(ContentModel.PROP_CREATOR, this.author);
// add author property
if (this.author != null && this.author.length() != 0)
{
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, this.author);
this.nodeService.addAspect(nodeRef, ContentModel.ASPECT_AUTHOR, authorProps);
}
else
{
contentProps.put(ContentModel.PROP_AUTHOR, this.author);
}
}
// set up content properties - copy or create the compound property
ContentData contentData = (ContentData)contentProps.get(ContentModel.PROP_CONTENT);
@@ -161,10 +175,12 @@ public abstract class BaseContentWizard extends AbstractWizardBean
Repository.resolveToQName(this.objectType));
NodeRef fileNodeRef = fileInfo.getNodeRef();
// set the author (if we have)
// set the author aspect (if we have one)
if (this.author != null && this.author.length() > 0)
{
this.nodeService.setProperty(fileNodeRef, ContentModel.PROP_CREATOR, this.author);
Map<QName, Serializable> authorProps = new HashMap<QName, Serializable>(1, 1.0f);
authorProps.put(ContentModel.PROP_AUTHOR, this.author);
this.nodeService.addAspect(fileNodeRef, ContentModel.ASPECT_AUTHOR, authorProps);
}
if (logger.isDebugEnabled())