How to intercept add/get content and metadata calls?

cancel
Showing results for 
Search instead for 
Did you mean: 
nenad982
Active Member

How to intercept add/get content and metadata calls?

Hello everybody,

I need advice.

I would like in Alfresco v5.1.g to intercept all calls (in  Java API) which will create/get content and create/get its metadata.  So my questions are:

1. Is this possible at all?

1. Is there a single place in Java API where these calls can be intercepted and where to look at?

Since now I found that:

org.alfresco.repo.node.db.DbNodeServiceImpl#createNode

org.alfresco.repo.contentAbstractContentWriter#putContent

will be used in this communication.

Does anybody have some advice related to this?

Thanks in advance

3 Replies
hardik1512
Established Member II

Re: How to intercept add/get content and metadata calls?

Try using Alfresco Behaviours / Policies.

Behaviours / Policies | Alfresco Documentation 

nenad982
Active Member

Re: How to intercept add/get content and metadata calls?

Thank you for your answer.

Maybe I can use behaviours before the node is created (to manipulate with content) but I need also a possibility to manipulate with node content when user try to download/view in browser/online edit the content.

The same thing is with metadata.

The perfect would be to have one single point (or few of them) where I can intercept all these get/set calls. 

hardik1512
Established Member II

Re: How to intercept add/get content and metadata calls?

ok, In this case, check if Activity Service can be used.

ActivityService | Alfresco Documentation