get the author after 'modify content propertie'
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2008 10:35 AM
hello ,
i'm using SVN for developing on alfresco and i need to copie the properties(author ,description) that we added in the wizar "modify content properties" but i cant find how to do.
i tried to get the author after this code lignes
in BaseContentWizard.java but i see that it's null and it's normal because the file don't have an author
so i cant see where to get the author String after that i added an author from (modify content properties)
i'm using SVN for developing on alfresco and i need to copie the properties(author ,description) that we added in the wizar "modify content properties" but i cant find how to do.
i tried to get the author after this code lignes
Map<QName, Serializable> authorProps = new HashMap<QName, Serializable>(1, 1.0f); authorProps.put(ContentModel.PROP_AUTHOR, this.author); this.getNodeService().addAspect(fileNodeRef, ContentModel.ASPECT_AUTHOR, authorProps); writeAuthor(author); //this will write the author in a text file
in BaseContentWizard.java but i see that it's null and it's normal because the file don't have an author
so i cant see where to get the author String after that i added an author from (modify content properties)
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2008 06:10 PM
If you are modifying the content wizard, I'd assume after the node is created, you can pull that information out of the newly created node. I.e. somewhere in finishImpl, after you save the node, you should be able to get the author information (if it gets set automatically by the repo - i am not sure about the specifics there).
Additionally, here are two alternatives: One of two (or both) ways should work:
1. Crate a content rule that runs a JavaScript script when a document gets added. The script can copy the author information elsewhere.
2. Create a behavior that gets triggered onCreateNode that captures the same information. The behavior can point to either java code or javascript. .
http://ecmarchitect.com/images/articles/alfresco-behavior/behavior-article.pdf
Additionally, here are two alternatives: One of two (or both) ways should work:
1. Crate a content rule that runs a JavaScript script when a document gets added. The script can copy the author information elsewhere.
2. Create a behavior that gets triggered onCreateNode that captures the same information. The behavior can point to either java code or javascript. .
http://ecmarchitect.com/images/articles/alfresco-behavior/behavior-article.pdf
