cancel
Showing results for 
Search instead for 
Did you mean: 

How to prevent changing cm:modifier when updating a property

rhinmass
Champ in-the-making
Champ in-the-making
I am using Share with Alfresco 4.2.c.  I would like to make it so that if someone changes a property of a document, but not the content, the cm:modifier doesn't change.  Does anyone know if there is a way to configure this behaviour.

I tried using a BehaviourFilter, but hit a deadend because that required a Transaction.  And when I tried to instantiate the TrasactionService it required a QName to construct it.  I have not been able to fine a java class for QName anywhere that I can import into my share project. 

I would appreciate help with either of these problems:
1. Can it just be configured this way using the ContentModel or some other config file.  (That would be preferable.)
or
2. Which 4.2.c jar contains the class org.alfresco.service.namespace.Qname?


Thanks for any help.

2 REPLIES 2

mlagneaux
Champ on-the-rise
Champ on-the-rise
Hi,

I've already used the behaviour filter and I don't remember that it requires a specific transaction. I simply did something like:

behaviourFilter.disableBehaviour(nodeRef, ContentModel.ASPECT_AUDITABLE);


ContentModel class is part of alfresco-data-model JAR.

I don't think there's a way to disable this behaviour thanks to configuration but, if you find a way to do that, I'm really interested. Another potential solution would be to override the class where this behaviour is defined.

mrogers
Star Contributor
Star Contributor
QName is  org.alfresco.service.namespace.QName in the alfresco-data-model project.